diff --git a/azurerm/internal/services/authorization/role_assignment_resource.go b/azurerm/internal/services/authorization/role_assignment_resource.go index 5d07fcbd6073..37254d901058 100644 --- a/azurerm/internal/services/authorization/role_assignment_resource.go +++ b/azurerm/internal/services/authorization/role_assignment_resource.go @@ -165,7 +165,7 @@ func resourceArmRoleAssignmentCreate(d *schema.ResourceData, meta interface{}) e name = uuid } - existing, err := roleAssignmentsClient.Get(ctx, scope, name) + existing, err := roleAssignmentsClient.Get(ctx, scope, name, "") if err != nil { if !utils.ResponseWasNotFound(existing.Response) { return fmt.Errorf("Error checking for presence of existing Role Assignment ID for %q (Scope %q): %+v", name, scope, err) @@ -203,7 +203,7 @@ func resourceArmRoleAssignmentCreate(d *schema.ResourceData, meta interface{}) e return err } - read, err := roleAssignmentsClient.Get(ctx, scope, name) + read, err := roleAssignmentsClient.Get(ctx, scope, name, "") if err != nil { return err } @@ -221,7 +221,7 @@ func resourceArmRoleAssignmentRead(d *schema.ResourceData, meta interface{}) err ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - resp, err := client.GetByID(ctx, d.Id()) + resp, err := client.GetByID(ctx, d.Id(), "") if err != nil { if utils.ResponseWasNotFound(resp.Response) { log.Printf("[DEBUG] Role Assignment ID %q was not found - removing from state", d.Id()) @@ -269,7 +269,7 @@ func resourceArmRoleAssignmentDelete(d *schema.ResourceData, meta interface{}) e return err } - resp, err := client.Delete(ctx, id.scope, id.name) + resp, err := client.Delete(ctx, id.scope, id.name, "") if err != nil { if !utils.ResponseWasNotFound(resp.Response) { return err @@ -343,7 +343,7 @@ func parseRoleAssignmentId(input string) (*roleAssignmentId, error) { func roleAssignmentCreateStateRefreshFunc(ctx context.Context, client *authorization.RoleAssignmentsClient, roleID string) resource.StateRefreshFunc { return func() (interface{}, string, error) { - resp, err := client.GetByID(ctx, roleID) + resp, err := client.GetByID(ctx, roleID, "") if err != nil { if utils.ResponseWasNotFound(resp.Response) { return resp, "pending", nil diff --git a/azurerm/internal/services/authorization/role_assignment_resource_test.go b/azurerm/internal/services/authorization/role_assignment_resource_test.go index f78252d1b54f..b936e126a777 100644 --- a/azurerm/internal/services/authorization/role_assignment_resource_test.go +++ b/azurerm/internal/services/authorization/role_assignment_resource_test.go @@ -220,7 +220,7 @@ func (r RoleAssignmentResource) Exists(ctx context.Context, client *clients.Clie return nil, err } - resp, err := client.Authorization.RoleAssignmentsClient.GetByID(ctx, state.ID) + resp, err := client.Authorization.RoleAssignmentsClient.GetByID(ctx, state.ID, "") if err != nil { if utils.ResponseWasNotFound(resp.Response) { return utils.Bool(false), nil diff --git a/go.mod b/go.mod index d47d65a9b7b4..925dbc7972a7 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/terraform-providers/terraform-provider-azurerm require ( - github.com/Azure/azure-sdk-for-go v54.2.0+incompatible + github.com/Azure/azure-sdk-for-go v54.3.0+incompatible github.com/Azure/go-autorest/autorest v0.11.18 github.com/Azure/go-autorest/autorest/date v0.3.0 github.com/Azure/go-autorest/autorest/validation v0.3.1 diff --git a/go.sum b/go.sum index b2a0f36b0cbe..19dcbc5fc1c3 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,8 @@ github.com/Azure/azure-sdk-for-go v42.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v47.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v54.2.0+incompatible h1:LYKBbC9PubUJnrkLZttkPmtOPNEQDhtzTjw114FJKBQ= -github.com/Azure/azure-sdk-for-go v54.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v54.3.0+incompatible h1:aJ/WT32eVP8YmWpuSHLgnFJWjZzUFmhR3wBxxszo4PE= +github.com/Azure/azure-sdk-for-go v54.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/CHANGELOG.md index 52911e4cc5e4..717ea072cdde 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/CHANGELOG.md @@ -1,2 +1,103 @@ # Change History +## Breaking Changes + +### Struct Changes + +#### Removed Structs + +1. CustomErrorResponse + +### Signature Changes + +#### Funcs + +1. RoleAssignmentsClient.Delete + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.DeleteByID + - Params + - From: context.Context, string + - To: context.Context, string, string +1. RoleAssignmentsClient.DeleteByIDPreparer + - Params + - From: context.Context, string + - To: context.Context, string, string +1. RoleAssignmentsClient.DeletePreparer + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.Get + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.GetByID + - Params + - From: context.Context, string + - To: context.Context, string, string +1. RoleAssignmentsClient.GetByIDPreparer + - Params + - From: context.Context, string + - To: context.Context, string, string +1. RoleAssignmentsClient.GetPreparer + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.List + - Params + - From: context.Context, string + - To: context.Context, string, string +1. RoleAssignmentsClient.ListComplete + - Params + - From: context.Context, string + - To: context.Context, string, string +1. RoleAssignmentsClient.ListForResource + - Params + - From: context.Context, string, string, string, string, string, string + - To: context.Context, string, string, string, string, string, string, string +1. RoleAssignmentsClient.ListForResourceComplete + - Params + - From: context.Context, string, string, string, string, string, string + - To: context.Context, string, string, string, string, string, string, string +1. RoleAssignmentsClient.ListForResourceGroup + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.ListForResourceGroupComplete + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.ListForResourceGroupPreparer + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.ListForResourcePreparer + - Params + - From: context.Context, string, string, string, string, string, string + - To: context.Context, string, string, string, string, string, string, string +1. RoleAssignmentsClient.ListForScope + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.ListForScopeComplete + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.ListForScopePreparer + - Params + - From: context.Context, string, string + - To: context.Context, string, string, string +1. RoleAssignmentsClient.ListPreparer + - Params + - From: context.Context, string + - To: context.Context, string, string + +## Additive Changes + +### New Funcs + +1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) +1. ErrorDetail.MarshalJSON() ([]byte, error) +1. Principal.MarshalJSON() ([]byte, error) +1. RoleAssignmentMetricsResult.MarshalJSON() ([]byte, error) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/_meta.json index 0671f832e36a..312eed8c0cb0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/_meta.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/_meta.json @@ -1,10 +1,10 @@ { - "commit": "0f0e41fa4e3679510fcf03ecd60084f1cdbd5805", + "commit": "5fcc6854765009e891052653b304cfe80353430a", "readme": "/_/azure-rest-api-specs/specification/authorization/resource-manager/readme.md", "tag": "package-2020-04-01-preview", - "use": "@microsoft.azure/autorest.go@2.1.180", + "use": "@microsoft.azure/autorest.go@2.1.183", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.180 --tag=package-2020-04-01-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/authorization/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-04-01-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/authorization/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/models.go index 3310e6f21dc6..20d9e396b809 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/models.go @@ -268,12 +268,6 @@ type ClassicAdministratorProperties struct { Role *string `json:"role,omitempty"` } -// CustomErrorResponse descriptive error response. -type CustomErrorResponse struct { - // Message - Description of the error. - Message *string `json:"message,omitempty"` -} - // DenyAssignment deny Assignment type DenyAssignment struct { autorest.Response `json:"-"` @@ -556,6 +550,12 @@ type ErrorAdditionalInfo struct { Info interface{} `json:"info,omitempty"` } +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ErrorDetail the error detail. type ErrorDetail struct { // Code - READ-ONLY; The error code. @@ -570,6 +570,12 @@ type ErrorDetail struct { AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` } +// MarshalJSON is the custom marshaler for ErrorDetail. +func (ed ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ErrorResponse common error response for all Azure Resource Manager APIs to return error details for // failed operations. (This also follows the OData error response format.). type ErrorResponse struct { @@ -756,6 +762,12 @@ type Principal struct { Type *string `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for Principal. +func (p Principal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ProviderOperation operation type ProviderOperation struct { // Name - The operation name. @@ -1251,6 +1263,12 @@ type RoleAssignmentMetricsResult struct { RoleAssignmentsRemainingCount *int64 `json:"roleAssignmentsRemainingCount,omitempty"` } +// MarshalJSON is the custom marshaler for RoleAssignmentMetricsResult. +func (ramr RoleAssignmentMetricsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // RoleAssignmentProperties role assignment properties. type RoleAssignmentProperties struct { // RoleDefinitionID - The role definition ID used in the role assignment. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/roleassignments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/roleassignments.go index be14e5c85b8d..53a25d6a5ae5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/roleassignments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization/roleassignments.go @@ -211,7 +211,8 @@ func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (re // Parameters: // scope - the scope of the role assignment to delete. // roleAssignmentName - the name of the role assignment to delete. -func (client RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string, tenantID string) (result RoleAssignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.Delete") defer func() { @@ -222,7 +223,7 @@ func (client RoleAssignmentsClient) Delete(ctx context.Context, scope string, ro tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, scope, roleAssignmentName) + req, err := client.DeletePreparer(ctx, scope, roleAssignmentName, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Delete", nil, "Failure preparing request") return @@ -245,7 +246,7 @@ func (client RoleAssignmentsClient) Delete(ctx context.Context, scope string, ro } // DeletePreparer prepares the Delete request. -func (client RoleAssignmentsClient) DeletePreparer(ctx context.Context, scope string, roleAssignmentName string) (*http.Request, error) { +func (client RoleAssignmentsClient) DeletePreparer(ctx context.Context, scope string, roleAssignmentName string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleAssignmentName": autorest.Encode("path", roleAssignmentName), "scope": scope, @@ -255,6 +256,9 @@ func (client RoleAssignmentsClient) DeletePreparer(ctx context.Context, scope st queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -285,7 +289,8 @@ func (client RoleAssignmentsClient) DeleteResponder(resp *http.Response) (result // DeleteByID delete a role assignment. // Parameters: // roleID - the ID of the role assignment to delete. -func (client RoleAssignmentsClient) DeleteByID(ctx context.Context, roleID string) (result RoleAssignment, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) DeleteByID(ctx context.Context, roleID string, tenantID string) (result RoleAssignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.DeleteByID") defer func() { @@ -296,7 +301,7 @@ func (client RoleAssignmentsClient) DeleteByID(ctx context.Context, roleID strin tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteByIDPreparer(ctx, roleID) + req, err := client.DeleteByIDPreparer(ctx, roleID, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "DeleteByID", nil, "Failure preparing request") return @@ -319,7 +324,7 @@ func (client RoleAssignmentsClient) DeleteByID(ctx context.Context, roleID strin } // DeleteByIDPreparer prepares the DeleteByID request. -func (client RoleAssignmentsClient) DeleteByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { +func (client RoleAssignmentsClient) DeleteByIDPreparer(ctx context.Context, roleID string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleId": roleID, } @@ -328,6 +333,9 @@ func (client RoleAssignmentsClient) DeleteByIDPreparer(ctx context.Context, role queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -359,7 +367,8 @@ func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (re // Parameters: // scope - the scope of the role assignment. // roleAssignmentName - the name of the role assignment to get. -func (client RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string, tenantID string) (result RoleAssignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.Get") defer func() { @@ -370,7 +379,7 @@ func (client RoleAssignmentsClient) Get(ctx context.Context, scope string, roleA tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, roleAssignmentName) + req, err := client.GetPreparer(ctx, scope, roleAssignmentName, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Get", nil, "Failure preparing request") return @@ -393,7 +402,7 @@ func (client RoleAssignmentsClient) Get(ctx context.Context, scope string, roleA } // GetPreparer prepares the Get request. -func (client RoleAssignmentsClient) GetPreparer(ctx context.Context, scope string, roleAssignmentName string) (*http.Request, error) { +func (client RoleAssignmentsClient) GetPreparer(ctx context.Context, scope string, roleAssignmentName string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleAssignmentName": autorest.Encode("path", roleAssignmentName), "scope": scope, @@ -403,6 +412,9 @@ func (client RoleAssignmentsClient) GetPreparer(ctx context.Context, scope strin queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -433,7 +445,8 @@ func (client RoleAssignmentsClient) GetResponder(resp *http.Response) (result Ro // GetByID gets a role assignment by ID. // Parameters: // roleID - the ID of the role assignment to get. -func (client RoleAssignmentsClient) GetByID(ctx context.Context, roleID string) (result RoleAssignment, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) GetByID(ctx context.Context, roleID string, tenantID string) (result RoleAssignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.GetByID") defer func() { @@ -444,7 +457,7 @@ func (client RoleAssignmentsClient) GetByID(ctx context.Context, roleID string) tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetByIDPreparer(ctx, roleID) + req, err := client.GetByIDPreparer(ctx, roleID, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "GetByID", nil, "Failure preparing request") return @@ -467,7 +480,7 @@ func (client RoleAssignmentsClient) GetByID(ctx context.Context, roleID string) } // GetByIDPreparer prepares the GetByID request. -func (client RoleAssignmentsClient) GetByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { +func (client RoleAssignmentsClient) GetByIDPreparer(ctx context.Context, roleID string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleId": roleID, } @@ -476,6 +489,9 @@ func (client RoleAssignmentsClient) GetByIDPreparer(ctx context.Context, roleID queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -508,7 +524,8 @@ func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (resul // filter - 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(ctx context.Context, filter string) (result RoleAssignmentListResultPage, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) List(ctx context.Context, filter string, tenantID string) (result RoleAssignmentListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.List") defer func() { @@ -526,7 +543,7 @@ func (client RoleAssignmentsClient) List(ctx context.Context, filter string) (re } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, filter) + req, err := client.ListPreparer(ctx, filter, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "List", nil, "Failure preparing request") return @@ -553,7 +570,7 @@ func (client RoleAssignmentsClient) List(ctx context.Context, filter string) (re } // ListPreparer prepares the List request. -func (client RoleAssignmentsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { +func (client RoleAssignmentsClient) ListPreparer(ctx context.Context, filter string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -565,6 +582,9 @@ func (client RoleAssignmentsClient) ListPreparer(ctx context.Context, filter str if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -614,7 +634,7 @@ func (client RoleAssignmentsClient) listNextResults(ctx context.Context, lastRes } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter string, tenantID string) (result RoleAssignmentListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.List") defer func() { @@ -625,7 +645,7 @@ func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter str tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, filter) + result.page, err = client.List(ctx, filter, tenantID) return } @@ -639,7 +659,8 @@ func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter str // filter - 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(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultPage, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, tenantID string) (result RoleAssignmentListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResource") defer func() { @@ -661,7 +682,7 @@ func (client RoleAssignmentsClient) ListForResource(ctx context.Context, resourc } result.fn = client.listForResourceNextResults - req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) + req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResource", nil, "Failure preparing request") return @@ -688,7 +709,7 @@ func (client RoleAssignmentsClient) ListForResource(ctx context.Context, resourc } // ListForResourcePreparer prepares the ListForResource request. -func (client RoleAssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error) { +func (client RoleAssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -705,6 +726,9 @@ func (client RoleAssignmentsClient) ListForResourcePreparer(ctx context.Context, if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -754,7 +778,7 @@ func (client RoleAssignmentsClient) listForResourceNextResults(ctx context.Conte } // ListForResourceComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, tenantID string) (result RoleAssignmentListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResource") defer func() { @@ -765,7 +789,7 @@ func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) + result.page, err = client.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter, tenantID) return } @@ -775,7 +799,8 @@ func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, // filter - 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(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultPage, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string, tenantID string) (result RoleAssignmentListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResourceGroup") defer func() { @@ -797,7 +822,7 @@ func (client RoleAssignmentsClient) ListForResourceGroup(ctx context.Context, re } result.fn = client.listForResourceGroupNextResults - req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName, filter) + req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName, filter, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResourceGroup", nil, "Failure preparing request") return @@ -824,7 +849,7 @@ func (client RoleAssignmentsClient) ListForResourceGroup(ctx context.Context, re } // ListForResourceGroupPreparer prepares the ListForResourceGroup request. -func (client RoleAssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) { +func (client RoleAssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -837,6 +862,9 @@ func (client RoleAssignmentsClient) ListForResourceGroupPreparer(ctx context.Con if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -886,7 +914,7 @@ func (client RoleAssignmentsClient) listForResourceGroupNextResults(ctx context. } // ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, tenantID string) (result RoleAssignmentListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResourceGroup") defer func() { @@ -897,7 +925,7 @@ func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListForResourceGroup(ctx, resourceGroupName, filter) + result.page, err = client.ListForResourceGroup(ctx, resourceGroupName, filter, tenantID) return } @@ -907,7 +935,8 @@ func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Con // filter - 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(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultPage, err error) { +// tenantID - tenant ID for cross-tenant request +func (client RoleAssignmentsClient) ListForScope(ctx context.Context, scope string, filter string, tenantID string) (result RoleAssignmentListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForScope") defer func() { @@ -919,7 +948,7 @@ func (client RoleAssignmentsClient) ListForScope(ctx context.Context, scope stri }() } result.fn = client.listForScopeNextResults - req, err := client.ListForScopePreparer(ctx, scope, filter) + req, err := client.ListForScopePreparer(ctx, scope, filter, tenantID) if err != nil { err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForScope", nil, "Failure preparing request") return @@ -946,7 +975,7 @@ func (client RoleAssignmentsClient) ListForScope(ctx context.Context, scope stri } // ListForScopePreparer prepares the ListForScope request. -func (client RoleAssignmentsClient) ListForScopePreparer(ctx context.Context, scope string, filter string) (*http.Request, error) { +func (client RoleAssignmentsClient) ListForScopePreparer(ctx context.Context, scope string, filter string, tenantID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "scope": scope, } @@ -958,6 +987,9 @@ func (client RoleAssignmentsClient) ListForScopePreparer(ctx context.Context, sc if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(tenantID) > 0 { + queryParameters["tenantId"] = autorest.Encode("query", tenantID) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -1007,7 +1039,7 @@ func (client RoleAssignmentsClient) listForScopeNextResults(ctx context.Context, } // ListForScopeComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListForScopeComplete(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsClient) ListForScopeComplete(ctx context.Context, scope string, filter string, tenantID string) (result RoleAssignmentListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForScope") defer func() { @@ -1018,6 +1050,6 @@ func (client RoleAssignmentsClient) ListForScopeComplete(ctx context.Context, sc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListForScope(ctx, scope, filter) + result.page, err = client.ListForScope(ctx, scope, filter, tenantID) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index 2d5192c22a23..88196ed9485d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -4,4 +4,4 @@ package version // Licensed under the MIT License. See License.txt in the project root for license information. // Number contains the semantic version of this SDK. -const Number = "v54.2.0" +const Number = "v54.3.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index e4aee5ceecd3..f2b3dda41416 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -8,7 +8,7 @@ cloud.google.com/go/internal/trace cloud.google.com/go/internal/version # cloud.google.com/go/storage v1.10.0 cloud.google.com/go/storage -# github.com/Azure/azure-sdk-for-go v54.2.0+incompatible +# github.com/Azure/azure-sdk-for-go v54.3.0+incompatible ## explicit github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources github.com/Azure/azure-sdk-for-go/services/aad/mgmt/2017-04-01/aad