From b14622ec87a37366345b03ab8d7461f7dc38745e Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 16 Mar 2020 18:23:11 +0000 Subject: [PATCH 1/2] Generated from a79f20782fc8c2b4d20d495e1e1da0a1ef394910 Fix resourceScope name for BP examples. --- .../2018-11-01-preview/blueprint/artifacts.go | 64 +++++++-------- .../blueprint/assignmentoperations.go | 36 ++++----- .../blueprint/assignments.go | 81 +++++++++---------- .../blueprint/blueprintapi/interfaces.go | 54 ++++++------- .../blueprint/blueprints.go | 64 +++++++-------- .../2018-11-01-preview/blueprint/models.go | 5 ++ .../blueprint/publishedartifacts.go | 34 ++++---- .../blueprint/publishedblueprints.go | 64 +++++++-------- 8 files changed, 193 insertions(+), 209 deletions(-) diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go index 5a2bf83c921c..acb1c0367026 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go @@ -43,14 +43,13 @@ func NewArtifactsClientWithBaseURI(baseURI string) ArtifactsClient { // CreateOrUpdate create or update blueprint artifact. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // artifactName - name of the blueprint artifact. // artifact - blueprint artifact to create or update. -func (client ArtifactsClient) CreateOrUpdate(ctx context.Context, scope string, blueprintName string, artifactName string, artifact BasicArtifact) (result ArtifactModel, err error) { +func (client ArtifactsClient) CreateOrUpdate(ctx context.Context, resourceScope string, blueprintName string, artifactName string, artifact BasicArtifact) (result ArtifactModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.CreateOrUpdate") defer func() { @@ -61,7 +60,7 @@ func (client ArtifactsClient) CreateOrUpdate(ctx context.Context, scope string, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateOrUpdatePreparer(ctx, scope, blueprintName, artifactName, artifact) + req, err := client.CreateOrUpdatePreparer(ctx, resourceScope, blueprintName, artifactName, artifact) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.ArtifactsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -83,11 +82,11 @@ func (client ArtifactsClient) CreateOrUpdate(ctx context.Context, scope string, } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ArtifactsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, blueprintName string, artifactName string, artifact BasicArtifact) (*http.Request, error) { +func (client ArtifactsClient) CreateOrUpdatePreparer(ctx context.Context, resourceScope string, blueprintName string, artifactName string, artifact BasicArtifact) (*http.Request, error) { pathParameters := map[string]interface{}{ "artifactName": autorest.Encode("path", artifactName), "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -99,7 +98,7 @@ func (client ArtifactsClient) CreateOrUpdatePreparer(ctx context.Context, scope autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}", pathParameters), autorest.WithJSON(artifact), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -126,13 +125,12 @@ func (client ArtifactsClient) CreateOrUpdateResponder(resp *http.Response) (resu // Delete delete a blueprint artifact. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // artifactName - name of the blueprint artifact. -func (client ArtifactsClient) Delete(ctx context.Context, scope string, blueprintName string, artifactName string) (result ArtifactModel, err error) { +func (client ArtifactsClient) Delete(ctx context.Context, resourceScope string, blueprintName string, artifactName string) (result ArtifactModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.Delete") defer func() { @@ -143,7 +141,7 @@ func (client ArtifactsClient) Delete(ctx context.Context, scope string, blueprin tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, scope, blueprintName, artifactName) + req, err := client.DeletePreparer(ctx, resourceScope, blueprintName, artifactName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.ArtifactsClient", "Delete", nil, "Failure preparing request") return @@ -165,11 +163,11 @@ func (client ArtifactsClient) Delete(ctx context.Context, scope string, blueprin } // DeletePreparer prepares the Delete request. -func (client ArtifactsClient) DeletePreparer(ctx context.Context, scope string, blueprintName string, artifactName string) (*http.Request, error) { +func (client ArtifactsClient) DeletePreparer(ctx context.Context, resourceScope string, blueprintName string, artifactName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "artifactName": autorest.Encode("path", artifactName), "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -180,7 +178,7 @@ func (client ArtifactsClient) DeletePreparer(ctx context.Context, scope string, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -206,13 +204,12 @@ func (client ArtifactsClient) DeleteResponder(resp *http.Response) (result Artif // Get get a blueprint artifact. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // artifactName - name of the blueprint artifact. -func (client ArtifactsClient) Get(ctx context.Context, scope string, blueprintName string, artifactName string) (result ArtifactModel, err error) { +func (client ArtifactsClient) Get(ctx context.Context, resourceScope string, blueprintName string, artifactName string) (result ArtifactModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.Get") defer func() { @@ -223,7 +220,7 @@ func (client ArtifactsClient) Get(ctx context.Context, scope string, blueprintNa tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, blueprintName, artifactName) + req, err := client.GetPreparer(ctx, resourceScope, blueprintName, artifactName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.ArtifactsClient", "Get", nil, "Failure preparing request") return @@ -245,11 +242,11 @@ func (client ArtifactsClient) Get(ctx context.Context, scope string, blueprintNa } // GetPreparer prepares the Get request. -func (client ArtifactsClient) GetPreparer(ctx context.Context, scope string, blueprintName string, artifactName string) (*http.Request, error) { +func (client ArtifactsClient) GetPreparer(ctx context.Context, resourceScope string, blueprintName string, artifactName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "artifactName": autorest.Encode("path", artifactName), "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -260,7 +257,7 @@ func (client ArtifactsClient) GetPreparer(ctx context.Context, scope string, blu preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -286,12 +283,11 @@ func (client ArtifactsClient) GetResponder(resp *http.Response) (result Artifact // List list artifacts for a given blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. -func (client ArtifactsClient) List(ctx context.Context, scope string, blueprintName string) (result ArtifactListPage, err error) { +func (client ArtifactsClient) List(ctx context.Context, resourceScope string, blueprintName string) (result ArtifactListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.List") defer func() { @@ -303,7 +299,7 @@ func (client ArtifactsClient) List(ctx context.Context, scope string, blueprintN }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope, blueprintName) + req, err := client.ListPreparer(ctx, resourceScope, blueprintName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.ArtifactsClient", "List", nil, "Failure preparing request") return @@ -325,10 +321,10 @@ func (client ArtifactsClient) List(ctx context.Context, scope string, blueprintN } // ListPreparer prepares the List request. -func (client ArtifactsClient) ListPreparer(ctx context.Context, scope string, blueprintName string) (*http.Request, error) { +func (client ArtifactsClient) ListPreparer(ctx context.Context, resourceScope string, blueprintName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -339,7 +335,7 @@ func (client ArtifactsClient) ListPreparer(ctx context.Context, scope string, bl preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -385,7 +381,7 @@ func (client ArtifactsClient) listNextResults(ctx context.Context, lastResults A } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ArtifactsClient) ListComplete(ctx context.Context, scope string, blueprintName string) (result ArtifactListIterator, err error) { +func (client ArtifactsClient) ListComplete(ctx context.Context, resourceScope string, blueprintName string) (result ArtifactListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.List") defer func() { @@ -396,6 +392,6 @@ func (client ArtifactsClient) ListComplete(ctx context.Context, scope string, bl tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, scope, blueprintName) + result.page, err = client.List(ctx, resourceScope, blueprintName) return } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go index b08b73311e4a..c8edd7d63086 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go @@ -44,13 +44,12 @@ func NewAssignmentOperationsClientWithBaseURI(baseURI string) AssignmentOperatio // Get get a blueprint assignment operation. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // assignmentName - name of the blueprint assignment. // assignmentOperationName - name of the blueprint assignment operation. -func (client AssignmentOperationsClient) Get(ctx context.Context, scope string, assignmentName string, assignmentOperationName string) (result AssignmentOperation, err error) { +func (client AssignmentOperationsClient) Get(ctx context.Context, resourceScope string, assignmentName string, assignmentOperationName string) (result AssignmentOperation, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationsClient.Get") defer func() { @@ -61,7 +60,7 @@ func (client AssignmentOperationsClient) Get(ctx context.Context, scope string, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, assignmentName, assignmentOperationName) + req, err := client.GetPreparer(ctx, resourceScope, assignmentName, assignmentOperationName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "Get", nil, "Failure preparing request") return @@ -83,11 +82,11 @@ func (client AssignmentOperationsClient) Get(ctx context.Context, scope string, } // GetPreparer prepares the Get request. -func (client AssignmentOperationsClient) GetPreparer(ctx context.Context, scope string, assignmentName string, assignmentOperationName string) (*http.Request, error) { +func (client AssignmentOperationsClient) GetPreparer(ctx context.Context, resourceScope string, assignmentName string, assignmentOperationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "assignmentName": autorest.Encode("path", assignmentName), "assignmentOperationName": autorest.Encode("path", assignmentOperationName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -98,7 +97,7 @@ func (client AssignmentOperationsClient) GetPreparer(ctx context.Context, scope preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations/{assignmentOperationName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations/{assignmentOperationName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -122,14 +121,13 @@ func (client AssignmentOperationsClient) GetResponder(resp *http.Response) (resu return } -// List list operations for given blueprint assignment within a subscription. +// List list operations for given blueprint assignment within a subscription or a management group. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // assignmentName - name of the blueprint assignment. -func (client AssignmentOperationsClient) List(ctx context.Context, scope string, assignmentName string) (result AssignmentOperationListPage, err error) { +func (client AssignmentOperationsClient) List(ctx context.Context, resourceScope string, assignmentName string) (result AssignmentOperationListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationsClient.List") defer func() { @@ -141,7 +139,7 @@ func (client AssignmentOperationsClient) List(ctx context.Context, scope string, }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope, assignmentName) + req, err := client.ListPreparer(ctx, resourceScope, assignmentName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "List", nil, "Failure preparing request") return @@ -163,10 +161,10 @@ func (client AssignmentOperationsClient) List(ctx context.Context, scope string, } // ListPreparer prepares the List request. -func (client AssignmentOperationsClient) ListPreparer(ctx context.Context, scope string, assignmentName string) (*http.Request, error) { +func (client AssignmentOperationsClient) ListPreparer(ctx context.Context, resourceScope string, assignmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "assignmentName": autorest.Encode("path", assignmentName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -177,7 +175,7 @@ func (client AssignmentOperationsClient) ListPreparer(ctx context.Context, scope preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -223,7 +221,7 @@ func (client AssignmentOperationsClient) listNextResults(ctx context.Context, la } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AssignmentOperationsClient) ListComplete(ctx context.Context, scope string, assignmentName string) (result AssignmentOperationListIterator, err error) { +func (client AssignmentOperationsClient) ListComplete(ctx context.Context, resourceScope string, assignmentName string) (result AssignmentOperationListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationsClient.List") defer func() { @@ -234,6 +232,6 @@ func (client AssignmentOperationsClient) ListComplete(ctx context.Context, scope tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, scope, assignmentName) + result.page, err = client.List(ctx, resourceScope, assignmentName) return } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go index 5a713b58547f..7510379d963a 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go @@ -44,13 +44,12 @@ func NewAssignmentsClientWithBaseURI(baseURI string) AssignmentsClient { // CreateOrUpdate create or update a blueprint assignment. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // assignmentName - name of the blueprint assignment. // assignment - blueprint assignment object to save. -func (client AssignmentsClient) CreateOrUpdate(ctx context.Context, scope string, assignmentName string, assignment Assignment) (result Assignment, err error) { +func (client AssignmentsClient) CreateOrUpdate(ctx context.Context, resourceScope string, assignmentName string, assignment Assignment) (result Assignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.CreateOrUpdate") defer func() { @@ -71,7 +70,7 @@ func (client AssignmentsClient) CreateOrUpdate(ctx context.Context, scope string return result, validation.NewError("blueprint.AssignmentsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, scope, assignmentName, assignment) + req, err := client.CreateOrUpdatePreparer(ctx, resourceScope, assignmentName, assignment) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -93,10 +92,10 @@ func (client AssignmentsClient) CreateOrUpdate(ctx context.Context, scope string } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, assignmentName string, assignment Assignment) (*http.Request, error) { +func (client AssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceScope string, assignmentName string, assignment Assignment) (*http.Request, error) { pathParameters := map[string]interface{}{ "assignmentName": autorest.Encode("path", assignmentName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -108,7 +107,7 @@ func (client AssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, scop autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}", pathParameters), autorest.WithJSON(assignment), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -135,12 +134,11 @@ func (client AssignmentsClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete delete a blueprint assignment. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // assignmentName - name of the blueprint assignment. -func (client AssignmentsClient) Delete(ctx context.Context, scope string, assignmentName string) (result Assignment, err error) { +func (client AssignmentsClient) Delete(ctx context.Context, resourceScope string, assignmentName string) (result Assignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.Delete") defer func() { @@ -151,7 +149,7 @@ func (client AssignmentsClient) Delete(ctx context.Context, scope string, assign tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, scope, assignmentName) + req, err := client.DeletePreparer(ctx, resourceScope, assignmentName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentsClient", "Delete", nil, "Failure preparing request") return @@ -173,10 +171,10 @@ func (client AssignmentsClient) Delete(ctx context.Context, scope string, assign } // DeletePreparer prepares the Delete request. -func (client AssignmentsClient) DeletePreparer(ctx context.Context, scope string, assignmentName string) (*http.Request, error) { +func (client AssignmentsClient) DeletePreparer(ctx context.Context, resourceScope string, assignmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "assignmentName": autorest.Encode("path", assignmentName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -187,7 +185,7 @@ func (client AssignmentsClient) DeletePreparer(ctx context.Context, scope string preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -213,12 +211,11 @@ func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Ass // Get get a blueprint assignment. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // assignmentName - name of the blueprint assignment. -func (client AssignmentsClient) Get(ctx context.Context, scope string, assignmentName string) (result Assignment, err error) { +func (client AssignmentsClient) Get(ctx context.Context, resourceScope string, assignmentName string) (result Assignment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.Get") defer func() { @@ -229,7 +226,7 @@ func (client AssignmentsClient) Get(ctx context.Context, scope string, assignmen tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, assignmentName) + req, err := client.GetPreparer(ctx, resourceScope, assignmentName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentsClient", "Get", nil, "Failure preparing request") return @@ -251,10 +248,10 @@ func (client AssignmentsClient) Get(ctx context.Context, scope string, assignmen } // GetPreparer prepares the Get request. -func (client AssignmentsClient) GetPreparer(ctx context.Context, scope string, assignmentName string) (*http.Request, error) { +func (client AssignmentsClient) GetPreparer(ctx context.Context, resourceScope string, assignmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "assignmentName": autorest.Encode("path", assignmentName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -265,7 +262,7 @@ func (client AssignmentsClient) GetPreparer(ctx context.Context, scope string, a preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -289,13 +286,12 @@ func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assign return } -// List list blueprint assignments within a subscription. +// List list blueprint assignments within a subscription or a management group. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. -func (client AssignmentsClient) List(ctx context.Context, scope string) (result AssignmentListPage, err error) { +// '/subscriptions/{subscriptionId}'). +func (client AssignmentsClient) List(ctx context.Context, resourceScope string) (result AssignmentListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.List") defer func() { @@ -307,7 +303,7 @@ func (client AssignmentsClient) List(ctx context.Context, scope string) (result }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope) + req, err := client.ListPreparer(ctx, resourceScope) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentsClient", "List", nil, "Failure preparing request") return @@ -329,9 +325,9 @@ func (client AssignmentsClient) List(ctx context.Context, scope string) (result } // ListPreparer prepares the List request. -func (client AssignmentsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error) { +func (client AssignmentsClient) ListPreparer(ctx context.Context, resourceScope string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -342,7 +338,7 @@ func (client AssignmentsClient) ListPreparer(ctx context.Context, scope string) preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -388,7 +384,7 @@ func (client AssignmentsClient) listNextResults(ctx context.Context, lastResults } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AssignmentsClient) ListComplete(ctx context.Context, scope string) (result AssignmentListIterator, err error) { +func (client AssignmentsClient) ListComplete(ctx context.Context, resourceScope string) (result AssignmentListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.List") defer func() { @@ -399,18 +395,17 @@ func (client AssignmentsClient) ListComplete(ctx context.Context, scope string) tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, scope) + result.page, err = client.List(ctx, resourceScope) return } // WhoIsBlueprint get Blueprints service SPN objectId // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // assignmentName - name of the blueprint assignment. -func (client AssignmentsClient) WhoIsBlueprint(ctx context.Context, scope string, assignmentName string) (result WhoIsBlueprintContract, err error) { +func (client AssignmentsClient) WhoIsBlueprint(ctx context.Context, resourceScope string, assignmentName string) (result WhoIsBlueprintContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.WhoIsBlueprint") defer func() { @@ -421,7 +416,7 @@ func (client AssignmentsClient) WhoIsBlueprint(ctx context.Context, scope string tracing.EndSpan(ctx, sc, err) }() } - req, err := client.WhoIsBlueprintPreparer(ctx, scope, assignmentName) + req, err := client.WhoIsBlueprintPreparer(ctx, resourceScope, assignmentName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.AssignmentsClient", "WhoIsBlueprint", nil, "Failure preparing request") return @@ -443,10 +438,10 @@ func (client AssignmentsClient) WhoIsBlueprint(ctx context.Context, scope string } // WhoIsBlueprintPreparer prepares the WhoIsBlueprint request. -func (client AssignmentsClient) WhoIsBlueprintPreparer(ctx context.Context, scope string, assignmentName string) (*http.Request, error) { +func (client AssignmentsClient) WhoIsBlueprintPreparer(ctx context.Context, resourceScope string, assignmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "assignmentName": autorest.Encode("path", assignmentName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -457,7 +452,7 @@ func (client AssignmentsClient) WhoIsBlueprintPreparer(ctx context.Context, scop preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/WhoIsBlueprint", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/WhoIsBlueprint", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go index ac6a9e684e2e..69a2cf04a81f 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go @@ -24,63 +24,63 @@ import ( // BlueprintsClientAPI contains the set of methods on the BlueprintsClient type. type BlueprintsClientAPI interface { - CreateOrUpdate(ctx context.Context, scope string, blueprintName string, blueprint blueprint.Model) (result blueprint.Model, err error) - Delete(ctx context.Context, scope string, blueprintName string) (result blueprint.Model, err error) - Get(ctx context.Context, scope string, blueprintName string) (result blueprint.Model, err error) - List(ctx context.Context, scope string) (result blueprint.ListPage, err error) - ListComplete(ctx context.Context, scope string) (result blueprint.ListIterator, err error) + CreateOrUpdate(ctx context.Context, resourceScope string, blueprintName string, blueprint blueprint.Model) (result blueprint.Model, err error) + Delete(ctx context.Context, resourceScope string, blueprintName string) (result blueprint.Model, err error) + Get(ctx context.Context, resourceScope string, blueprintName string) (result blueprint.Model, err error) + List(ctx context.Context, resourceScope string) (result blueprint.ListPage, err error) + ListComplete(ctx context.Context, resourceScope string) (result blueprint.ListIterator, err error) } var _ BlueprintsClientAPI = (*blueprint.BlueprintsClient)(nil) // ArtifactsClientAPI contains the set of methods on the ArtifactsClient type. type ArtifactsClientAPI interface { - CreateOrUpdate(ctx context.Context, scope string, blueprintName string, artifactName string, artifact blueprint.BasicArtifact) (result blueprint.ArtifactModel, err error) - Delete(ctx context.Context, scope string, blueprintName string, artifactName string) (result blueprint.ArtifactModel, err error) - Get(ctx context.Context, scope string, blueprintName string, artifactName string) (result blueprint.ArtifactModel, err error) - List(ctx context.Context, scope string, blueprintName string) (result blueprint.ArtifactListPage, err error) - ListComplete(ctx context.Context, scope string, blueprintName string) (result blueprint.ArtifactListIterator, err error) + CreateOrUpdate(ctx context.Context, resourceScope string, blueprintName string, artifactName string, artifact blueprint.BasicArtifact) (result blueprint.ArtifactModel, err error) + Delete(ctx context.Context, resourceScope string, blueprintName string, artifactName string) (result blueprint.ArtifactModel, err error) + Get(ctx context.Context, resourceScope string, blueprintName string, artifactName string) (result blueprint.ArtifactModel, err error) + List(ctx context.Context, resourceScope string, blueprintName string) (result blueprint.ArtifactListPage, err error) + ListComplete(ctx context.Context, resourceScope string, blueprintName string) (result blueprint.ArtifactListIterator, err error) } var _ ArtifactsClientAPI = (*blueprint.ArtifactsClient)(nil) // PublishedBlueprintsClientAPI contains the set of methods on the PublishedBlueprintsClient type. type PublishedBlueprintsClientAPI interface { - Create(ctx context.Context, scope string, blueprintName string, versionID string, publishedBlueprint *blueprint.PublishedBlueprint) (result blueprint.PublishedBlueprint, err error) - Delete(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.PublishedBlueprint, err error) - Get(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.PublishedBlueprint, err error) - List(ctx context.Context, scope string, blueprintName string) (result blueprint.PublishedBlueprintListPage, err error) - ListComplete(ctx context.Context, scope string, blueprintName string) (result blueprint.PublishedBlueprintListIterator, err error) + Create(ctx context.Context, resourceScope string, blueprintName string, versionID string, publishedBlueprint *blueprint.PublishedBlueprint) (result blueprint.PublishedBlueprint, err error) + Delete(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result blueprint.PublishedBlueprint, err error) + Get(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result blueprint.PublishedBlueprint, err error) + List(ctx context.Context, resourceScope string, blueprintName string) (result blueprint.PublishedBlueprintListPage, err error) + ListComplete(ctx context.Context, resourceScope string, blueprintName string) (result blueprint.PublishedBlueprintListIterator, err error) } var _ PublishedBlueprintsClientAPI = (*blueprint.PublishedBlueprintsClient)(nil) // PublishedArtifactsClientAPI contains the set of methods on the PublishedArtifactsClient type. type PublishedArtifactsClientAPI interface { - Get(ctx context.Context, scope string, blueprintName string, versionID string, artifactName string) (result blueprint.ArtifactModel, err error) - List(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.ArtifactListPage, err error) - ListComplete(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.ArtifactListIterator, err error) + Get(ctx context.Context, resourceScope string, blueprintName string, versionID string, artifactName string) (result blueprint.ArtifactModel, err error) + List(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result blueprint.ArtifactListPage, err error) + ListComplete(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result blueprint.ArtifactListIterator, err error) } var _ PublishedArtifactsClientAPI = (*blueprint.PublishedArtifactsClient)(nil) // AssignmentsClientAPI contains the set of methods on the AssignmentsClient type. type AssignmentsClientAPI interface { - CreateOrUpdate(ctx context.Context, scope string, assignmentName string, assignment blueprint.Assignment) (result blueprint.Assignment, err error) - Delete(ctx context.Context, scope string, assignmentName string) (result blueprint.Assignment, err error) - Get(ctx context.Context, scope string, assignmentName string) (result blueprint.Assignment, err error) - List(ctx context.Context, scope string) (result blueprint.AssignmentListPage, err error) - ListComplete(ctx context.Context, scope string) (result blueprint.AssignmentListIterator, err error) - WhoIsBlueprint(ctx context.Context, scope string, assignmentName string) (result blueprint.WhoIsBlueprintContract, err error) + CreateOrUpdate(ctx context.Context, resourceScope string, assignmentName string, assignment blueprint.Assignment) (result blueprint.Assignment, err error) + Delete(ctx context.Context, resourceScope string, assignmentName string) (result blueprint.Assignment, err error) + Get(ctx context.Context, resourceScope string, assignmentName string) (result blueprint.Assignment, err error) + List(ctx context.Context, resourceScope string) (result blueprint.AssignmentListPage, err error) + ListComplete(ctx context.Context, resourceScope string) (result blueprint.AssignmentListIterator, err error) + WhoIsBlueprint(ctx context.Context, resourceScope string, assignmentName string) (result blueprint.WhoIsBlueprintContract, err error) } var _ AssignmentsClientAPI = (*blueprint.AssignmentsClient)(nil) // AssignmentOperationsClientAPI contains the set of methods on the AssignmentOperationsClient type. type AssignmentOperationsClientAPI interface { - Get(ctx context.Context, scope string, assignmentName string, assignmentOperationName string) (result blueprint.AssignmentOperation, err error) - List(ctx context.Context, scope string, assignmentName string) (result blueprint.AssignmentOperationListPage, err error) - ListComplete(ctx context.Context, scope string, assignmentName string) (result blueprint.AssignmentOperationListIterator, err error) + Get(ctx context.Context, resourceScope string, assignmentName string, assignmentOperationName string) (result blueprint.AssignmentOperation, err error) + List(ctx context.Context, resourceScope string, assignmentName string) (result blueprint.AssignmentOperationListPage, err error) + ListComplete(ctx context.Context, resourceScope string, assignmentName string) (result blueprint.AssignmentOperationListIterator, err error) } var _ AssignmentOperationsClientAPI = (*blueprint.AssignmentOperationsClient)(nil) diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go index 338792140f18..666f6d23920b 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go @@ -44,13 +44,12 @@ func NewBlueprintsClientWithBaseURI(baseURI string) BlueprintsClient { // CreateOrUpdate create or update a blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // blueprint - blueprint definition. -func (client BlueprintsClient) CreateOrUpdate(ctx context.Context, scope string, blueprintName string, blueprint Model) (result Model, err error) { +func (client BlueprintsClient) CreateOrUpdate(ctx context.Context, resourceScope string, blueprintName string, blueprint Model) (result Model, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlueprintsClient.CreateOrUpdate") defer func() { @@ -67,7 +66,7 @@ func (client BlueprintsClient) CreateOrUpdate(ctx context.Context, scope string, return result, validation.NewError("blueprint.BlueprintsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, scope, blueprintName, blueprint) + req, err := client.CreateOrUpdatePreparer(ctx, resourceScope, blueprintName, blueprint) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.BlueprintsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -89,10 +88,10 @@ func (client BlueprintsClient) CreateOrUpdate(ctx context.Context, scope string, } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BlueprintsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, blueprintName string, blueprint Model) (*http.Request, error) { +func (client BlueprintsClient) CreateOrUpdatePreparer(ctx context.Context, resourceScope string, blueprintName string, blueprint Model) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -104,7 +103,7 @@ func (client BlueprintsClient) CreateOrUpdatePreparer(ctx context.Context, scope autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}", pathParameters), autorest.WithJSON(blueprint), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -131,12 +130,11 @@ func (client BlueprintsClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete a blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. -func (client BlueprintsClient) Delete(ctx context.Context, scope string, blueprintName string) (result Model, err error) { +func (client BlueprintsClient) Delete(ctx context.Context, resourceScope string, blueprintName string) (result Model, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlueprintsClient.Delete") defer func() { @@ -147,7 +145,7 @@ func (client BlueprintsClient) Delete(ctx context.Context, scope string, bluepri tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, scope, blueprintName) + req, err := client.DeletePreparer(ctx, resourceScope, blueprintName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.BlueprintsClient", "Delete", nil, "Failure preparing request") return @@ -169,10 +167,10 @@ func (client BlueprintsClient) Delete(ctx context.Context, scope string, bluepri } // DeletePreparer prepares the Delete request. -func (client BlueprintsClient) DeletePreparer(ctx context.Context, scope string, blueprintName string) (*http.Request, error) { +func (client BlueprintsClient) DeletePreparer(ctx context.Context, resourceScope string, blueprintName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -183,7 +181,7 @@ func (client BlueprintsClient) DeletePreparer(ctx context.Context, scope string, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -209,12 +207,11 @@ func (client BlueprintsClient) DeleteResponder(resp *http.Response) (result Mode // Get get a blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. -func (client BlueprintsClient) Get(ctx context.Context, scope string, blueprintName string) (result Model, err error) { +func (client BlueprintsClient) Get(ctx context.Context, resourceScope string, blueprintName string) (result Model, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlueprintsClient.Get") defer func() { @@ -225,7 +222,7 @@ func (client BlueprintsClient) Get(ctx context.Context, scope string, blueprintN tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, blueprintName) + req, err := client.GetPreparer(ctx, resourceScope, blueprintName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.BlueprintsClient", "Get", nil, "Failure preparing request") return @@ -247,10 +244,10 @@ func (client BlueprintsClient) Get(ctx context.Context, scope string, blueprintN } // GetPreparer prepares the Get request. -func (client BlueprintsClient) GetPreparer(ctx context.Context, scope string, blueprintName string) (*http.Request, error) { +func (client BlueprintsClient) GetPreparer(ctx context.Context, resourceScope string, blueprintName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -261,7 +258,7 @@ func (client BlueprintsClient) GetPreparer(ctx context.Context, scope string, bl preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -287,11 +284,10 @@ func (client BlueprintsClient) GetResponder(resp *http.Response) (result Model, // List list blueprint definitions. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. -func (client BlueprintsClient) List(ctx context.Context, scope string) (result ListPage, err error) { +// '/subscriptions/{subscriptionId}'). +func (client BlueprintsClient) List(ctx context.Context, resourceScope string) (result ListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlueprintsClient.List") defer func() { @@ -303,7 +299,7 @@ func (client BlueprintsClient) List(ctx context.Context, scope string) (result L }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope) + req, err := client.ListPreparer(ctx, resourceScope) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.BlueprintsClient", "List", nil, "Failure preparing request") return @@ -325,9 +321,9 @@ func (client BlueprintsClient) List(ctx context.Context, scope string) (result L } // ListPreparer prepares the List request. -func (client BlueprintsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error) { +func (client BlueprintsClient) ListPreparer(ctx context.Context, resourceScope string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -338,7 +334,7 @@ func (client BlueprintsClient) ListPreparer(ctx context.Context, scope string) ( preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -384,7 +380,7 @@ func (client BlueprintsClient) listNextResults(ctx context.Context, lastResults } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BlueprintsClient) ListComplete(ctx context.Context, scope string) (result ListIterator, err error) { +func (client BlueprintsClient) ListComplete(ctx context.Context, resourceScope string) (result ListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlueprintsClient.List") defer func() { @@ -395,6 +391,6 @@ func (client BlueprintsClient) ListComplete(ctx context.Context, scope string) ( tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, scope) + result.page, err = client.List(ctx, resourceScope) return } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go index d011a23add81..28b29e6448ce 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go @@ -1000,6 +1000,8 @@ type AssignmentOperationProperties struct { type AssignmentProperties struct { // BlueprintID - ID of the published version of a blueprint definition. BlueprintID *string `json:"blueprintId,omitempty"` + // Scope - The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required. + Scope *string `json:"scope,omitempty"` // Parameters - Blueprint assignment parameter values. Parameters map[string]*ParameterValue `json:"parameters"` // ResourceGroups - Names and locations of resource group placeholders. @@ -1022,6 +1024,9 @@ func (ap AssignmentProperties) MarshalJSON() ([]byte, error) { if ap.BlueprintID != nil { objectMap["blueprintId"] = ap.BlueprintID } + if ap.Scope != nil { + objectMap["scope"] = ap.Scope + } if ap.Parameters != nil { objectMap["parameters"] = ap.Parameters } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go index ccc7bf644eb7..4f93ed064ec2 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go @@ -44,14 +44,13 @@ func NewPublishedArtifactsClientWithBaseURI(baseURI string) PublishedArtifactsCl // Get get an artifact for a published blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // versionID - version of the published blueprint definition. // artifactName - name of the blueprint artifact. -func (client PublishedArtifactsClient) Get(ctx context.Context, scope string, blueprintName string, versionID string, artifactName string) (result ArtifactModel, err error) { +func (client PublishedArtifactsClient) Get(ctx context.Context, resourceScope string, blueprintName string, versionID string, artifactName string) (result ArtifactModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedArtifactsClient.Get") defer func() { @@ -62,7 +61,7 @@ func (client PublishedArtifactsClient) Get(ctx context.Context, scope string, bl tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, blueprintName, versionID, artifactName) + req, err := client.GetPreparer(ctx, resourceScope, blueprintName, versionID, artifactName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.PublishedArtifactsClient", "Get", nil, "Failure preparing request") return @@ -84,11 +83,11 @@ func (client PublishedArtifactsClient) Get(ctx context.Context, scope string, bl } // GetPreparer prepares the Get request. -func (client PublishedArtifactsClient) GetPreparer(ctx context.Context, scope string, blueprintName string, versionID string, artifactName string) (*http.Request, error) { +func (client PublishedArtifactsClient) GetPreparer(ctx context.Context, resourceScope string, blueprintName string, versionID string, artifactName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "artifactName": autorest.Encode("path", artifactName), "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, "versionId": autorest.Encode("path", versionID), } @@ -100,7 +99,7 @@ func (client PublishedArtifactsClient) GetPreparer(ctx context.Context, scope st preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts/{artifactName}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts/{artifactName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -126,13 +125,12 @@ func (client PublishedArtifactsClient) GetResponder(resp *http.Response) (result // List list artifacts for a version of a published blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // versionID - version of the published blueprint definition. -func (client PublishedArtifactsClient) List(ctx context.Context, scope string, blueprintName string, versionID string) (result ArtifactListPage, err error) { +func (client PublishedArtifactsClient) List(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result ArtifactListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedArtifactsClient.List") defer func() { @@ -144,7 +142,7 @@ func (client PublishedArtifactsClient) List(ctx context.Context, scope string, b }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope, blueprintName, versionID) + req, err := client.ListPreparer(ctx, resourceScope, blueprintName, versionID) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.PublishedArtifactsClient", "List", nil, "Failure preparing request") return @@ -166,10 +164,10 @@ func (client PublishedArtifactsClient) List(ctx context.Context, scope string, b } // ListPreparer prepares the List request. -func (client PublishedArtifactsClient) ListPreparer(ctx context.Context, scope string, blueprintName string, versionID string) (*http.Request, error) { +func (client PublishedArtifactsClient) ListPreparer(ctx context.Context, resourceScope string, blueprintName string, versionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, "versionId": autorest.Encode("path", versionID), } @@ -181,7 +179,7 @@ func (client PublishedArtifactsClient) ListPreparer(ctx context.Context, scope s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -227,7 +225,7 @@ func (client PublishedArtifactsClient) listNextResults(ctx context.Context, last } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublishedArtifactsClient) ListComplete(ctx context.Context, scope string, blueprintName string, versionID string) (result ArtifactListIterator, err error) { +func (client PublishedArtifactsClient) ListComplete(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result ArtifactListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedArtifactsClient.List") defer func() { @@ -238,6 +236,6 @@ func (client PublishedArtifactsClient) ListComplete(ctx context.Context, scope s tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, scope, blueprintName, versionID) + result.page, err = client.List(ctx, resourceScope, blueprintName, versionID) return } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go index 54425b02c2ce..a6402d647eec 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go @@ -46,14 +46,13 @@ func NewPublishedBlueprintsClientWithBaseURI(baseURI string) PublishedBlueprints // Create publish a new version of the blueprint definition with the latest artifacts. Published blueprint definitions // are immutable. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // versionID - version of the published blueprint definition. // publishedBlueprint - published Blueprint to create or update. -func (client PublishedBlueprintsClient) Create(ctx context.Context, scope string, blueprintName string, versionID string, publishedBlueprint *PublishedBlueprint) (result PublishedBlueprint, err error) { +func (client PublishedBlueprintsClient) Create(ctx context.Context, resourceScope string, blueprintName string, versionID string, publishedBlueprint *PublishedBlueprint) (result PublishedBlueprint, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedBlueprintsClient.Create") defer func() { @@ -75,7 +74,7 @@ func (client PublishedBlueprintsClient) Create(ctx context.Context, scope string return result, validation.NewError("blueprint.PublishedBlueprintsClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, scope, blueprintName, versionID, publishedBlueprint) + req, err := client.CreatePreparer(ctx, resourceScope, blueprintName, versionID, publishedBlueprint) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.PublishedBlueprintsClient", "Create", nil, "Failure preparing request") return @@ -97,10 +96,10 @@ func (client PublishedBlueprintsClient) Create(ctx context.Context, scope string } // CreatePreparer prepares the Create request. -func (client PublishedBlueprintsClient) CreatePreparer(ctx context.Context, scope string, blueprintName string, versionID string, publishedBlueprint *PublishedBlueprint) (*http.Request, error) { +func (client PublishedBlueprintsClient) CreatePreparer(ctx context.Context, resourceScope string, blueprintName string, versionID string, publishedBlueprint *PublishedBlueprint) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, "versionId": autorest.Encode("path", versionID), } @@ -113,7 +112,7 @@ func (client PublishedBlueprintsClient) CreatePreparer(ctx context.Context, scop autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) if publishedBlueprint != nil { preparer = autorest.DecoratePreparer(preparer, @@ -143,13 +142,12 @@ func (client PublishedBlueprintsClient) CreateResponder(resp *http.Response) (re // Delete delete a published version of a blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // versionID - version of the published blueprint definition. -func (client PublishedBlueprintsClient) Delete(ctx context.Context, scope string, blueprintName string, versionID string) (result PublishedBlueprint, err error) { +func (client PublishedBlueprintsClient) Delete(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result PublishedBlueprint, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedBlueprintsClient.Delete") defer func() { @@ -160,7 +158,7 @@ func (client PublishedBlueprintsClient) Delete(ctx context.Context, scope string tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, scope, blueprintName, versionID) + req, err := client.DeletePreparer(ctx, resourceScope, blueprintName, versionID) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.PublishedBlueprintsClient", "Delete", nil, "Failure preparing request") return @@ -182,10 +180,10 @@ func (client PublishedBlueprintsClient) Delete(ctx context.Context, scope string } // DeletePreparer prepares the Delete request. -func (client PublishedBlueprintsClient) DeletePreparer(ctx context.Context, scope string, blueprintName string, versionID string) (*http.Request, error) { +func (client PublishedBlueprintsClient) DeletePreparer(ctx context.Context, resourceScope string, blueprintName string, versionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, "versionId": autorest.Encode("path", versionID), } @@ -197,7 +195,7 @@ func (client PublishedBlueprintsClient) DeletePreparer(ctx context.Context, scop preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -223,13 +221,12 @@ func (client PublishedBlueprintsClient) DeleteResponder(resp *http.Response) (re // Get get a published version of a blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. // versionID - version of the published blueprint definition. -func (client PublishedBlueprintsClient) Get(ctx context.Context, scope string, blueprintName string, versionID string) (result PublishedBlueprint, err error) { +func (client PublishedBlueprintsClient) Get(ctx context.Context, resourceScope string, blueprintName string, versionID string) (result PublishedBlueprint, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedBlueprintsClient.Get") defer func() { @@ -240,7 +237,7 @@ func (client PublishedBlueprintsClient) Get(ctx context.Context, scope string, b tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, scope, blueprintName, versionID) + req, err := client.GetPreparer(ctx, resourceScope, blueprintName, versionID) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.PublishedBlueprintsClient", "Get", nil, "Failure preparing request") return @@ -262,10 +259,10 @@ func (client PublishedBlueprintsClient) Get(ctx context.Context, scope string, b } // GetPreparer prepares the Get request. -func (client PublishedBlueprintsClient) GetPreparer(ctx context.Context, scope string, blueprintName string, versionID string) (*http.Request, error) { +func (client PublishedBlueprintsClient) GetPreparer(ctx context.Context, resourceScope string, blueprintName string, versionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, "versionId": autorest.Encode("path", versionID), } @@ -277,7 +274,7 @@ func (client PublishedBlueprintsClient) GetPreparer(ctx context.Context, scope s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -303,12 +300,11 @@ func (client PublishedBlueprintsClient) GetResponder(resp *http.Response) (resul // List list published versions of given blueprint definition. // Parameters: -// scope - the scope of the resource. Valid scopes are: management group (format: +// resourceScope - the scope of the resource. Valid scopes are: management group (format: // '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: -// '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future -// use. +// '/subscriptions/{subscriptionId}'). // blueprintName - name of the blueprint definition. -func (client PublishedBlueprintsClient) List(ctx context.Context, scope string, blueprintName string) (result PublishedBlueprintListPage, err error) { +func (client PublishedBlueprintsClient) List(ctx context.Context, resourceScope string, blueprintName string) (result PublishedBlueprintListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedBlueprintsClient.List") defer func() { @@ -320,7 +316,7 @@ func (client PublishedBlueprintsClient) List(ctx context.Context, scope string, }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope, blueprintName) + req, err := client.ListPreparer(ctx, resourceScope, blueprintName) if err != nil { err = autorest.NewErrorWithError(err, "blueprint.PublishedBlueprintsClient", "List", nil, "Failure preparing request") return @@ -342,10 +338,10 @@ func (client PublishedBlueprintsClient) List(ctx context.Context, scope string, } // ListPreparer prepares the List request. -func (client PublishedBlueprintsClient) ListPreparer(ctx context.Context, scope string, blueprintName string) (*http.Request, error) { +func (client PublishedBlueprintsClient) ListPreparer(ctx context.Context, resourceScope string, blueprintName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "blueprintName": autorest.Encode("path", blueprintName), - "scope": scope, + "resourceScope": resourceScope, } const APIVersion = "2018-11-01-preview" @@ -356,7 +352,7 @@ func (client PublishedBlueprintsClient) ListPreparer(ctx context.Context, scope preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions", pathParameters), + autorest.WithPathParameters("/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -402,7 +398,7 @@ func (client PublishedBlueprintsClient) listNextResults(ctx context.Context, las } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublishedBlueprintsClient) ListComplete(ctx context.Context, scope string, blueprintName string) (result PublishedBlueprintListIterator, err error) { +func (client PublishedBlueprintsClient) ListComplete(ctx context.Context, resourceScope string, blueprintName string) (result PublishedBlueprintListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublishedBlueprintsClient.List") defer func() { @@ -413,6 +409,6 @@ func (client PublishedBlueprintsClient) ListComplete(ctx context.Context, scope tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, scope, blueprintName) + result.page, err = client.List(ctx, resourceScope, blueprintName) return } From 578a0daac6c5a793d41994f778ea0118b81da28b Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 21 Apr 2020 14:23:05 +0000 Subject: [PATCH 2/2] Generated from 4ba0ed6870636fb3bc6434657b4f0cfff8c08d25 prettify --- .../blueprint/mgmt/2018-11-01-preview/blueprint/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/version.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/version.go index f741ba4ddfcb..50c8eb743b54 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/version.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " blueprint/2018-11-01-preview" + return "Azure-SDK-For-Go/" + Version() + " blueprint/2018-11-01-preview" } // Version returns the semantic version (see http://semver.org) of the client.