vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
@@ -14,9 +14,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -24,30 +23,25 @@ import (
"net/http"
)
// ClassicAdministratorsClient is the role based access control provides you a
// way to apply granular level policy administration down to individual
// resources or resource groups. These operations enable you to manage role
// definitions and role assignments. A role definition describes the set of
// actions that can be performed on resources. A role assignment grants access
// to Azure Active Directory users.
// ClassicAdministratorsClient is the role based access control provides you a way to apply granular level policy
// administration down to individual resources or resource groups. These operations enable you to manage role
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
// A role assignment grants access to Azure Active Directory users.
type ClassicAdministratorsClient struct {
ManagementClient
}
// NewClassicAdministratorsClient creates an instance of the
// ClassicAdministratorsClient client.
// NewClassicAdministratorsClient creates an instance of the ClassicAdministratorsClient client.
func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministratorsClient {
return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewClassicAdministratorsClientWithBaseURI creates an instance of the
// ClassicAdministratorsClient client.
// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client.
func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient {
return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List gets service administrator, account administrator, and
// co-administrators for the subscription.
// List gets service administrator, account administrator, and co-administrators for the subscription.
func (client ClassicAdministratorsClient) List() (result ClassicAdministratorListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
@@ -131,3 +125,48 @@ func (client ClassicAdministratorsClient) ListNextResults(lastResults ClassicAdm
return
}
// ListComplete gets all elements from the list without paging.
func (client ClassicAdministratorsClient) ListComplete(cancel <-chan struct{}) (<-chan ClassicAdministrator, <-chan error) {
resultChan := make(chan ClassicAdministrator)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List()
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
+7 -10
View File
@@ -1,11 +1,9 @@
// Package authorization implements the Azure ARM Authorization service API
// version 2015-07-01.
// Package authorization implements the Azure ARM Authorization service API version 2015-07-01.
//
// Role based access control provides you a way to apply granular level policy
// administration down to individual resources or resource groups. These
// operations enable you to manage role definitions and role assignments. A
// role definition describes the set of actions that can be performed on
// resources. A role assignment grants access to Azure Active Directory users.
// Role based access control provides you a way to apply granular level policy administration down to individual
// resources or resource groups. These operations enable you to manage role definitions and role assignments. A role
// definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure
// Active Directory users.
package authorization
// Copyright (c) Microsoft and contributors. All rights reserved.
@@ -22,9 +20,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
+3 -5
View File
@@ -14,9 +14,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -32,8 +31,7 @@ type ClassicAdministrator struct {
Properties *ClassicAdministratorProperties `json:"properties,omitempty"`
}
// ClassicAdministratorListResult is classicAdministrator list result
// information.
// ClassicAdministratorListResult is classicAdministrator list result information.
type ClassicAdministratorListResult struct {
autorest.Response `json:"-"`
Value *[]ClassicAdministrator `json:"value,omitempty"`
+103 -20
View File
@@ -14,9 +14,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -24,12 +23,10 @@ import (
"net/http"
)
// PermissionsClient is the role based access control provides you a way to
// apply granular level policy administration down to individual resources or
// resource groups. These operations enable you to manage role definitions and
// role assignments. A role definition describes the set of actions that can be
// performed on resources. A role assignment grants access to Azure Active
// Directory users.
// PermissionsClient is the role based access control provides you a way to apply granular level policy administration
// down to individual resources or resource groups. These operations enable you to manage role definitions and role
// assignments. A role definition describes the set of actions that can be performed on resources. A role assignment
// grants access to Azure Active Directory users.
type PermissionsClient struct {
ManagementClient
}
@@ -39,19 +36,17 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient {
return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient
// client.
// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client.
func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient {
return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// ListForResource gets all permissions the caller has for a resource.
//
// resourceGroupName is the name of the resource group containing the resource.
// The name is case insensitive. resourceProviderNamespace is the namespace of
// the resource provider. parentResourcePath is the parent resource identity.
// resourceType is the resource type of the resource. resourceName is the name
// of the resource to get the permissions for.
// resourceGroupName is the name of the resource group containing the resource. The name is case insensitive.
// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource
// identity. resourceType is the resource type of the resource. resourceName is the name of the resource to get the
// permissions for.
func (client PermissionsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResult, err error) {
req, err := client.ListForResourcePreparer(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
if err != nil {
@@ -141,11 +136,54 @@ func (client PermissionsClient) ListForResourceNextResults(lastResults Permissio
return
}
// ListForResourceGroup gets all permissions the caller has for a resource
// group.
// ListForResourceComplete gets all elements from the list without paging.
func (client PermissionsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, cancel <-chan struct{}) (<-chan Permission, <-chan error) {
resultChan := make(chan Permission)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListForResourceNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListForResourceGroup gets all permissions the caller has for a resource group.
//
// resourceGroupName is the name of the resource group to get the permissions
// for. The name is case insensitive.
// resourceGroupName is the name of the resource group to get the permissions for. The name is case insensitive.
func (client PermissionsClient) ListForResourceGroup(resourceGroupName string) (result PermissionGetResult, err error) {
req, err := client.ListForResourceGroupPreparer(resourceGroupName)
if err != nil {
@@ -230,3 +268,48 @@ func (client PermissionsClient) ListForResourceGroupNextResults(lastResults Perm
return
}
// ListForResourceGroupComplete gets all elements from the list without paging.
func (client PermissionsClient) ListForResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Permission, <-chan error) {
resultChan := make(chan Permission)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForResourceGroup(resourceGroupName)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListForResourceGroupNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
@@ -14,9 +14,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -24,32 +23,28 @@ import (
"net/http"
)
// ProviderOperationsMetadataClient is the role based access control provides
// you a way to apply granular level policy administration down to individual
// resources or resource groups. These operations enable you to manage role
// definitions and role assignments. A role definition describes the set of
// actions that can be performed on resources. A role assignment grants access
// to Azure Active Directory users.
// ProviderOperationsMetadataClient is the role based access control provides you a way to apply granular level policy
// administration down to individual resources or resource groups. These operations enable you to manage role
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
// A role assignment grants access to Azure Active Directory users.
type ProviderOperationsMetadataClient struct {
ManagementClient
}
// NewProviderOperationsMetadataClient creates an instance of the
// ProviderOperationsMetadataClient client.
// NewProviderOperationsMetadataClient creates an instance of the ProviderOperationsMetadataClient client.
func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperationsMetadataClient {
return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the
// ProviderOperationsMetadataClient client.
// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client.
func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient {
return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// Get gets provider operations metadata for the specified resource provider.
//
// resourceProviderNamespace is the namespace of the resource provider. expand
// is specifies whether to expand the values.
// resourceProviderNamespace is the namespace of the resource provider. expand is specifies whether to expand the
// values.
func (client ProviderOperationsMetadataClient) Get(resourceProviderNamespace string, expand string) (result ProviderOperationsMetadata, err error) {
req, err := client.GetPreparer(resourceProviderNamespace, expand)
if err != nil {
@@ -198,3 +193,48 @@ func (client ProviderOperationsMetadataClient) ListNextResults(lastResults Provi
return
}
// ListComplete gets all elements from the list without paging.
func (client ProviderOperationsMetadataClient) ListComplete(expand string, cancel <-chan struct{}) (<-chan ProviderOperationsMetadata, <-chan error) {
resultChan := make(chan ProviderOperationsMetadata)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(expand)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
+211 -47
View File
@@ -14,9 +14,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -24,39 +23,32 @@ import (
"net/http"
)
// RoleAssignmentsClient is the role based access control provides you a way to
// apply granular level policy administration down to individual resources or
// resource groups. These operations enable you to manage role definitions and
// role assignments. A role definition describes the set of actions that can be
// performed on resources. A role assignment grants access to Azure Active
// Directory users.
// RoleAssignmentsClient is the role based access control provides you a way to apply granular level policy
// administration down to individual resources or resource groups. These operations enable you to manage role
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
// A role assignment grants access to Azure Active Directory users.
type RoleAssignmentsClient struct {
ManagementClient
}
// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient
// client.
// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient client.
func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient {
return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewRoleAssignmentsClientWithBaseURI creates an instance of the
// RoleAssignmentsClient client.
// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client.
func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient {
return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// Create creates a role assignment.
//
// scope is the scope of the role assignment to create. The scope can be any
// REST resource instance. For example, use '/subscriptions/{subscription-id}/'
// for a subscription,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
// a resource group, and
// scope is the scope of the role assignment to create. The scope can be any REST resource instance. For example, use
// '/subscriptions/{subscription-id}/' for a subscription,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}'
// for a resource. roleAssignmentName is the name of the role assignment to
// create. It can be any valid GUID. parameters is parameters for the role
// assignment.
// for a resource. roleAssignmentName is the name of the role assignment to create. It can be any valid GUID.
// parameters is parameters for the role assignment.
func (client RoleAssignmentsClient) Create(scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) {
req, err := client.CreatePreparer(scope, roleAssignmentName, parameters)
if err != nil {
@@ -122,8 +114,7 @@ func (client RoleAssignmentsClient) CreateResponder(resp *http.Response) (result
// CreateByID creates a role assignment by ID.
//
// roleAssignmentID is the ID of the role assignment to create. parameters is
// parameters for the role assignment.
// roleAssignmentID is the ID of the role assignment to create. parameters is parameters for the role assignment.
func (client RoleAssignmentsClient) CreateByID(roleAssignmentID string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) {
req, err := client.CreateByIDPreparer(roleAssignmentID, parameters)
if err != nil {
@@ -188,8 +179,8 @@ func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (re
// Delete deletes a role assignment.
//
// scope is the scope of the role assignment to delete. roleAssignmentName is
// the name of the role assignment to delete.
// scope is the scope of the role assignment to delete. roleAssignmentName is the name of the role assignment to
// delete.
func (client RoleAssignmentsClient) Delete(scope string, roleAssignmentName string) (result RoleAssignment, err error) {
req, err := client.DeletePreparer(scope, roleAssignmentName)
if err != nil {
@@ -316,8 +307,7 @@ func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (re
// Get get the specified role assignment.
//
// scope is the scope of the role assignment. roleAssignmentName is the name of
// the role assignment to get.
// scope is the scope of the role assignment. roleAssignmentName is the name of the role assignment to get.
func (client RoleAssignmentsClient) Get(scope string, roleAssignmentName string) (result RoleAssignment, err error) {
req, err := client.GetPreparer(scope, roleAssignmentName)
if err != nil {
@@ -444,10 +434,9 @@ func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (resul
// List gets all role assignments for the subscription.
//
// filter is the filter to apply on the operation. Use $filter=atScope() to
// return all role assignments at or above the scope. Use $filter=principalId
// eq {id} to return all role assignments at, above or below the scope for the
// specified principal.
// filter is the filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the
// scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified
// principal.
func (client RoleAssignmentsClient) List(filter string) (result RoleAssignmentListResult, err error) {
req, err := client.ListPreparer(filter)
if err != nil {
@@ -535,16 +524,58 @@ func (client RoleAssignmentsClient) ListNextResults(lastResults RoleAssignmentLi
return
}
// ListComplete gets all elements from the list without paging.
func (client RoleAssignmentsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
resultChan := make(chan RoleAssignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(filter)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListForResource gets role assignments for a resource.
//
// resourceGroupName is the name of the resource group.
// resourceProviderNamespace is the namespace of the resource provider.
// parentResourcePath is the parent resource identity. resourceType is the
// resource type of the resource. resourceName is the name of the resource to
// get role assignments for. filter is the filter to apply on the operation.
// Use $filter=atScope() to return all role assignments at or above the scope.
// Use $filter=principalId eq {id} to return all role assignments at, above or
// below the scope for the specified principal.
// resourceGroupName is the name of the resource group. resourceProviderNamespace is the namespace of the resource
// provider. parentResourcePath is the parent resource identity. resourceType is the resource type of the resource.
// resourceName is the name of the resource to get role assignments for. filter is the filter to apply on the
// operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq
// {id} to return all role assignments at, above or below the scope for the specified principal.
func (client RoleAssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResult, err error) {
req, err := client.ListForResourcePreparer(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
if err != nil {
@@ -637,12 +668,56 @@ func (client RoleAssignmentsClient) ListForResourceNextResults(lastResults RoleA
return
}
// ListForResourceComplete gets all elements from the list without paging.
func (client RoleAssignmentsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
resultChan := make(chan RoleAssignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListForResourceNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListForResourceGroup gets role assignments for a resource group.
//
// resourceGroupName is the name of the resource group. filter is the filter to
// apply on the operation. Use $filter=atScope() to return all role assignments
// at or above the scope. Use $filter=principalId eq {id} to return all role
// assignments at, above or below the scope for the specified principal.
// resourceGroupName is the name of the resource group. filter is the filter to apply on the operation. Use
// $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return
// all role assignments at, above or below the scope for the specified principal.
func (client RoleAssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result RoleAssignmentListResult, err error) {
req, err := client.ListForResourceGroupPreparer(resourceGroupName, filter)
if err != nil {
@@ -731,12 +806,56 @@ func (client RoleAssignmentsClient) ListForResourceGroupNextResults(lastResults
return
}
// ListForResourceGroupComplete gets all elements from the list without paging.
func (client RoleAssignmentsClient) ListForResourceGroupComplete(resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
resultChan := make(chan RoleAssignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForResourceGroup(resourceGroupName, filter)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListForResourceGroupNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListForScope gets role assignments for a scope.
//
// scope is the scope of the role assignments. filter is the filter to apply on
// the operation. Use $filter=atScope() to return all role assignments at or
// above the scope. Use $filter=principalId eq {id} to return all role
// assignments at, above or below the scope for the specified principal.
// scope is the scope of the role assignments. filter is the filter to apply on the operation. Use $filter=atScope() to
// return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments
// at, above or below the scope for the specified principal.
func (client RoleAssignmentsClient) ListForScope(scope string, filter string) (result RoleAssignmentListResult, err error) {
req, err := client.ListForScopePreparer(scope, filter)
if err != nil {
@@ -823,3 +942,48 @@ func (client RoleAssignmentsClient) ListForScopeNextResults(lastResults RoleAssi
return
}
// ListForScopeComplete gets all elements from the list without paging.
func (client RoleAssignmentsClient) ListForScopeComplete(scope string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
resultChan := make(chan RoleAssignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForScope(scope, filter)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListForScopeNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
@@ -14,9 +14,8 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -24,32 +23,28 @@ import (
"net/http"
)
// RoleDefinitionsClient is the role based access control provides you a way to
// apply granular level policy administration down to individual resources or
// resource groups. These operations enable you to manage role definitions and
// role assignments. A role definition describes the set of actions that can be
// performed on resources. A role assignment grants access to Azure Active
// Directory users.
// RoleDefinitionsClient is the role based access control provides you a way to apply granular level policy
// administration down to individual resources or resource groups. These operations enable you to manage role
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
// A role assignment grants access to Azure Active Directory users.
type RoleDefinitionsClient struct {
ManagementClient
}
// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient
// client.
// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient client.
func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient {
return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewRoleDefinitionsClientWithBaseURI creates an instance of the
// RoleDefinitionsClient client.
// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client.
func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient {
return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates a role definition.
//
// scope is the scope of the role definition. roleDefinitionID is the ID of the
// role definition. roleDefinition is the values for the role definition.
// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition. roleDefinition is the
// values for the role definition.
func (client RoleDefinitionsClient) CreateOrUpdate(scope string, roleDefinitionID string, roleDefinition RoleDefinition) (result RoleDefinition, err error) {
req, err := client.CreateOrUpdatePreparer(scope, roleDefinitionID, roleDefinition)
if err != nil {
@@ -115,8 +110,7 @@ func (client RoleDefinitionsClient) CreateOrUpdateResponder(resp *http.Response)
// Delete deletes a role definition.
//
// scope is the scope of the role definition. roleDefinitionID is the ID of the
// role definition to delete.
// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition to delete.
func (client RoleDefinitionsClient) Delete(scope string, roleDefinitionID string) (result RoleDefinition, err error) {
req, err := client.DeletePreparer(scope, roleDefinitionID)
if err != nil {
@@ -180,8 +174,7 @@ func (client RoleDefinitionsClient) DeleteResponder(resp *http.Response) (result
// Get get role definition by name (GUID).
//
// scope is the scope of the role definition. roleDefinitionID is the ID of the
// role definition.
// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition.
func (client RoleDefinitionsClient) Get(scope string, roleDefinitionID string) (result RoleDefinition, err error) {
req, err := client.GetPreparer(scope, roleDefinitionID)
if err != nil {
@@ -308,9 +301,8 @@ func (client RoleDefinitionsClient) GetByIDResponder(resp *http.Response) (resul
// List get all role definitions that are applicable at scope and above.
//
// scope is the scope of the role definition. filter is the filter to apply on
// the operation. Use atScopeAndBelow filter to search below the given scope as
// well.
// scope is the scope of the role definition. filter is the filter to apply on the operation. Use atScopeAndBelow
// filter to search below the given scope as well.
func (client RoleDefinitionsClient) List(scope string, filter string) (result RoleDefinitionListResult, err error) {
req, err := client.ListPreparer(scope, filter)
if err != nil {
@@ -397,3 +389,48 @@ func (client RoleDefinitionsClient) ListNextResults(lastResults RoleDefinitionLi
return
}
// ListComplete gets all elements from the list without paging.
func (client RoleDefinitionsClient) ListComplete(scope string, filter string, cancel <-chan struct{}) (<-chan RoleDefinition, <-chan error) {
resultChan := make(chan RoleDefinition)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(scope, filter)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
+4 -5
View File
@@ -14,16 +14,15 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.1.0-beta arm-authorization/2015-07-01"
return "Azure-SDK-For-Go/v11.0.0-beta arm-authorization/2015-07-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.1.0-beta"
return "v11.0.0-beta"
}