diff --git a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md index 34d3245f6145..c46e9df35fd9 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md +++ b/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md @@ -1,5 +1,33 @@ # Release History +## 1.1.0-beta.3 (2023-02-14) +### Breaking Changes + +- Type of `BindingResourceProperties.BindingParameters` has been changed from `map[string]interface{}` to `map[string]*string` + +### Features Added + +- New function `*BuildpackBindingClient.NewListForClusterPager(string, string, *BuildpackBindingClientListForClusterOptions) *runtime.Pager[BuildpackBindingClientListForClusterResponse]` +- New function `*GatewaysClient.BeginUpdateCapacity(context.Context, string, string, string, SKUObject, *GatewaysClientBeginUpdateCapacityOptions) (*runtime.Poller[GatewaysClientUpdateCapacityResponse], error)` +- New struct `BuildpackBindingClientListForClusterResponse` +- New struct `CustomScaleRule` +- New struct `GatewaysClientUpdateCapacityResponse` +- New struct `HTTPScaleRule` +- New struct `QueueScaleRule` +- New struct `SKUObject` +- New struct `Scale` +- New struct `ScaleRule` +- New struct `ScaleRuleAuth` +- New struct `Secret` +- New struct `TCPScaleRule` +- New field `Secrets` in struct `AppResourceProperties` +- New field `EnableSubPath` in struct `AzureFileVolume` +- New field `InfraResourceGroup` in struct `ClusterResourceProperties` +- New field `ManagedEnvironmentID` in struct `ClusterResourceProperties` +- New field `EnableSubPath` in struct `CustomPersistentDiskProperties` +- New field `Scale` in struct `DeploymentSettings` + + ## 1.1.0-beta.2 (2022-11-09) ### Features Added diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go index df8586cf31e1..9ee0a6a3a2ae 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client.go @@ -32,10 +32,10 @@ type APIPortalCustomDomainsClient struct { } // NewAPIPortalCustomDomainsClient creates a new instance of APIPortalCustomDomainsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAPIPortalCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalCustomDomainsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewAPIPortalCustomDomainsClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Create or update the API portal custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// domainName - The name of the API portal custom domain. -// apiPortalCustomDomainResource - The API portal custom domain for the create or update operation -// options - APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - domainName - The name of the API portal custom domain. +// - apiPortalCustomDomainResource - The API portal custom domain for the create or update operation +// - options - APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate +// method. func (client *APIPortalCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) @@ -81,7 +82,8 @@ func (client *APIPortalCustomDomainsClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - Create or update the API portal custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *APIPortalCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, apiPortalCustomDomainResource) @@ -133,14 +135,15 @@ func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - Delete the API portal custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// domainName - The name of the API portal custom domain. -// options - APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - domainName - The name of the API portal custom domain. +// - options - APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete +// method. func (client *APIPortalCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) @@ -155,7 +158,8 @@ func (client *APIPortalCustomDomainsClient) BeginDelete(ctx context.Context, res // Delete - Delete the API portal custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *APIPortalCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) if err != nil { @@ -199,7 +203,7 @@ func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,14 +211,15 @@ func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Cont // Get - Get the API portal custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// domainName - The name of the API portal custom domain. -// options - APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - domainName - The name of the API portal custom domain. +// - options - APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get +// method. func (client *APIPortalCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) if err != nil { @@ -258,7 +263,7 @@ func (client *APIPortalCustomDomainsClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,13 +279,14 @@ func (client *APIPortalCustomDomainsClient) getHandleResponse(resp *http.Respons } // NewListPager - Handle requests to list all API portal custom domains. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// options - APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - options - APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager +// method. func (client *APIPortalCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[APIPortalCustomDomainsClientListResponse]{ More: func(page APIPortalCustomDomainsClientListResponse) bool { @@ -333,7 +339,7 @@ func (client *APIPortalCustomDomainsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go deleted file mode 100644 index 358a94825cf2..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportalcustomdomains_client_example_test.go +++ /dev/null @@ -1,109 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_Get.json -func ExampleAPIPortalCustomDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_CreateOrUpdate.json -func ExampleAPIPortalCustomDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "myDomainName", armappplatform.APIPortalCustomDomainResource{ - Properties: &armappplatform.APIPortalCustomDomainProperties{ - Thumbprint: to.Ptr("*"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_Delete.json -func ExampleAPIPortalCustomDomainsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortalCustomDomains_List.json -func ExampleAPIPortalCustomDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go index a25228831145..e5323feb7154 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client.go @@ -32,10 +32,10 @@ type APIPortalsClient struct { } // NewAPIPortalsClient creates a new instance of APIPortalsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAPIPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewAPIPortalsClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Create the default API portal or update the existing API portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// apiPortalResource - The API portal for the create or update operation -// options - APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - apiPortalResource - The API portal for the create or update operation +// - options - APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate +// method. func (client *APIPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) @@ -80,7 +81,8 @@ func (client *APIPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Create the default API portal or update the existing API portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *APIPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *APIPortalsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, apiPortalResource) @@ -128,12 +130,13 @@ func (client *APIPortalsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete the default API portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// options - APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - options - APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. func (client *APIPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, options) @@ -148,7 +151,8 @@ func (client *APIPortalsClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete the default API portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *APIPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) if err != nil { @@ -188,7 +192,7 @@ func (client *APIPortalsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *APIPortalsClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get the API portal and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// options - APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - options - APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. func (client *APIPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) if err != nil { @@ -241,7 +246,7 @@ func (client *APIPortalsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,12 @@ func (client *APIPortalsClient) getHandleResponse(resp *http.Response) (APIPorta } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. func (client *APIPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[APIPortalsClientListResponse]{ More: func(page APIPortalsClientListResponse) bool { @@ -310,7 +316,7 @@ func (client *APIPortalsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,14 +333,15 @@ func (client *APIPortalsClient) listHandleResponse(resp *http.Response) (APIPort // ValidateDomain - Check the domains are valid as well as not in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// validatePayload - Custom domain payload to be validated -// options - APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - validatePayload - Custom domain payload to be validated +// - options - APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain +// method. func (client *APIPortalsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error) { req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, validatePayload, options) if err != nil { @@ -374,7 +381,7 @@ func (client *APIPortalsClient) validateDomainCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validatePayload) diff --git a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go deleted file mode 100644 index e148b53d1e33..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apiportals_client_example_test.go +++ /dev/null @@ -1,137 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_Get.json -func ExampleAPIPortalsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_CreateOrUpdate.json -func ExampleAPIPortalsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.APIPortalResource{ - Properties: &armappplatform.APIPortalProperties{ - GatewayIDs: []*string{ - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")}, - Public: to.Ptr(true), - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_Delete.json -func ExampleAPIPortalsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_List.json -func ExampleAPIPortalsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApiPortals_ValidateDomain.json -func ExampleAPIPortalsClient_ValidateDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAPIPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ValidateDomain(ctx, "myResourceGroup", "myservice", "default", armappplatform.CustomDomainValidatePayload{ - Name: to.Ptr("mydomain.io"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go index 81e797706a0a..2848511e291b 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client.go @@ -32,10 +32,10 @@ type ApplicationAcceleratorsClient struct { } // NewApplicationAcceleratorsClient creates a new instance of ApplicationAcceleratorsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationAcceleratorsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewApplicationAcceleratorsClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Create or update the application accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// applicationAcceleratorResource - The application accelerator for the create or update operation -// options - ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - applicationAcceleratorResource - The application accelerator for the create or update operation +// - options - ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate +// method. func (client *ApplicationAcceleratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationAcceleratorsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options) @@ -80,7 +81,8 @@ func (client *ApplicationAcceleratorsClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Create or update the application accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ApplicationAcceleratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *ApplicationAcceleratorsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, applicationAcceleratorResource) @@ -128,13 +130,14 @@ func (client *ApplicationAcceleratorsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Delete the application accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// options - ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete +// method. func (client *ApplicationAcceleratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[ApplicationAcceleratorsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) @@ -149,7 +152,8 @@ func (client *ApplicationAcceleratorsClient) BeginDelete(ctx context.Context, re // Delete - Delete the application accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ApplicationAcceleratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) if err != nil { @@ -189,7 +193,7 @@ func (client *ApplicationAcceleratorsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,13 +201,14 @@ func (client *ApplicationAcceleratorsClient) deleteCreateRequest(ctx context.Con // Get - Get the application accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// options - ApplicationAcceleratorsClientGetOptions contains the optional parameters for the ApplicationAcceleratorsClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - ApplicationAcceleratorsClientGetOptions contains the optional parameters for the ApplicationAcceleratorsClient.Get +// method. func (client *ApplicationAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientGetOptions) (ApplicationAcceleratorsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) if err != nil { @@ -243,7 +248,7 @@ func (client *ApplicationAcceleratorsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,12 +264,13 @@ func (client *ApplicationAcceleratorsClient) getHandleResponse(resp *http.Respon } // NewListPager - Handle requests to list all application accelerator. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.NewListPager +// method. func (client *ApplicationAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, options *ApplicationAcceleratorsClientListOptions) *runtime.Pager[ApplicationAcceleratorsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationAcceleratorsClientListResponse]{ More: func(page ApplicationAcceleratorsClientListResponse) bool { @@ -313,7 +319,7 @@ func (client *ApplicationAcceleratorsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go deleted file mode 100644 index 3b995ac77654..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationaccelerators_client_example_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_List.json -func ExampleApplicationAcceleratorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_Get.json -func ExampleApplicationAcceleratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_CreateOrUpdate.json -func ExampleApplicationAcceleratorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ApplicationAcceleratorResource{ - Properties: &armappplatform.ApplicationAcceleratorProperties{}, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationAccelerators_Delete.json -func ExampleApplicationAcceleratorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go b/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go index 2ff426c6ed4f..aacb37e560c1 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client.go @@ -32,10 +32,10 @@ type ApplicationLiveViewsClient struct { } // NewApplicationLiveViewsClient creates a new instance of ApplicationLiveViewsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationLiveViewsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationLiveViewsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewApplicationLiveViewsClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Create the default Application Live View or update the existing Application Live View. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationLiveViewName - The name of Application Live View. -// applicationLiveViewResource - Parameters for the update operation -// options - ApplicationLiveViewsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationLiveViewName - The name of Application Live View. +// - applicationLiveViewResource - Parameters for the update operation +// - options - ApplicationLiveViewsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginCreateOrUpdate +// method. func (client *ApplicationLiveViewsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationLiveViewsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options) @@ -80,7 +81,8 @@ func (client *ApplicationLiveViewsClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create the default Application Live View or update the existing Application Live View. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ApplicationLiveViewsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *ApplicationLiveViewsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, applicationLiveViewResource) @@ -128,13 +130,14 @@ func (client *ApplicationLiveViewsClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Disable the default Application Live View. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationLiveViewName - The name of Application Live View. -// options - ApplicationLiveViewsClientBeginDeleteOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationLiveViewName - The name of Application Live View. +// - options - ApplicationLiveViewsClientBeginDeleteOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginDelete +// method. func (client *ApplicationLiveViewsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*runtime.Poller[ApplicationLiveViewsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) @@ -149,7 +152,8 @@ func (client *ApplicationLiveViewsClient) BeginDelete(ctx context.Context, resou // Delete - Disable the default Application Live View. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ApplicationLiveViewsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) if err != nil { @@ -189,7 +193,7 @@ func (client *ApplicationLiveViewsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,13 +201,14 @@ func (client *ApplicationLiveViewsClient) deleteCreateRequest(ctx context.Contex // Get - Get the Application Live and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationLiveViewName - The name of Application Live View. -// options - ApplicationLiveViewsClientGetOptions contains the optional parameters for the ApplicationLiveViewsClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationLiveViewName - The name of Application Live View. +// - options - ApplicationLiveViewsClientGetOptions contains the optional parameters for the ApplicationLiveViewsClient.Get +// method. func (client *ApplicationLiveViewsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientGetOptions) (ApplicationLiveViewsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) if err != nil { @@ -243,7 +248,7 @@ func (client *ApplicationLiveViewsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,12 +264,13 @@ func (client *ApplicationLiveViewsClient) getHandleResponse(resp *http.Response) } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.NewListPager +// method. func (client *ApplicationLiveViewsClient) NewListPager(resourceGroupName string, serviceName string, options *ApplicationLiveViewsClientListOptions) *runtime.Pager[ApplicationLiveViewsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationLiveViewsClientListResponse]{ More: func(page ApplicationLiveViewsClientListResponse) bool { @@ -313,7 +319,7 @@ func (client *ApplicationLiveViewsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go deleted file mode 100644 index 1ebe46052ba7..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/applicationliveviews_client_example_test.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveViews_List.json -func ExampleApplicationLiveViewsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveViews_Get.json -func ExampleApplicationLiveViewsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveViews_CreateOrUpdate.json -func ExampleApplicationLiveViewsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ApplicationLiveViewResource{ - Properties: &armappplatform.ApplicationLiveViewProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ApplicationLiveView_Delete.json -func ExampleApplicationLiveViewsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewApplicationLiveViewsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/apps_client.go b/sdk/resourcemanager/appplatform/armappplatform/apps_client.go index 8b4c504847d7..851b2b1484aa 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/apps_client.go @@ -32,10 +32,10 @@ type AppsClient struct { } // NewAppsClient creates a new instance of AppsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCreateOrUpdate - Create a new App or update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// appResource - Parameters for the create or update operation -// options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - appResource - Parameters for the create or update operation +// - options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate +// method. func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AppsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, appResource, options) @@ -80,7 +81,8 @@ func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Create a new App or update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *AppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appResource) @@ -128,12 +130,13 @@ func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resou // BeginDelete - Operation to delete an App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*runtime.Poller[AppsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, options) @@ -148,7 +151,8 @@ func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Operation to delete an App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *AppsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, options) if err != nil { @@ -188,7 +192,7 @@ func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Get an App and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. func (client *AppsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (AppsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, options) if err != nil { @@ -241,7 +246,7 @@ func (client *AppsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") if options != nil && options.SyncStatus != nil { reqQP.Set("syncStatus", *options.SyncStatus) } @@ -261,13 +266,14 @@ func (client *AppsClient) getHandleResponse(resp *http.Response) (AppsClientGetR // GetResourceUploadURL - Get an resource upload URL for an App, which may be artifacts or source archive. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL +// method. func (client *AppsClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (AppsClientGetResourceUploadURLResponse, error) { req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, appName, options) if err != nil { @@ -307,7 +313,7 @@ func (client *AppsClient) getResourceUploadURLCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,11 +329,12 @@ func (client *AppsClient) getResourceUploadURLHandleResponse(resp *http.Response } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - AppsClientListOptions contains the optional parameters for the AppsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. func (client *AppsClient) NewListPager(resourceGroupName string, serviceName string, options *AppsClientListOptions) *runtime.Pager[AppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AppsClientListResponse]{ More: func(page AppsClientListResponse) bool { @@ -376,7 +383,7 @@ func (client *AppsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -393,14 +400,15 @@ func (client *AppsClient) listHandleResponse(resp *http.Response) (AppsClientLis // BeginSetActiveDeployments - Set existing Deployment under the app as active // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// activeDeploymentCollection - A list of Deployment name to be active. -// options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - activeDeploymentCollection - A list of Deployment name to be active. +// - options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments +// method. func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*runtime.Poller[AppsClientSetActiveDeploymentsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.setActiveDeployments(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) @@ -415,7 +423,8 @@ func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourc // SetActiveDeployments - Set existing Deployment under the app as active // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *AppsClient) setActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*http.Response, error) { req, err := client.setActiveDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) if err != nil { @@ -455,7 +464,7 @@ func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, activeDeploymentCollection) @@ -463,13 +472,14 @@ func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, // BeginUpdate - Operation to update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// appResource - Parameters for the update operation -// options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - appResource - Parameters for the update operation +// - options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*runtime.Poller[AppsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, appResource, options) @@ -484,7 +494,8 @@ func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Operation to update an exiting App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *AppsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) if err != nil { @@ -524,7 +535,7 @@ func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appResource) @@ -532,13 +543,14 @@ func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroup // ValidateDomain - Check the resource name is valid as well as not in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// validatePayload - Custom domain payload to be validated -// options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - validatePayload - Custom domain payload to be validated +// - options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. func (client *AppsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (AppsClientValidateDomainResponse, error) { req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, appName, validatePayload, options) if err != nil { @@ -578,7 +590,7 @@ func (client *AppsClient) validateDomainCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validatePayload) diff --git a/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go deleted file mode 100644 index 292a9ad2d431..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/apps_client_example_test.go +++ /dev/null @@ -1,459 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Get.json -func ExampleAppsClient_Get_appsGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", &armappplatform.AppsClientGetOptions{SyncStatus: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Get_VNetInjection.json -func ExampleAppsClient_Get_appsGetVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", &armappplatform.AppsClientGetOptions{SyncStatus: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_CreateOrUpdate.json -func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ - Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armappplatform.AppResourceProperties{ - AddonConfigs: map[string]map[string]interface{}{ - "ApplicationConfigurationService": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs", - }, - "ServiceRegistry": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry", - }, - }, - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{ - to.Ptr("uid=0"), - to.Ptr("gid=0"), - to.Ptr("dir_mode=0777"), - to.Ptr("file_mode=0777")}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, - EnableEndToEndTLS: to.Ptr(false), - HTTPSOnly: to.Ptr(false), - LoadedCertificates: []*armappplatform.LoadedCertificate{ - { - LoadTrustStore: to.Ptr(false), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - }, - { - LoadTrustStore: to.Ptr(true), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - }}, - PersistentDisk: &armappplatform.PersistentDisk{ - MountPath: to.Ptr("/mypersistentdisk"), - SizeInGB: to.Ptr[int32](2), - }, - Public: to.Ptr(true), - TemporaryDisk: &armappplatform.TemporaryDisk{ - MountPath: to.Ptr("/mytemporarydisk"), - SizeInGB: to.Ptr[int32](2), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_CreateOrUpdate_VNetInjection.json -func ExampleAppsClient_BeginCreateOrUpdate_appsCreateOrUpdateVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ - Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armappplatform.AppResourceProperties{ - AddonConfigs: map[string]map[string]interface{}{ - "ApplicationConfigurationService": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs", - }, - "ServiceRegistry": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry", - }, - }, - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{ - to.Ptr("uid=0"), - to.Ptr("gid=0"), - to.Ptr("dir_mode=0777"), - to.Ptr("file_mode=0777")}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, - EnableEndToEndTLS: to.Ptr(false), - HTTPSOnly: to.Ptr(false), - LoadedCertificates: []*armappplatform.LoadedCertificate{ - { - LoadTrustStore: to.Ptr(false), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"), - }, - { - LoadTrustStore: to.Ptr(true), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"), - }}, - PersistentDisk: &armappplatform.PersistentDisk{ - MountPath: to.Ptr("/mypersistentdisk"), - SizeInGB: to.Ptr[int32](2), - }, - Public: to.Ptr(true), - TemporaryDisk: &armappplatform.TemporaryDisk{ - MountPath: to.Ptr("/mytemporarydisk"), - SizeInGB: to.Ptr[int32](2), - }, - VnetAddons: &armappplatform.AppVNetAddons{ - PublicEndpoint: to.Ptr(true), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Delete.json -func ExampleAppsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Update.json -func ExampleAppsClient_BeginUpdate_appsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ - Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armappplatform.AppResourceProperties{ - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, - EnableEndToEndTLS: to.Ptr(false), - HTTPSOnly: to.Ptr(false), - PersistentDisk: &armappplatform.PersistentDisk{ - MountPath: to.Ptr("/mypersistentdisk"), - SizeInGB: to.Ptr[int32](2), - }, - Public: to.Ptr(true), - TemporaryDisk: &armappplatform.TemporaryDisk{ - MountPath: to.Ptr("/mytemporarydisk"), - SizeInGB: to.Ptr[int32](2), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_Update_VNetInjection.json -func ExampleAppsClient_BeginUpdate_appsUpdateVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{ - Identity: &armappplatform.ManagedIdentityProperties{ - Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armappplatform.UserAssignedManagedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armappplatform.AppResourceProperties{ - CustomPersistentDisks: []*armappplatform.CustomPersistentDiskResource{ - { - CustomPersistentDiskProperties: &armappplatform.AzureFileVolume{ - Type: to.Ptr(armappplatform.TypeAzureFileVolume), - MountOptions: []*string{}, - MountPath: to.Ptr("/mypath1/mypath2"), - ShareName: to.Ptr("myFileShare"), - }, - StorageID: to.Ptr("myASCStorageID"), - }}, - EnableEndToEndTLS: to.Ptr(false), - HTTPSOnly: to.Ptr(false), - PersistentDisk: &armappplatform.PersistentDisk{ - MountPath: to.Ptr("/mypersistentdisk"), - SizeInGB: to.Ptr[int32](2), - }, - Public: to.Ptr(true), - TemporaryDisk: &armappplatform.TemporaryDisk{ - MountPath: to.Ptr("/mytemporarydisk"), - SizeInGB: to.Ptr[int32](2), - }, - VnetAddons: &armappplatform.AppVNetAddons{ - PublicEndpoint: to.Ptr(true), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_List.json -func ExampleAppsClient_NewListPager_appsList() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_List_VNetInjection.json -func ExampleAppsClient_NewListPager_appsListVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_GetResourceUploadUrl.json -func ExampleAppsClient_GetResourceUploadURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetResourceUploadURL(ctx, "myResourceGroup", "myservice", "myapp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_SetActiveDeployments.json -func ExampleAppsClient_BeginSetActiveDeployments() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSetActiveDeployments(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.ActiveDeploymentCollection{ - ActiveDeploymentNames: []*string{ - to.Ptr("default")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Apps_ValidateDomain.json -func ExampleAppsClient_ValidateDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewAppsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ValidateDomain(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.CustomDomainValidatePayload{ - Name: to.Ptr("mydomain.io"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/autorest.md b/sdk/resourcemanager/appplatform/armappplatform/autorest.md index 33f2b29b50ba..b27cba71d869 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/autorest.md +++ b/sdk/resourcemanager/appplatform/armappplatform/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/86ead567acadc5a059949bca607a5e702610551f/specification/appplatform/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/appplatform/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/appplatform/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.2 +module-version: 1.1.0-beta.3 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go b/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go index fa8de699fa20..cff65a5f43fc 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/bindings_client.go @@ -32,10 +32,10 @@ type BindingsClient struct { } // NewBindingsClient creates a new instance of BindingsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BindingsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create a new Binding or update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// bindingResource - Parameters for the create or update operation -// options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - bindingResource - Parameters for the create or update operation +// - options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate +// method. func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BindingsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) @@ -81,7 +82,8 @@ func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new Binding or update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BindingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bindingResource) @@ -133,13 +135,14 @@ func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Operation to delete a Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*runtime.Poller[BindingsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, bindingName, options) @@ -154,7 +157,8 @@ func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Operation to delete a Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BindingsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) if err != nil { @@ -198,7 +202,7 @@ func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -206,13 +210,14 @@ func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get a Binding and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. func (client *BindingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (BindingsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) if err != nil { @@ -256,7 +261,7 @@ func (client *BindingsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -272,12 +277,13 @@ func (client *BindingsClient) getHandleResponse(resp *http.Response) (BindingsCl } // NewListPager - Handles requests to list all resources in an App. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - BindingsClientListOptions contains the optional parameters for the BindingsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method. func (client *BindingsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) *runtime.Pager[BindingsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BindingsClientListResponse]{ More: func(page BindingsClientListResponse) bool { @@ -330,7 +336,7 @@ func (client *BindingsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,14 +353,15 @@ func (client *BindingsClient) listHandleResponse(resp *http.Response) (BindingsC // BeginUpdate - Operation to update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// bindingResource - Parameters for the update operation -// options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - bindingResource - Parameters for the update operation +// - options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*runtime.Poller[BindingsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) @@ -369,7 +376,8 @@ func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Operation to update an exiting Binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BindingsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) if err != nil { @@ -413,7 +421,7 @@ func (client *BindingsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bindingResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go deleted file mode 100644 index cb92232974a3..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/bindings_client_example_test.go +++ /dev/null @@ -1,145 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Get.json -func ExampleBindingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_CreateOrUpdate.json -func ExampleBindingsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", armappplatform.BindingResource{ - Properties: &armappplatform.BindingResourceProperties{ - BindingParameters: map[string]interface{}{ - "apiType": "SQL", - "databaseName": "db1", - }, - Key: to.Ptr("xxxx"), - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Delete.json -func ExampleBindingsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_Update.json -func ExampleBindingsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", armappplatform.BindingResource{ - Properties: &armappplatform.BindingResourceProperties{ - BindingParameters: map[string]interface{}{ - "apiType": "SQL", - "databaseName": "db1", - }, - Key: to.Ptr("xxxx"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Bindings_List.json -func ExampleBindingsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBindingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "myapp", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go index 85db3390ca76..51209a0d85ca 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client.go @@ -32,10 +32,10 @@ type BuildpackBindingClient struct { } // NewBuildpackBindingClient creates a new instance of BuildpackBindingClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildpackBindingClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,16 +58,17 @@ func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Create or update a buildpack binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// buildpackBindingName - The name of the Buildpack Binding Name -// buildpackBinding - The target buildpack binding for the create or update operation -// options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - buildpackBinding - The target buildpack binding for the create or update operation +// - options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate +// method. func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) @@ -82,7 +83,8 @@ func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Create or update a buildpack binding. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BuildpackBindingClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) if err != nil { @@ -130,7 +132,7 @@ func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, buildpackBinding) @@ -138,15 +140,16 @@ func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Operation to delete a Buildpack Binding // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// buildpackBindingName - The name of the Buildpack Binding Name -// options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete +// method. func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*runtime.Poller[BuildpackBindingClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) @@ -161,7 +164,8 @@ func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceG // Delete - Operation to delete a Buildpack Binding // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BuildpackBindingClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) if err != nil { @@ -209,7 +213,7 @@ func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,14 +221,15 @@ func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, r // Get - Get a buildpack binding by name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// buildpackBindingName - The name of the Buildpack Binding Name -// options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. func (client *BuildpackBindingClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (BuildpackBindingClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) if err != nil { @@ -272,7 +277,7 @@ func (client *BuildpackBindingClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -288,13 +293,15 @@ func (client *BuildpackBindingClient) getHandleResponse(resp *http.Response) (Bu } // NewListPager - Handles requests to list all buildpack bindings in a builder. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager +// method. func (client *BuildpackBindingClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) *runtime.Pager[BuildpackBindingClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BuildpackBindingClientListResponse]{ More: func(page BuildpackBindingClientListResponse) bool { @@ -351,7 +358,7 @@ func (client *BuildpackBindingClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -365,3 +372,74 @@ func (client *BuildpackBindingClient) listHandleResponse(resp *http.Response) (B } return result, nil } + +// NewListForClusterPager - Get collection of buildpack bindings under all builders. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - BuildpackBindingClientListForClusterOptions contains the optional parameters for the BuildpackBindingClient.NewListForClusterPager +// method. +func (client *BuildpackBindingClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *BuildpackBindingClientListForClusterOptions) *runtime.Pager[BuildpackBindingClientListForClusterResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildpackBindingClientListForClusterResponse]{ + More: func(page BuildpackBindingClientListForClusterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildpackBindingClientListForClusterResponse) (BuildpackBindingClientListForClusterResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listForClusterCreateRequest(ctx, resourceGroupName, serviceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return BuildpackBindingClientListForClusterResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return BuildpackBindingClientListForClusterResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return BuildpackBindingClientListForClusterResponse{}, runtime.NewResponseError(resp) + } + return client.listForClusterHandleResponse(resp) + }, + }) +} + +// listForClusterCreateRequest creates the ListForCluster request. +func (client *BuildpackBindingClient) listForClusterCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *BuildpackBindingClientListForClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildpackBindings" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-01-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listForClusterHandleResponse handles the ListForCluster response. +func (client *BuildpackBindingClient) listForClusterHandleResponse(resp *http.Response) (BuildpackBindingClientListForClusterResponse, error) { + result := BuildpackBindingClientListForClusterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildpackBindingResourceCollection); err != nil { + return BuildpackBindingClientListForClusterResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go deleted file mode 100644 index 6e683de85b83..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildpackbinding_client_example_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_Get.json -func ExampleBuildpackBindingClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_CreateOrUpdate.json -func ExampleBuildpackBindingClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", armappplatform.BuildpackBindingResource{ - Properties: &armappplatform.BuildpackBindingProperties{ - BindingType: to.Ptr(armappplatform.BindingTypeApplicationInsights), - LaunchProperties: &armappplatform.BuildpackBindingLaunchProperties{ - Properties: map[string]*string{ - "abc": to.Ptr("def"), - "any-string": to.Ptr("any-string"), - "sampling-rate": to.Ptr("12.0"), - }, - Secrets: map[string]*string{ - "connection-string": to.Ptr("XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXX;XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXXXXXXXX"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_Delete.json -func ExampleBuildpackBindingClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildpackBinding_List.json -func ExampleBuildpackBindingClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildpackBindingClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go index fb83571e4061..e3f10e11d1ea 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client.go @@ -32,10 +32,10 @@ type BuildServiceClient struct { } // NewBuildServiceClient creates a new instance of BuildServiceClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdateBuild - Create or update a KPack build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// buildParam - Parameters for the create or update operation -// options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildParam - Parameters for the create or update operation +// - options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild +// method. func (client *BuildServiceClient) CreateOrUpdateBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (BuildServiceClientCreateOrUpdateBuildResponse, error) { req, err := client.createOrUpdateBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildParam, options) if err != nil { @@ -110,7 +111,7 @@ func (client *BuildServiceClient) createOrUpdateBuildCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, buildParam) @@ -127,13 +128,14 @@ func (client *BuildServiceClient) createOrUpdateBuildHandleResponse(resp *http.R // GetBuild - Get a KPack build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. func (client *BuildServiceClient) GetBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (BuildServiceClientGetBuildResponse, error) { req, err := client.getBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) if err != nil { @@ -177,7 +179,7 @@ func (client *BuildServiceClient) getBuildCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,15 +196,16 @@ func (client *BuildServiceClient) getBuildHandleResponse(resp *http.Response) (B // GetBuildResult - Get a KPack build result. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// buildResultName - The name of the build result resource. -// options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildResultName - The name of the build result resource. +// - options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult +// method. func (client *BuildServiceClient) GetBuildResult(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (BuildServiceClientGetBuildResultResponse, error) { req, err := client.getBuildResultCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) if err != nil { @@ -250,7 +253,7 @@ func (client *BuildServiceClient) getBuildResultCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,15 +270,16 @@ func (client *BuildServiceClient) getBuildResultHandleResponse(resp *http.Respon // GetBuildResultLog - Get a KPack build result log download URL. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// buildResultName - The name of the build result resource. -// options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildResultName - The name of the build result resource. +// - options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog +// method. func (client *BuildServiceClient) GetBuildResultLog(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (BuildServiceClientGetBuildResultLogResponse, error) { req, err := client.getBuildResultLogCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) if err != nil { @@ -323,7 +327,7 @@ func (client *BuildServiceClient) getBuildResultLogCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -340,13 +344,14 @@ func (client *BuildServiceClient) getBuildResultLogHandleResponse(resp *http.Res // GetBuildService - Get a build service resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService +// method. func (client *BuildServiceClient) GetBuildService(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (BuildServiceClientGetBuildServiceResponse, error) { req, err := client.getBuildServiceCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -386,7 +391,7 @@ func (client *BuildServiceClient) getBuildServiceCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -403,13 +408,14 @@ func (client *BuildServiceClient) getBuildServiceHandleResponse(resp *http.Respo // GetResourceUploadURL - Get an resource upload URL for build service, which may be artifacts or source archive. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL +// method. func (client *BuildServiceClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (BuildServiceClientGetResourceUploadURLResponse, error) { req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -449,7 +455,7 @@ func (client *BuildServiceClient) getResourceUploadURLCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,14 +472,15 @@ func (client *BuildServiceClient) getResourceUploadURLHandleResponse(resp *http. // GetSupportedBuildpack - Get the supported buildpack resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildpackName - The name of the buildpack resource. -// options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildpackName - The name of the buildpack resource. +// - options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack +// method. func (client *BuildServiceClient) GetSupportedBuildpack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (BuildServiceClientGetSupportedBuildpackResponse, error) { req, err := client.getSupportedBuildpackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildpackName, options) if err != nil { @@ -517,7 +524,7 @@ func (client *BuildServiceClient) getSupportedBuildpackCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,14 +541,15 @@ func (client *BuildServiceClient) getSupportedBuildpackHandleResponse(resp *http // GetSupportedStack - Get the supported stack resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// stackName - The name of the stack resource. -// options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - stackName - The name of the stack resource. +// - options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack +// method. func (client *BuildServiceClient) GetSupportedStack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (BuildServiceClientGetSupportedStackResponse, error) { req, err := client.getSupportedStackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, stackName, options) if err != nil { @@ -585,7 +593,7 @@ func (client *BuildServiceClient) getSupportedStackCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -601,14 +609,15 @@ func (client *BuildServiceClient) getSupportedStackHandleResponse(resp *http.Res } // NewListBuildResultsPager - List KPack build results. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.ListBuildResults -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager +// method. func (client *BuildServiceClient) NewListBuildResultsPager(resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) *runtime.Pager[BuildServiceClientListBuildResultsResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildResultsResponse]{ More: func(page BuildServiceClientListBuildResultsResponse) bool { @@ -665,7 +674,7 @@ func (client *BuildServiceClient) listBuildResultsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -681,12 +690,13 @@ func (client *BuildServiceClient) listBuildResultsHandleResponse(resp *http.Resp } // NewListBuildServicesPager - List build services resource. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.ListBuildServices -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager +// method. func (client *BuildServiceClient) NewListBuildServicesPager(resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) *runtime.Pager[BuildServiceClientListBuildServicesResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildServicesResponse]{ More: func(page BuildServiceClientListBuildServicesResponse) bool { @@ -735,7 +745,7 @@ func (client *BuildServiceClient) listBuildServicesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -751,12 +761,14 @@ func (client *BuildServiceClient) listBuildServicesHandleResponse(resp *http.Res } // NewListBuildsPager - List KPack builds. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.ListBuilds method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager +// method. func (client *BuildServiceClient) NewListBuildsPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) *runtime.Pager[BuildServiceClientListBuildsResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildsResponse]{ More: func(page BuildServiceClientListBuildsResponse) bool { @@ -809,7 +821,7 @@ func (client *BuildServiceClient) listBuildsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -826,13 +838,14 @@ func (client *BuildServiceClient) listBuildsHandleResponse(resp *http.Response) // ListSupportedBuildpacks - Get all supported buildpacks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks +// method. func (client *BuildServiceClient) ListSupportedBuildpacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (BuildServiceClientListSupportedBuildpacksResponse, error) { req, err := client.listSupportedBuildpacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -872,7 +885,7 @@ func (client *BuildServiceClient) listSupportedBuildpacksCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -889,13 +902,14 @@ func (client *BuildServiceClient) listSupportedBuildpacksHandleResponse(resp *ht // ListSupportedStacks - Get all supported stacks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks +// method. func (client *BuildServiceClient) ListSupportedStacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (BuildServiceClientListSupportedStacksResponse, error) { req, err := client.listSupportedStacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) if err != nil { @@ -935,7 +949,7 @@ func (client *BuildServiceClient) listSupportedStacksCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go deleted file mode 100644 index e6a88549090a..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservice_client_example_test.go +++ /dev/null @@ -1,293 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuildServices.json -func ExampleBuildServiceClient_NewListBuildServicesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBuildServicesPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildService.json -func ExampleBuildServiceClient_GetBuildService() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuildService(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuilds.json -func ExampleBuildServiceClient_NewListBuildsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBuildsPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuild.json -func ExampleBuildServiceClient_GetBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuild(ctx, "myResourceGroup", "myservice", "default", "mybuild", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_CreateOrUpdateBuild.json -func ExampleBuildServiceClient_CreateOrUpdateBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateBuild(ctx, "myResourceGroup", "myservice", "default", "mybuild", armappplatform.Build{ - Properties: &armappplatform.BuildProperties{ - AgentPool: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"), - Builder: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default"), - Env: map[string]*string{ - "environmentVariable": to.Ptr("test"), - }, - RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"), - ResourceRequests: &armappplatform.BuildResourceRequests{ - CPU: to.Ptr("1"), - Memory: to.Ptr("2Gi"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListBuildResults.json -func ExampleBuildServiceClient_NewListBuildResultsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBuildResultsPager("myResourceGroup", "myservice", "default", "mybuild", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildResult.json -func ExampleBuildServiceClient_GetBuildResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuildResult(ctx, "myResourceGroup", "myservice", "default", "mybuild", "123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetBuildResultLog.json -func ExampleBuildServiceClient_GetBuildResultLog() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBuildResultLog(ctx, "myResourceGroup", "myservice", "default", "mybuild", "123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetResourceUploadUrl.json -func ExampleBuildServiceClient_GetResourceUploadURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetResourceUploadURL(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListSupportedBuildpacks.json -func ExampleBuildServiceClient_ListSupportedBuildpacks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSupportedBuildpacks(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetSupportedBuildpack.json -func ExampleBuildServiceClient_GetSupportedBuildpack() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSupportedBuildpack(ctx, "myResourceGroup", "myservice", "default", "tanzu-buildpacks-java-azure", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_ListSupportedStacks.json -func ExampleBuildServiceClient_ListSupportedStacks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSupportedStacks(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildService_GetSupportedStack.json -func ExampleBuildServiceClient_GetSupportedStack() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSupportedStack(ctx, "myResourceGroup", "myservice", "default", "io.buildpacks.stacks.bionic-base", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go index 0ebf8a761e63..c363ceeb4439 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client.go @@ -32,10 +32,10 @@ type BuildServiceAgentPoolClient struct { } // NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceAgentPoolClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.Tok // Get - Get build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// agentPoolName - The name of the build service agent pool resource. -// options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - agentPoolName - The name of the build service agent pool resource. +// - options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get +// method. func (client *BuildServiceAgentPoolClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (BuildServiceAgentPoolClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, options) if err != nil { @@ -109,7 +110,7 @@ func (client *BuildServiceAgentPoolClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,13 +126,14 @@ func (client *BuildServiceAgentPoolClient) getHandleResponse(resp *http.Response } // NewListPager - List build service agent pool. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager +// method. func (client *BuildServiceAgentPoolClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) *runtime.Pager[BuildServiceAgentPoolClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceAgentPoolClientListResponse]{ More: func(page BuildServiceAgentPoolClientListResponse) bool { @@ -184,7 +186,7 @@ func (client *BuildServiceAgentPoolClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,15 +203,16 @@ func (client *BuildServiceAgentPoolClient) listHandleResponse(resp *http.Respons // BeginUpdatePut - Create or update build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// agentPoolName - The name of the build service agent pool resource. -// agentPoolResource - Parameters for the update operation -// options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - agentPoolName - The name of the build service agent pool resource. +// - agentPoolResource - Parameters for the update operation +// - options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut +// method. func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*runtime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePut(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) @@ -224,7 +227,8 @@ func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, r // UpdatePut - Create or update build service agent pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BuildServiceAgentPoolClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*http.Response, error) { req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) if err != nil { @@ -268,7 +272,7 @@ func (client *BuildServiceAgentPoolClient) updatePutCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, agentPoolResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go deleted file mode 100644 index ed469e1c9b0f..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildserviceagentpool_client_example_test.go +++ /dev/null @@ -1,90 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_List.json -func ExampleBuildServiceAgentPoolClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceAgentPoolClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_Get.json -func ExampleBuildServiceAgentPoolClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceAgentPoolClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceAgentPool_UpdatePut.json -func ExampleBuildServiceAgentPoolClient_BeginUpdatePut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceAgentPoolClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePut(ctx, "myResourceGroup", "myservice", "default", "default", armappplatform.BuildServiceAgentPoolResource{ - Properties: &armappplatform.BuildServiceAgentPoolProperties{ - PoolSize: &armappplatform.BuildServiceAgentPoolSizeProperties{ - Name: to.Ptr("S3"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go index 25be58095d22..fe0ddb2ebb98 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client.go @@ -32,10 +32,10 @@ type BuildServiceBuilderClient struct { } // NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceBuilderClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or update a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// builderResource - The target builder for the create or update operation -// options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - builderResource - The target builder for the create or update operation +// - options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate +// method. func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) @@ -81,7 +82,8 @@ func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or update a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BuildServiceBuilderClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, builderResource) @@ -133,14 +135,15 @@ func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete +// method. func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*runtime.Poller[BuildServiceBuilderClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) @@ -155,7 +158,8 @@ func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resour // Delete - Delete a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *BuildServiceBuilderClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) if err != nil { @@ -199,7 +203,7 @@ func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,13 +211,14 @@ func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context // Get - Get a KPack builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. func (client *BuildServiceBuilderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (BuildServiceBuilderClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) if err != nil { @@ -257,7 +262,7 @@ func (client *BuildServiceBuilderClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,13 +278,14 @@ func (client *BuildServiceBuilderClient) getHandleResponse(resp *http.Response) } // NewListPager - List KPack builders result. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager +// method. func (client *BuildServiceBuilderClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) *runtime.Pager[BuildServiceBuilderClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BuildServiceBuilderClientListResponse]{ More: func(page BuildServiceBuilderClientListResponse) bool { @@ -332,7 +338,7 @@ func (client *BuildServiceBuilderClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -349,14 +355,15 @@ func (client *BuildServiceBuilderClient) listHandleResponse(resp *http.Response) // ListDeployments - List deployments that are using the builder. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildServiceBuilderClientListDeploymentsOptions contains the optional parameters for the BuildServiceBuilderClient.ListDeployments -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientListDeploymentsOptions contains the optional parameters for the BuildServiceBuilderClient.ListDeployments +// method. func (client *BuildServiceBuilderClient) ListDeployments(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error) { req, err := client.listDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) if err != nil { @@ -400,7 +407,7 @@ func (client *BuildServiceBuilderClient) listDeploymentsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go deleted file mode 100644 index 02a8089d725b..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/buildservicebuilder_client_example_test.go +++ /dev/null @@ -1,139 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_Get.json -func ExampleBuildServiceBuilderClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "mybuilder", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_CreateOrUpdate.json -func ExampleBuildServiceBuilderClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "mybuilder", armappplatform.BuilderResource{ - Properties: &armappplatform.BuilderProperties{ - BuildpackGroups: []*armappplatform.BuildpacksGroupProperties{ - { - Name: to.Ptr("mix"), - Buildpacks: []*armappplatform.BuildpackProperties{ - { - ID: to.Ptr("tanzu-buildpacks/java-azure"), - }}, - }}, - Stack: &armappplatform.StackProperties{ - ID: to.Ptr("io.buildpacks.stacks.bionic"), - Version: to.Ptr("base"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_Delete.json -func ExampleBuildServiceBuilderClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "mybuilder", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_List.json -func ExampleBuildServiceBuilderClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/BuildServiceBuilder_ListDeployments.json -func ExampleBuildServiceBuilderClient_ListDeployments() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewBuildServiceBuilderClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListDeployments(ctx, "myResourceGroup", "myservice", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go index 677f01a24139..6868f39d5ad0 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/certificates_client.go @@ -32,10 +32,10 @@ type CertificatesClient struct { } // NewCertificatesClient creates a new instance of CertificatesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Create or update certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// certificateName - The name of the certificate resource. -// certificateResource - Parameters for the create or update operation -// options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - certificateName - The name of the certificate resource. +// - certificateResource - Parameters for the create or update operation +// - options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate +// method. func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificatesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) @@ -80,7 +81,8 @@ func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Create or update certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateResource) @@ -128,13 +130,14 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Delete the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// certificateName - The name of the certificate resource. -// options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - certificateName - The name of the certificate resource. +// - options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete +// method. func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*runtime.Poller[CertificatesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, certificateName, options) @@ -149,7 +152,8 @@ func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Delete the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CertificatesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) if err != nil { @@ -189,7 +193,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,12 +201,13 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the certificate resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// certificateName - The name of the certificate resource. -// options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - certificateName - The name of the certificate resource. +// - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) if err != nil { @@ -242,7 +247,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,11 +263,12 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif } // NewListPager - List all the certificates of one user. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. func (client *CertificatesClient) NewListPager(resourceGroupName string, serviceName string, options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ More: func(page CertificatesClientListResponse) bool { @@ -311,7 +317,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go deleted file mode 100644 index c424351b36c5..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/certificates_client_example_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_Get.json -func ExampleCertificatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "mycertificate", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_CreateOrUpdate.json -func ExampleCertificatesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "mycertificate", armappplatform.CertificateResource{ - Properties: &armappplatform.KeyVaultCertificateProperties{ - Type: to.Ptr("KeyVaultCertificate"), - CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"), - KeyVaultCertName: to.Ptr("mycert"), - VaultURI: to.Ptr("https://myvault.vault.azure.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_Delete.json -func ExampleCertificatesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "mycertificate", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Certificates_List.json -func ExampleCertificatesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCertificatesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myService", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go index d4ef407e49df..433d82113fd3 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configservers_client.go @@ -32,10 +32,10 @@ type ConfigServersClient struct { } // NewConfigServersClient creates a new instance of ConfigServersClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewConfigServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigServersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewConfigServersClient(subscriptionID string, credential azcore.TokenCreden // Get - Get the config server and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. func (client *ConfigServersClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (ConfigServersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -98,7 +99,7 @@ func (client *ConfigServersClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,13 +116,14 @@ func (client *ConfigServersClient) getHandleResponse(resp *http.Response) (Confi // BeginUpdatePatch - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configServerResource - Parameters for the update operation -// options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configServerResource - Parameters for the update operation +// - options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch +// method. func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*runtime.Poller[ConfigServersClientUpdatePatchResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, configServerResource, options) @@ -136,7 +138,8 @@ func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourc // UpdatePatch - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ConfigServersClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*http.Response, error) { req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) if err != nil { @@ -172,7 +175,7 @@ func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerResource) @@ -180,13 +183,14 @@ func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, // BeginUpdatePut - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configServerResource - Parameters for the update operation -// options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configServerResource - Parameters for the update operation +// - options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut +// method. func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*runtime.Poller[ConfigServersClientUpdatePutResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePut(ctx, resourceGroupName, serviceName, configServerResource, options) @@ -201,7 +205,8 @@ func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceG // UpdatePut - Update the config server. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ConfigServersClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*http.Response, error) { req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) if err != nil { @@ -237,7 +242,7 @@ func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerResource) @@ -245,13 +250,14 @@ func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, r // BeginValidate - Check if the config server settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configServerSettings - Config server settings to be validated -// options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configServerSettings - Config server settings to be validated +// - options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate +// method. func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*runtime.Poller[ConfigServersClientValidateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.validate(ctx, resourceGroupName, serviceName, configServerSettings, options) @@ -268,7 +274,8 @@ func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGr // Validate - Check if the config server settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ConfigServersClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*http.Response, error) { req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configServerSettings, options) if err != nil { @@ -304,7 +311,7 @@ func (client *ConfigServersClient) validateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configServerSettings) diff --git a/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go deleted file mode 100644 index 84498edaaa8d..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/configservers_client_example_test.go +++ /dev/null @@ -1,135 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_Get.json -func ExampleConfigServersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_UpdatePut.json -func ExampleConfigServersClient_BeginUpdatePut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePut(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerResource{ - Properties: &armappplatform.ConfigServerProperties{ - ConfigServer: &armappplatform.ConfigServerSettings{ - GitProperty: &armappplatform.ConfigServerGitProperty{ - Label: to.Ptr("master"), - SearchPaths: []*string{ - to.Ptr("/")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository.git"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_UpdatePatch.json -func ExampleConfigServersClient_BeginUpdatePatch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePatch(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerResource{ - Properties: &armappplatform.ConfigServerProperties{ - ConfigServer: &armappplatform.ConfigServerSettings{ - GitProperty: &armappplatform.ConfigServerGitProperty{ - Label: to.Ptr("master"), - SearchPaths: []*string{ - to.Ptr("/")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository.git"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigServers_Validate.json -func ExampleConfigServersClient_BeginValidate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigServersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidate(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerSettings{ - GitProperty: &armappplatform.ConfigServerGitProperty{ - Label: to.Ptr("master"), - SearchPaths: []*string{ - to.Ptr("/")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository.git"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go index 9def0eb2afd5..7d6a4d2a2311 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client.go @@ -32,10 +32,10 @@ type ConfigurationServicesClient struct { } // NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewConfigurationServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,14 +59,15 @@ func NewConfigurationServicesClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration // Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// configurationServiceResource - Parameters for the update operation -// options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - configurationServiceResource - Parameters for the update operation +// - options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate +// method. func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) @@ -82,7 +83,8 @@ func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration // Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ConfigurationServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) if err != nil { @@ -122,7 +124,7 @@ func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, configurationServiceResource) @@ -130,13 +132,14 @@ func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Disable the default Application Configuration Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete +// method. func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*runtime.Poller[ConfigurationServicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, configurationServiceName, options) @@ -151,7 +154,8 @@ func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, reso // Delete - Disable the default Application Configuration Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ConfigurationServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) if err != nil { @@ -191,7 +195,7 @@ func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,13 +203,14 @@ func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Conte // Get - Get the Application Configuration Service and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get +// method. func (client *ConfigurationServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (ConfigurationServicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) if err != nil { @@ -245,7 +250,7 @@ func (client *ConfigurationServicesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,12 +266,13 @@ func (client *ConfigurationServicesClient) getHandleResponse(resp *http.Response } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. func (client *ConfigurationServicesClient) NewListPager(resourceGroupName string, serviceName string, options *ConfigurationServicesClientListOptions) *runtime.Pager[ConfigurationServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ConfigurationServicesClientListResponse]{ More: func(page ConfigurationServicesClientListResponse) bool { @@ -315,7 +321,7 @@ func (client *ConfigurationServicesClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,14 +338,15 @@ func (client *ConfigurationServicesClient) listHandleResponse(resp *http.Respons // BeginValidate - Check if the Application Configuration Service settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// settings - Application Configuration Service settings to be validated -// options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - settings - Application Configuration Service settings to be validated +// - options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate +// method. func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*runtime.Poller[ConfigurationServicesClientValidateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.validate(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) @@ -356,7 +363,8 @@ func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, re // Validate - Check if the Application Configuration Service settings are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ConfigurationServicesClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*http.Response, error) { req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) if err != nil { @@ -396,7 +404,7 @@ func (client *ConfigurationServicesClient) validateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, settings) diff --git a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go deleted file mode 100644 index 8f564c06f6c7..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/configurationservices_client_example_test.go +++ /dev/null @@ -1,154 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Get.json -func ExampleConfigurationServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_CreateOrUpdate.json -func ExampleConfigurationServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ConfigurationServiceResource{ - Properties: &armappplatform.ConfigurationServiceProperties{ - Settings: &armappplatform.ConfigurationServiceSettings{ - GitProperty: &armappplatform.ConfigurationServiceGitProperty{ - Repositories: []*armappplatform.ConfigurationServiceGitRepository{ - { - Name: to.Ptr("fake"), - Label: to.Ptr("master"), - Patterns: []*string{ - to.Ptr("app/dev")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository"), - }}, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Delete.json -func ExampleConfigurationServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_List.json -func ExampleConfigurationServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ConfigurationServices_Validate.json -func ExampleConfigurationServicesClient_BeginValidate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewConfigurationServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ConfigurationServiceSettings{ - GitProperty: &armappplatform.ConfigurationServiceGitProperty{ - Repositories: []*armappplatform.ConfigurationServiceGitRepository{ - { - Name: to.Ptr("fake"), - Label: to.Ptr("master"), - Patterns: []*string{ - to.Ptr("app/dev")}, - URI: to.Ptr("https://github.com/fake-user/fake-repository"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/constants.go b/sdk/resourcemanager/appplatform/armappplatform/constants.go index a43309292803..dd4e8a961a14 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/constants.go +++ b/sdk/resourcemanager/appplatform/armappplatform/constants.go @@ -11,7 +11,7 @@ package armappplatform const ( moduleName = "armappplatform" - moduleVersion = "v1.1.0-beta.2" + moduleVersion = "v1.1.0-beta.3" ) // APIPortalProvisioningState - State of the API portal. diff --git a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go index 35eeb15b4aa2..4539cf9ef595 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client.go @@ -32,10 +32,10 @@ type CustomDomainsClient struct { } // NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// domainResource - Parameters for the create or update operation -// options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - domainResource - Parameters for the create or update operation +// - options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate +// method. func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) @@ -81,7 +82,8 @@ func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainResource) @@ -133,14 +135,15 @@ func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Delete the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete +// method. func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, domainName, options) @@ -155,7 +158,8 @@ func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) if err != nil { @@ -199,7 +203,7 @@ func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,13 +211,14 @@ func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) if err != nil { @@ -257,7 +262,7 @@ func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,12 +278,13 @@ func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (Custo } // NewListPager - List the custom domains of one lifecycle application. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. func (client *CustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListResponse]{ More: func(page CustomDomainsClientListResponse) bool { @@ -331,7 +337,7 @@ func (client *CustomDomainsClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,15 +354,16 @@ func (client *CustomDomainsClient) listHandleResponse(resp *http.Response) (Cust // BeginUpdate - Update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// domainResource - Parameters for the create or update operation -// options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - domainResource - Parameters for the create or update operation +// - options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate +// method. func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*runtime.Poller[CustomDomainsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) @@ -371,7 +378,8 @@ func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Update custom domain of one lifecycle application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CustomDomainsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) if err != nil { @@ -415,7 +423,7 @@ func (client *CustomDomainsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go deleted file mode 100644 index 5f6758453399..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customdomains_client_example_test.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Get.json -func ExampleCustomDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_CreateOrUpdate.json -func ExampleCustomDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", armappplatform.CustomDomainResource{ - Properties: &armappplatform.CustomDomainProperties{ - CertName: to.Ptr("mycert"), - Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Delete.json -func ExampleCustomDomainsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_Update.json -func ExampleCustomDomainsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", armappplatform.CustomDomainResource{ - Properties: &armappplatform.CustomDomainProperties{ - CertName: to.Ptr("mycert"), - Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomDomains_List.json -func ExampleCustomDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "myapp", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go index 8b02cb5a60e1..15cee09dc26c 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client.go @@ -32,10 +32,10 @@ type CustomizedAcceleratorsClient struct { } // NewCustomizedAcceleratorsClient creates a new instance of CustomizedAcceleratorsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewCustomizedAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomizedAcceleratorsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewCustomizedAcceleratorsClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Create or update the customized accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// customizedAcceleratorName - The name of the customized accelerator. -// customizedAcceleratorResource - The customized accelerator for the create or update operation -// options - CustomizedAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - customizedAcceleratorResource - The customized accelerator for the create or update operation +// - options - CustomizedAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginCreateOrUpdate +// method. func (client *CustomizedAcceleratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomizedAcceleratorsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, customizedAcceleratorResource, options) @@ -81,7 +82,8 @@ func (client *CustomizedAcceleratorsClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - Create or update the customized accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CustomizedAcceleratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, customizedAcceleratorResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *CustomizedAcceleratorsClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, customizedAcceleratorResource) @@ -133,14 +135,15 @@ func (client *CustomizedAcceleratorsClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - Delete the customized accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// customizedAcceleratorName - The name of the customized accelerator. -// options - CustomizedAcceleratorsClientBeginDeleteOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - options - CustomizedAcceleratorsClientBeginDeleteOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginDelete +// method. func (client *CustomizedAcceleratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[CustomizedAcceleratorsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) @@ -155,7 +158,8 @@ func (client *CustomizedAcceleratorsClient) BeginDelete(ctx context.Context, res // Delete - Delete the customized accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *CustomizedAcceleratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) if err != nil { @@ -199,7 +203,7 @@ func (client *CustomizedAcceleratorsClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,14 +211,15 @@ func (client *CustomizedAcceleratorsClient) deleteCreateRequest(ctx context.Cont // Get - Get the customized accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// customizedAcceleratorName - The name of the customized accelerator. -// options - CustomizedAcceleratorsClientGetOptions contains the optional parameters for the CustomizedAcceleratorsClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - options - CustomizedAcceleratorsClientGetOptions contains the optional parameters for the CustomizedAcceleratorsClient.Get +// method. func (client *CustomizedAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientGetOptions) (CustomizedAcceleratorsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) if err != nil { @@ -258,7 +263,7 @@ func (client *CustomizedAcceleratorsClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,13 +279,14 @@ func (client *CustomizedAcceleratorsClient) getHandleResponse(resp *http.Respons } // NewListPager - Handle requests to list all customized accelerators. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// options - CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.NewListPager +// method. func (client *CustomizedAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, applicationAcceleratorName string, options *CustomizedAcceleratorsClientListOptions) *runtime.Pager[CustomizedAcceleratorsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CustomizedAcceleratorsClientListResponse]{ More: func(page CustomizedAcceleratorsClientListResponse) bool { @@ -333,7 +339,7 @@ func (client *CustomizedAcceleratorsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,15 +356,16 @@ func (client *CustomizedAcceleratorsClient) listHandleResponse(resp *http.Respon // Validate - Check the customized accelerator are valid. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// customizedAcceleratorName - The name of the customized accelerator. -// properties - Customized accelerator properties to be validated -// options - CustomizedAcceleratorsClientValidateOptions contains the optional parameters for the CustomizedAcceleratorsClient.Validate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - properties - Customized accelerator properties to be validated +// - options - CustomizedAcceleratorsClientValidateOptions contains the optional parameters for the CustomizedAcceleratorsClient.Validate +// method. func (client *CustomizedAcceleratorsClient) Validate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, properties CustomizedAcceleratorProperties, options *CustomizedAcceleratorsClientValidateOptions) (CustomizedAcceleratorsClientValidateResponse, error) { req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, properties, options) if err != nil { @@ -402,7 +409,7 @@ func (client *CustomizedAcceleratorsClient) validateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) diff --git a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go deleted file mode 100644 index 06c6904ed324..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/customizedaccelerators_client_example_test.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_List.json -func ExampleCustomizedAcceleratorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_Get.json -func ExampleCustomizedAcceleratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_CreateOrUpdate.json -func ExampleCustomizedAcceleratorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "acc-name", armappplatform.CustomizedAcceleratorResource{ - Properties: &armappplatform.CustomizedAcceleratorProperties{ - Description: to.Ptr("acc-desc"), - AcceleratorTags: []*string{ - to.Ptr("tag-a"), - to.Ptr("tag-b")}, - DisplayName: to.Ptr("acc-name"), - GitRepository: &armappplatform.AcceleratorGitRepository{ - AuthSetting: &armappplatform.AcceleratorSSHSetting{ - AuthType: to.Ptr("SSH"), - HostKey: to.Ptr("git-auth-hostkey"), - HostKeyAlgorithm: to.Ptr("git-auth-algorithm"), - PrivateKey: to.Ptr("git-auth-privatekey"), - }, - Branch: to.Ptr("git-branch"), - Commit: to.Ptr("12345"), - GitTag: to.Ptr("git-tag"), - IntervalInSeconds: to.Ptr[int32](70), - URL: to.Ptr("git-url"), - }, - IconURL: to.Ptr("acc-icon"), - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_Delete.json -func ExampleCustomizedAcceleratorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/CustomizedAccelerators_Validate.json -func ExampleCustomizedAcceleratorsClient_Validate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewCustomizedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Validate(ctx, "myResourceGroup", "myservice", "default", "acc-name", armappplatform.CustomizedAcceleratorProperties{ - Description: to.Ptr("acc-desc"), - AcceleratorTags: []*string{ - to.Ptr("tag-a"), - to.Ptr("tag-b")}, - DisplayName: to.Ptr("acc-name"), - GitRepository: &armappplatform.AcceleratorGitRepository{ - AuthSetting: &armappplatform.AcceleratorSSHSetting{ - AuthType: to.Ptr("SSH"), - HostKey: to.Ptr("git-auth-hostkey"), - HostKeyAlgorithm: to.Ptr("git-auth-algorithm"), - PrivateKey: to.Ptr("git-auth-privatekey"), - }, - Branch: to.Ptr("git-branch"), - Commit: to.Ptr("12345"), - GitTag: to.Ptr("git-tag"), - IntervalInSeconds: to.Ptr[int32](70), - URL: to.Ptr("git-url"), - }, - IconURL: to.Ptr("acc-icon"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go index 27119c7dec2e..7b9c27901078 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/deployments_client.go @@ -32,10 +32,10 @@ type DeploymentsClient struct { } // NewDeploymentsClient creates a new instance of DeploymentsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Create a new Deployment or update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// deploymentResource - Parameters for the create or update operation -// options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - deploymentResource - Parameters for the create or update operation +// - options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate +// method. func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) @@ -81,7 +82,8 @@ func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Create a new Deployment or update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deploymentResource) @@ -133,13 +135,14 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Operation to delete a Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -154,7 +157,8 @@ func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Operation to delete a Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -198,7 +202,7 @@ func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -206,14 +210,15 @@ func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resour // BeginDisableRemoteDebugging - Disable remote debugging. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginDisableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginDisableRemoteDebugging -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginDisableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginDisableRemoteDebugging +// method. func (client *DeploymentsClient) BeginDisableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.disableRemoteDebugging(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -228,7 +233,8 @@ func (client *DeploymentsClient) BeginDisableRemoteDebugging(ctx context.Context // DisableRemoteDebugging - Disable remote debugging. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) disableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*http.Response, error) { req, err := client.disableRemoteDebuggingCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -272,7 +278,7 @@ func (client *DeploymentsClient) disableRemoteDebuggingCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,14 +286,15 @@ func (client *DeploymentsClient) disableRemoteDebuggingCreateRequest(ctx context // BeginEnableRemoteDebugging - Enable remote debugging. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginEnableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginEnableRemoteDebugging -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginEnableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginEnableRemoteDebugging +// method. func (client *DeploymentsClient) BeginEnableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.enableRemoteDebugging(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -302,7 +309,8 @@ func (client *DeploymentsClient) BeginEnableRemoteDebugging(ctx context.Context, // EnableRemoteDebugging - Enable remote debugging. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) enableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*http.Response, error) { req, err := client.enableRemoteDebuggingCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -346,7 +354,7 @@ func (client *DeploymentsClient) enableRemoteDebuggingCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.RemoteDebuggingPayload != nil { @@ -357,15 +365,16 @@ func (client *DeploymentsClient) enableRemoteDebuggingCreateRequest(ctx context. // BeginGenerateHeapDump - Generate Heap Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump +// method. func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*runtime.Poller[DeploymentsClientGenerateHeapDumpResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generateHeapDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) @@ -380,7 +389,8 @@ func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, reso // GenerateHeapDump - Generate Heap Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) generateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*http.Response, error) { req, err := client.generateHeapDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) if err != nil { @@ -424,7 +434,7 @@ func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -432,15 +442,16 @@ func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Conte // BeginGenerateThreadDump - Generate Thread Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump +// method. func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*runtime.Poller[DeploymentsClientGenerateThreadDumpResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generateThreadDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) @@ -455,7 +466,8 @@ func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, re // GenerateThreadDump - Generate Thread Dump // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) generateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*http.Response, error) { req, err := client.generateThreadDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) if err != nil { @@ -499,7 +511,7 @@ func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -507,13 +519,14 @@ func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Con // Get - Get a Deployment and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -557,7 +570,7 @@ func (client *DeploymentsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -574,14 +587,15 @@ func (client *DeploymentsClient) getHandleResponse(resp *http.Response) (Deploym // GetLogFileURL - Get deployment log file URL // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL +// method. func (client *DeploymentsClient) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (DeploymentsClientGetLogFileURLResponse, error) { req, err := client.getLogFileURLCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -625,7 +639,7 @@ func (client *DeploymentsClient) getLogFileURLCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -642,14 +656,15 @@ func (client *DeploymentsClient) getLogFileURLHandleResponse(resp *http.Response // GetRemoteDebuggingConfig - Get remote debugging config. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientGetRemoteDebuggingConfigOptions contains the optional parameters for the DeploymentsClient.GetRemoteDebuggingConfig -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetRemoteDebuggingConfigOptions contains the optional parameters for the DeploymentsClient.GetRemoteDebuggingConfig +// method. func (client *DeploymentsClient) GetRemoteDebuggingConfig(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error) { req, err := client.getRemoteDebuggingConfigCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -693,7 +708,7 @@ func (client *DeploymentsClient) getRemoteDebuggingConfigCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -709,12 +724,13 @@ func (client *DeploymentsClient) getRemoteDebuggingConfigHandleResponse(resp *ht } // NewListPager - Handles requests to list all resources in an App. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. func (client *DeploymentsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListResponse]{ More: func(page DeploymentsClientListResponse) bool { @@ -767,7 +783,7 @@ func (client *DeploymentsClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") if options != nil && options.Version != nil { for _, qv := range options.Version { reqQP.Add("version", qv) @@ -788,12 +804,13 @@ func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (Deploy } // NewListForClusterPager - List deployments for a certain service -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.ListForCluster -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager +// method. func (client *DeploymentsClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) *runtime.Pager[DeploymentsClientListForClusterResponse] { return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListForClusterResponse]{ More: func(page DeploymentsClientListForClusterResponse) bool { @@ -842,7 +859,7 @@ func (client *DeploymentsClient) listForClusterCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") if options != nil && options.Version != nil { for _, qv := range options.Version { reqQP.Add("version", qv) @@ -864,14 +881,15 @@ func (client *DeploymentsClient) listForClusterHandleResponse(resp *http.Respons // BeginRestart - Restart the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart +// method. func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*runtime.Poller[DeploymentsClientRestartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.restart(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -886,7 +904,8 @@ func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroup // Restart - Restart the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) restart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*http.Response, error) { req, err := client.restartCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -930,7 +949,7 @@ func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -938,13 +957,14 @@ func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resou // BeginStart - Start the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*runtime.Poller[DeploymentsClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -959,7 +979,8 @@ func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupNa // Start - Start the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) start(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -1003,7 +1024,7 @@ func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1011,15 +1032,16 @@ func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourc // BeginStartJFR - Start JFR // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR +// method. func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*runtime.Poller[DeploymentsClientStartJFRResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.startJFR(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) @@ -1034,7 +1056,8 @@ func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGrou // StartJFR - Start JFR // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) startJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*http.Response, error) { req, err := client.startJFRCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) if err != nil { @@ -1078,7 +1101,7 @@ func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticParameters) @@ -1086,13 +1109,14 @@ func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, reso // BeginStop - Stop the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*runtime.Poller[DeploymentsClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, serviceName, appName, deploymentName, options) @@ -1107,7 +1131,8 @@ func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupNam // Stop - Stop the deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) stop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) if err != nil { @@ -1151,7 +1176,7 @@ func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1159,14 +1184,15 @@ func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resource // BeginUpdate - Operation to update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// deploymentResource - Parameters for the update operation -// options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - deploymentResource - Parameters for the update operation +// - options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) @@ -1181,7 +1207,8 @@ func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupN // Update - Operation to update an exiting Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DeploymentsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) if err != nil { @@ -1225,7 +1252,7 @@ func (client *DeploymentsClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deploymentResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go deleted file mode 100644 index 1350186143b9..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/deployments_client_example_test.go +++ /dev/null @@ -1,570 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get.json -func ExampleDeploymentsClient_Get_deploymentsGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get_CustomContainer.json -func ExampleDeploymentsClient_Get_deploymentsGetCustomContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate.json -func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - DeploymentSettings: &armappplatform.DeploymentSettings{ - AddonConfigs: map[string]map[string]interface{}{ - "ApplicationConfigurationService": { - "patterns": []interface{}{ - "mypattern", - }, - }, - }, - EnvironmentVariables: map[string]*string{ - "env": to.Ptr("test"), - }, - LivenessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ReadinessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ResourceRequests: &armappplatform.ResourceRequests{ - CPU: to.Ptr("1000m"), - Memory: to.Ptr("3Gi"), - }, - TerminationGracePeriodSeconds: to.Ptr[int32](30), - }, - Source: &armappplatform.SourceUploadedUserSourceInfo{ - Type: to.Ptr("Source"), - Version: to.Ptr("1.0"), - RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"), - ArtifactSelector: to.Ptr("sub-module-1"), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Capacity: to.Ptr[int32](1), - Tier: to.Ptr("Standard"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json -func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdateCustomContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - DeploymentSettings: &armappplatform.DeploymentSettings{ - EnvironmentVariables: map[string]*string{ - "env": to.Ptr("test"), - }, - LivenessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ReadinessProbe: &armappplatform.Probe{ - DisableProbe: to.Ptr(false), - FailureThreshold: to.Ptr[int32](3), - InitialDelaySeconds: to.Ptr[int32](30), - PeriodSeconds: to.Ptr[int32](10), - ProbeAction: &armappplatform.HTTPGetAction{ - Type: to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction), - Path: to.Ptr("/health"), - Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP), - }, - }, - ResourceRequests: &armappplatform.ResourceRequests{ - CPU: to.Ptr("1000m"), - Memory: to.Ptr("3Gi"), - }, - TerminationGracePeriodSeconds: to.Ptr[int32](30), - }, - Source: &armappplatform.CustomContainerUserSourceInfo{ - Type: to.Ptr("Container"), - CustomContainer: &armappplatform.CustomContainer{ - Args: []*string{ - to.Ptr("-c"), - to.Ptr("while true; do echo hello; sleep 10;done")}, - Command: []*string{ - to.Ptr("/bin/sh")}, - ContainerImage: to.Ptr("myContainerImage:v1"), - ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - Password: to.Ptr("myPassword"), - Username: to.Ptr("myUsername"), - }, - LanguageFramework: to.Ptr("springboot"), - Server: to.Ptr("myacr.azurecr.io"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Delete.json -func ExampleDeploymentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update.json -func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - Source: &armappplatform.SourceUploadedUserSourceInfo{ - Type: to.Ptr("Source"), - Version: to.Ptr("1.0"), - RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"), - ArtifactSelector: to.Ptr("sub-module-1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update_CustomContainer.json -func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdateCustomContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{ - Properties: &armappplatform.DeploymentResourceProperties{ - Source: &armappplatform.CustomContainerUserSourceInfo{ - Type: to.Ptr("Container"), - CustomContainer: &armappplatform.CustomContainer{ - Args: []*string{ - to.Ptr("-c"), - to.Ptr("while true; do echo hello; sleep 10;done")}, - Command: []*string{ - to.Ptr("/bin/sh")}, - ContainerImage: to.Ptr("myNewContainerImage:v1"), - ImageRegistryCredential: &armappplatform.ImageRegistryCredential{ - Password: to.Ptr(""), - Username: to.Ptr("myNewUsername"), - }, - Server: to.Ptr("mynewacr.azurecr.io"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_List.json -func ExampleDeploymentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "myapp", &armappplatform.DeploymentsClientListOptions{Version: []string{}}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_ListForCluster.json -func ExampleDeploymentsClient_NewListForClusterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListForClusterPager("myResourceGroup", "myservice", &armappplatform.DeploymentsClientListForClusterOptions{Version: []string{}}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Start.json -func ExampleDeploymentsClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Stop.json -func ExampleDeploymentsClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Restart.json -func ExampleDeploymentsClient_BeginRestart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRestart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_EnableRemoteDebugging.json -func ExampleDeploymentsClient_BeginEnableRemoteDebugging() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginEnableRemoteDebugging(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", &armappplatform.DeploymentsClientBeginEnableRemoteDebuggingOptions{RemoteDebuggingPayload: &armappplatform.RemoteDebuggingPayload{}}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_DisableRemoteDebugging.json -func ExampleDeploymentsClient_BeginDisableRemoteDebugging() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDisableRemoteDebugging(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetRemoteDebuggingConfig.json -func ExampleDeploymentsClient_GetRemoteDebuggingConfig() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetRemoteDebuggingConfig(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetLogFileUrl.json -func ExampleDeploymentsClient_GetLogFileURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetLogFileURL(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateHeapDump.json -func ExampleDeploymentsClient_BeginGenerateHeapDump() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGenerateHeapDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{ - AppInstance: to.Ptr("myappinstance"), - FilePath: to.Ptr("/byos/diagnose"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateThreadDump.json -func ExampleDeploymentsClient_BeginGenerateThreadDump() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGenerateThreadDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{ - AppInstance: to.Ptr("myappinstance"), - FilePath: to.Ptr("/byos/diagnose"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_StartJFR.json -func ExampleDeploymentsClient_BeginStartJFR() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartJFR(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{ - AppInstance: to.Ptr("myappinstance"), - Duration: to.Ptr("60s"), - FilePath: to.Ptr("/byos/diagnose"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go b/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go index 2d402c65e8fe..ab9d8e9d63ad 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client.go @@ -32,10 +32,10 @@ type DevToolPortalsClient struct { } // NewDevToolPortalsClient creates a new instance of DevToolPortalsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDevToolPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevToolPortalsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewDevToolPortalsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Create the default Dev Tool Portal or update the existing Dev Tool Portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// devToolPortalName - The name of Dev Tool Portal. -// devToolPortalResource - Parameters for the create or update operation -// options - DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - devToolPortalName - The name of Dev Tool Portal. +// - devToolPortalResource - Parameters for the create or update operation +// - options - DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate +// method. func (client *DevToolPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevToolPortalsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options) @@ -80,7 +81,8 @@ func (client *DevToolPortalsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Create the default Dev Tool Portal or update the existing Dev Tool Portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DevToolPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *DevToolPortalsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, devToolPortalResource) @@ -128,13 +130,14 @@ func (client *DevToolPortalsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Disable the default Dev Tool Portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// devToolPortalName - The name of Dev Tool Portal. -// options - DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - devToolPortalName - The name of Dev Tool Portal. +// - options - DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete +// method. func (client *DevToolPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*runtime.Poller[DevToolPortalsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, devToolPortalName, options) @@ -149,7 +152,8 @@ func (client *DevToolPortalsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Disable the default Dev Tool Portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *DevToolPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, options) if err != nil { @@ -189,7 +193,7 @@ func (client *DevToolPortalsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,12 +201,13 @@ func (client *DevToolPortalsClient) deleteCreateRequest(ctx context.Context, res // Get - Get the Application Live and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// devToolPortalName - The name of Dev Tool Portal. -// options - DevToolPortalsClientGetOptions contains the optional parameters for the DevToolPortalsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - devToolPortalName - The name of Dev Tool Portal. +// - options - DevToolPortalsClientGetOptions contains the optional parameters for the DevToolPortalsClient.Get method. func (client *DevToolPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientGetOptions) (DevToolPortalsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, options) if err != nil { @@ -242,7 +247,7 @@ func (client *DevToolPortalsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,11 +263,12 @@ func (client *DevToolPortalsClient) getHandleResponse(resp *http.Response) (DevT } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.NewListPager method. func (client *DevToolPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *DevToolPortalsClientListOptions) *runtime.Pager[DevToolPortalsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DevToolPortalsClientListResponse]{ More: func(page DevToolPortalsClientListResponse) bool { @@ -311,7 +317,7 @@ func (client *DevToolPortalsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go deleted file mode 100644 index 5c522d96793f..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/devtoolportals_client_example_test.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortals_List.json -func ExampleDevToolPortalsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortals_Get.json -func ExampleDevToolPortalsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortals_CreateOrUpdate.json -func ExampleDevToolPortalsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.DevToolPortalResource{ - Properties: &armappplatform.DevToolPortalProperties{ - Features: &armappplatform.DevToolPortalFeatureSettings{ - ApplicationAccelerator: &armappplatform.DevToolPortalFeatureDetail{ - State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - }, - ApplicationLiveView: &armappplatform.DevToolPortalFeatureDetail{ - State: to.Ptr(armappplatform.DevToolPortalFeatureStateEnabled), - }, - }, - Public: to.Ptr(true), - SsoProperties: &armappplatform.DevToolPortalSsoProperties{ - ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - ClientSecret: to.Ptr("xxxxx"), - MetadataURL: to.Ptr("https://login.microsoft.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration"), - Scopes: []*string{ - to.Ptr("openid")}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/DevToolPortal_Delete.json -func ExampleDevToolPortalsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewDevToolPortalsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go index 18507a3d22fa..ba6d50723047 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client.go @@ -32,10 +32,10 @@ type GatewayCustomDomainsClient struct { } // NewGatewayCustomDomainsClient creates a new instance of GatewayCustomDomainsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewGatewayCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayCustomDomainsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewGatewayCustomDomainsClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// domainName - The name of the Spring Cloud Gateway custom domain. -// gatewayCustomDomainResource - The gateway custom domain resource for the create or update operation -// options - GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - domainName - The name of the Spring Cloud Gateway custom domain. +// - gatewayCustomDomainResource - The gateway custom domain resource for the create or update operation +// - options - GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate +// method. func (client *GatewayCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) @@ -81,7 +82,8 @@ func (client *GatewayCustomDomainsClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *GatewayCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) if err != nil { @@ -125,7 +127,7 @@ func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, gatewayCustomDomainResource) @@ -133,14 +135,15 @@ func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Delete the Spring Cloud Gateway custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// domainName - The name of the Spring Cloud Gateway custom domain. -// options - GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - domainName - The name of the Spring Cloud Gateway custom domain. +// - options - GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete +// method. func (client *GatewayCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) @@ -155,7 +158,8 @@ func (client *GatewayCustomDomainsClient) BeginDelete(ctx context.Context, resou // Delete - Delete the Spring Cloud Gateway custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *GatewayCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) if err != nil { @@ -199,7 +203,7 @@ func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,14 +211,15 @@ func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Contex // Get - Get the Spring Cloud Gateway custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// domainName - The name of the Spring Cloud Gateway custom domain. -// options - GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - domainName - The name of the Spring Cloud Gateway custom domain. +// - options - GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get +// method. func (client *GatewayCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) if err != nil { @@ -258,7 +263,7 @@ func (client *GatewayCustomDomainsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,13 +279,14 @@ func (client *GatewayCustomDomainsClient) getHandleResponse(resp *http.Response) } // NewListPager - Handle requests to list all Spring Cloud Gateway custom domains. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager +// method. func (client *GatewayCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[GatewayCustomDomainsClientListResponse]{ More: func(page GatewayCustomDomainsClientListResponse) bool { @@ -333,7 +339,7 @@ func (client *GatewayCustomDomainsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go deleted file mode 100644 index d7c5237687eb..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewaycustomdomains_client_example_test.go +++ /dev/null @@ -1,109 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_Get.json -func ExampleGatewayCustomDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_CreateOrUpdate.json -func ExampleGatewayCustomDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "myDomainName", armappplatform.GatewayCustomDomainResource{ - Properties: &armappplatform.GatewayCustomDomainProperties{ - Thumbprint: to.Ptr("*"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_Delete.json -func ExampleGatewayCustomDomainsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "myDomainName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayCustomDomains_List.json -func ExampleGatewayCustomDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayCustomDomainsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go index e9cf93fc6c1e..9462501ae128 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client.go @@ -32,10 +32,10 @@ type GatewayRouteConfigsClient struct { } // NewGatewayRouteConfigsClient creates a new instance of GatewayRouteConfigsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewGatewayRouteConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayRouteConfigsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,15 +59,16 @@ func NewGatewayRouteConfigsClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway // route configs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// routeConfigName - The name of the Spring Cloud Gateway route config. -// gatewayRouteConfigResource - The Spring Cloud Gateway route config for the create or update operation -// options - GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - routeConfigName - The name of the Spring Cloud Gateway route config. +// - gatewayRouteConfigResource - The Spring Cloud Gateway route config for the create or update operation +// - options - GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate +// method. func (client *GatewayRouteConfigsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) @@ -83,7 +84,8 @@ func (client *GatewayRouteConfigsClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route // configs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *GatewayRouteConfigsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) if err != nil { @@ -127,7 +129,7 @@ func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, gatewayRouteConfigResource) @@ -135,14 +137,15 @@ func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete the Spring Cloud Gateway route config. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// routeConfigName - The name of the Spring Cloud Gateway route config. -// options - GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - routeConfigName - The name of the Spring Cloud Gateway route config. +// - options - GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete +// method. func (client *GatewayRouteConfigsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) @@ -157,7 +160,8 @@ func (client *GatewayRouteConfigsClient) BeginDelete(ctx context.Context, resour // Delete - Delete the Spring Cloud Gateway route config. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *GatewayRouteConfigsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) if err != nil { @@ -201,7 +205,7 @@ func (client *GatewayRouteConfigsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,13 +213,14 @@ func (client *GatewayRouteConfigsClient) deleteCreateRequest(ctx context.Context // Get - Get the Spring Cloud Gateway route configs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// routeConfigName - The name of the Spring Cloud Gateway route config. -// options - GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - routeConfigName - The name of the Spring Cloud Gateway route config. +// - options - GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. func (client *GatewayRouteConfigsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) if err != nil { @@ -259,7 +264,7 @@ func (client *GatewayRouteConfigsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -275,13 +280,14 @@ func (client *GatewayRouteConfigsClient) getHandleResponse(resp *http.Response) } // NewListPager - Handle requests to list all Spring Cloud Gateway route configs. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager +// method. func (client *GatewayRouteConfigsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[GatewayRouteConfigsClientListResponse]{ More: func(page GatewayRouteConfigsClientListResponse) bool { @@ -334,7 +340,7 @@ func (client *GatewayRouteConfigsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go deleted file mode 100644 index c13d4dcb56ca..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gatewayrouteconfigs_client_example_test.go +++ /dev/null @@ -1,123 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_Get.json -func ExampleGatewayRouteConfigsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_CreateOrUpdate.json -func ExampleGatewayRouteConfigsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", armappplatform.GatewayRouteConfigResource{ - Properties: &armappplatform.GatewayRouteConfigProperties{ - AppResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp"), - OpenAPI: &armappplatform.GatewayRouteConfigOpenAPIProperties{ - URI: to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"), - }, - Routes: []*armappplatform.GatewayAPIRoute{ - { - Filters: []*string{ - to.Ptr("StripPrefix=2"), - to.Ptr("RateLimit=1,1s")}, - Predicates: []*string{ - to.Ptr("Path=/api5/customer/**")}, - SsoEnabled: to.Ptr(true), - Title: to.Ptr("myApp route config"), - }}, - Protocol: to.Ptr(armappplatform.GatewayRouteConfigProtocolHTTPS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_Delete.json -func ExampleGatewayRouteConfigsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", "myRouteConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/GatewayRouteConfigs_List.json -func ExampleGatewayRouteConfigsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewayRouteConfigsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go b/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go index 287bd28b0a7c..7c35d532f921 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/gateways_client.go @@ -32,10 +32,10 @@ type GatewaysClient struct { } // NewGatewaysClient creates a new instance of GatewaysClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// gatewayResource - The gateway for the create or update operation -// options - GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - gatewayResource - The gateway for the create or update operation +// - options - GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate +// method. func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) @@ -80,7 +81,8 @@ func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *GatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, gatewayResource) @@ -128,12 +130,13 @@ func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Disable the default Spring Cloud Gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. func (client *GatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, options) @@ -148,7 +151,8 @@ func (client *GatewaysClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Disable the default Spring Cloud Gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *GatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) if err != nil { @@ -188,7 +192,7 @@ func (client *GatewaysClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *GatewaysClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get the Spring Cloud Gateway and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. func (client *GatewaysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (GatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) if err != nil { @@ -241,7 +246,7 @@ func (client *GatewaysClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,12 @@ func (client *GatewaysClient) getHandleResponse(resp *http.Response) (GatewaysCl } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - GatewaysClientListOptions contains the optional parameters for the GatewaysClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. func (client *GatewaysClient) NewListPager(resourceGroupName string, serviceName string, options *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[GatewaysClientListResponse]{ More: func(page GatewaysClientListResponse) bool { @@ -310,7 +316,7 @@ func (client *GatewaysClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,12 +333,13 @@ func (client *GatewaysClient) listHandleResponse(resp *http.Response) (GatewaysC // ListEnvSecrets - List sensitive environment variables of Spring Cloud Gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. func (client *GatewaysClient) ListEnvSecrets(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientListEnvSecretsOptions) (GatewaysClientListEnvSecretsResponse, error) { req, err := client.listEnvSecretsCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) if err != nil { @@ -372,7 +379,7 @@ func (client *GatewaysClient) listEnvSecretsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -387,15 +394,90 @@ func (client *GatewaysClient) listEnvSecretsHandleResponse(resp *http.Response) return result, nil } +// BeginUpdateCapacity - Operation to update an exiting Spring Cloud Gateway capacity. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - gatewayCapacityResource - The gateway capacity for the update operation +// - options - GatewaysClientBeginUpdateCapacityOptions contains the optional parameters for the GatewaysClient.BeginUpdateCapacity +// method. +func (client *GatewaysClient) BeginUpdateCapacity(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayCapacityResource SKUObject, options *GatewaysClientBeginUpdateCapacityOptions) (*runtime.Poller[GatewaysClientUpdateCapacityResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateCapacity(ctx, resourceGroupName, serviceName, gatewayName, gatewayCapacityResource, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewaysClientUpdateCapacityResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[GatewaysClientUpdateCapacityResponse](options.ResumeToken, client.pl, nil) + } +} + +// UpdateCapacity - Operation to update an exiting Spring Cloud Gateway capacity. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-01-01-preview +func (client *GatewaysClient) updateCapacity(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayCapacityResource SKUObject, options *GatewaysClientBeginUpdateCapacityOptions) (*http.Response, error) { + req, err := client.updateCapacityCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, gatewayCapacityResource, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// updateCapacityCreateRequest creates the UpdateCapacity request. +func (client *GatewaysClient) updateCapacityCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayCapacityResource SKUObject, options *GatewaysClientBeginUpdateCapacityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-01-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, gatewayCapacityResource) +} + // ValidateDomain - Check the domains are valid as well as not in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// validatePayload - Custom domain payload to be validated -// options - GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - validatePayload - Custom domain payload to be validated +// - options - GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. func (client *GatewaysClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error) { req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, validatePayload, options) if err != nil { @@ -435,7 +517,7 @@ func (client *GatewaysClient) validateDomainCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validatePayload) diff --git a/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go deleted file mode 100644 index 13a4c6e9e95b..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/gateways_client_example_test.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_Get.json -func ExampleGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_CreateOrUpdate.json -func ExampleGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.GatewayResource{ - Properties: &armappplatform.GatewayProperties{ - Public: to.Ptr(true), - ResourceRequests: &armappplatform.GatewayResourceRequests{ - CPU: to.Ptr("1"), - Memory: to.Ptr("1G"), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Capacity: to.Ptr[int32](2), - Tier: to.Ptr("Enterprise"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_Delete.json -func ExampleGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_ListEnvSecrets.json -func ExampleGatewaysClient_ListEnvSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListEnvSecrets(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_List.json -func ExampleGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Gateways_ValidateDomain.json -func ExampleGatewaysClient_ValidateDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewGatewaysClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ValidateDomain(ctx, "myResourceGroup", "myservice", "default", armappplatform.CustomDomainValidatePayload{ - Name: to.Ptr("mydomain.io"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/go.mod b/sdk/resourcemanager/appplatform/armappplatform/go.mod index b323730ce4cc..cd1ba208460d 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/go.mod +++ b/sdk/resourcemanager/appplatform/armappplatform/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappp go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect - github.com/golang-jwt/jwt/v4 v4.4.2 // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/appplatform/armappplatform/go.sum b/sdk/resourcemanager/appplatform/armappplatform/go.sum index 8c0539b73123..3afb578030a5 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/go.sum +++ b/sdk/resourcemanager/appplatform/armappplatform/go.sum @@ -1,30 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/appplatform/armappplatform/models.go b/sdk/resourcemanager/appplatform/armappplatform/models.go index 84e3507d01be..1fdd00c76180 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models.go @@ -64,7 +64,8 @@ type APIPortalCustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.List method. +// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager +// method. type APIPortalCustomDomainsClientListOptions struct { // placeholder for future optional parameters } @@ -165,7 +166,7 @@ type APIPortalsClientGetOptions struct { // placeholder for future optional parameters } -// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.List method. +// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. type APIPortalsClientListOptions struct { // placeholder for future optional parameters } @@ -309,7 +310,7 @@ type AppResourceCollection struct { // AppResourceProperties - App resource properties payload type AppResourceProperties struct { // Collection of addons - AddonConfigs map[string]map[string]interface{} `json:"addonConfigs,omitempty"` + AddonConfigs map[string]any `json:"addonConfigs,omitempty"` // List of custom persistent disks CustomPersistentDisks []*CustomPersistentDiskResource `json:"customPersistentDisks,omitempty"` @@ -332,6 +333,9 @@ type AppResourceProperties struct { // Indicates whether the App exposes public endpoint Public *bool `json:"public,omitempty"` + // Collection of auth secrets + Secrets []*Secret `json:"secrets,omitempty"` + // Temporary disk settings TemporaryDisk *TemporaryDisk `json:"temporaryDisk,omitempty"` @@ -445,7 +449,8 @@ type ApplicationAcceleratorsClientGetOptions struct { // placeholder for future optional parameters } -// ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.List method. +// ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.NewListPager +// method. type ApplicationAcceleratorsClientListOptions struct { // placeholder for future optional parameters } @@ -462,7 +467,7 @@ type ApplicationLiveViewComponent struct { Instances []*ApplicationLiveViewInstance `json:"instances,omitempty" azure:"ro"` // READ-ONLY; Name of the component. - Name interface{} `json:"name,omitempty" azure:"ro"` + Name any `json:"name,omitempty" azure:"ro"` // READ-ONLY; The requested resource quantity for required CPU and Memory. ResourceRequests *ApplicationLiveViewResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` @@ -546,7 +551,8 @@ type ApplicationLiveViewsClientGetOptions struct { // placeholder for future optional parameters } -// ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.List method. +// ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.NewListPager +// method. type ApplicationLiveViewsClientListOptions struct { // placeholder for future optional parameters } @@ -587,7 +593,7 @@ type AppsClientGetResourceUploadURLOptions struct { // placeholder for future optional parameters } -// AppsClientListOptions contains the optional parameters for the AppsClient.List method. +// AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. type AppsClientListOptions struct { // placeholder for future optional parameters } @@ -616,26 +622,30 @@ type AzureFileVolume struct { // REQUIRED; The mount path of the persistent disk. MountPath *string `json:"mountPath,omitempty"` - // REQUIRED; The share name of the Azure File share. - ShareName *string `json:"shareName,omitempty"` - // REQUIRED; The type of the underlying resource to mount as a persistent disk. Type *Type `json:"type,omitempty"` + // If set to true, it will create and mount a dedicated directory for every individual app instance. + EnableSubPath *bool `json:"enableSubPath,omitempty"` + // These are the mount options for a persistent disk. MountOptions []*string `json:"mountOptions,omitempty"` // Indicates whether the persistent disk is a readOnly one. ReadOnly *bool `json:"readOnly,omitempty"` + + // The share name of the Azure File share. + ShareName *string `json:"shareName,omitempty"` } // GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type AzureFileVolume. func (a *AzureFileVolume) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { return &CustomPersistentDiskProperties{ - Type: a.Type, - MountPath: a.MountPath, - ReadOnly: a.ReadOnly, - MountOptions: a.MountOptions, + Type: a.Type, + MountPath: a.MountPath, + ReadOnly: a.ReadOnly, + EnableSubPath: a.EnableSubPath, + MountOptions: a.MountOptions, } } @@ -669,7 +679,7 @@ type BindingResourceCollection struct { // BindingResourceProperties - Binding resource properties payload type BindingResourceProperties struct { // Binding parameters of the Binding resource - BindingParameters map[string]interface{} `json:"bindingParameters,omitempty"` + BindingParameters map[string]*string `json:"bindingParameters,omitempty"` // The key of the bound resource Key *string `json:"key,omitempty"` @@ -716,7 +726,7 @@ type BindingsClientGetOptions struct { // placeholder for future optional parameters } -// BindingsClientListOptions contains the optional parameters for the BindingsClient.List method. +// BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method. type BindingsClientListOptions struct { // placeholder for future optional parameters } @@ -884,7 +894,8 @@ type BuildServiceAgentPoolClientGetOptions struct { // placeholder for future optional parameters } -// BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.List method. +// BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager +// method. type BuildServiceAgentPoolClientListOptions struct { // placeholder for future optional parameters } @@ -963,7 +974,7 @@ type BuildServiceBuilderClientListDeploymentsOptions struct { // placeholder for future optional parameters } -// BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.List method. +// BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager method. type BuildServiceBuilderClientListOptions struct { // placeholder for future optional parameters } @@ -1013,19 +1024,19 @@ type BuildServiceClientGetSupportedStackOptions struct { // placeholder for future optional parameters } -// BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.ListBuildResults +// BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager // method. type BuildServiceClientListBuildResultsOptions struct { // placeholder for future optional parameters } -// BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.ListBuildServices +// BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager // method. type BuildServiceClientListBuildServicesOptions struct { // placeholder for future optional parameters } -// BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.ListBuilds method. +// BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager method. type BuildServiceClientListBuildsOptions struct { // placeholder for future optional parameters } @@ -1144,7 +1155,13 @@ type BuildpackBindingClientGetOptions struct { // placeholder for future optional parameters } -// BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.List method. +// BuildpackBindingClientListForClusterOptions contains the optional parameters for the BuildpackBindingClient.NewListForClusterPager +// method. +type BuildpackBindingClientListForClusterOptions struct { + // placeholder for future optional parameters +} + +// BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager method. type BuildpackBindingClientListOptions struct { // placeholder for future optional parameters } @@ -1300,13 +1317,19 @@ type CertificatesClientGetOptions struct { // placeholder for future optional parameters } -// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. +// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. type CertificatesClientListOptions struct { // placeholder for future optional parameters } // ClusterResourceProperties - Service properties payload type ClusterResourceProperties struct { + // The name of the resource group that contains the infrastructure resources + InfraResourceGroup *string `json:"infraResourceGroup,omitempty"` + + // The resource Id of the Managed Environment that the Spring Apps instance builds on + ManagedEnvironmentID *string `json:"managedEnvironmentId,omitempty"` + // Purchasing 3rd party product of the Service resource. MarketplaceResource *MarketplaceResource `json:"marketplaceResource,omitempty"` @@ -1600,7 +1623,8 @@ type ConfigurationServicesClientGetOptions struct { // placeholder for future optional parameters } -// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.List method. +// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. type ConfigurationServicesClientListOptions struct { // placeholder for future optional parameters } @@ -1781,7 +1805,7 @@ type CustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.List method. +// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. type CustomDomainsClientListOptions struct { // placeholder for future optional parameters } @@ -1803,6 +1827,9 @@ type CustomPersistentDiskProperties struct { // REQUIRED; The type of the underlying resource to mount as a persistent disk. Type *Type `json:"type,omitempty"` + // If set to true, it will create and mount a dedicated directory for every individual app instance. + EnableSubPath *bool `json:"enableSubPath,omitempty"` + // These are the mount options for a persistent disk. MountOptions []*string `json:"mountOptions,omitempty"` @@ -1824,6 +1851,18 @@ type CustomPersistentDiskResource struct { CustomPersistentDiskProperties CustomPersistentDiskPropertiesClassification `json:"customPersistentDiskProperties,omitempty"` } +// CustomScaleRule - Azure Spring Apps App Instance Custom scaling rule. +type CustomScaleRule struct { + // Authentication secrets for the custom scale rule. + Auth []*ScaleRuleAuth `json:"auth,omitempty"` + + // Metadata properties to describe custom scale rule. + Metadata map[string]*string `json:"metadata,omitempty"` + + // Type of the custom scale rule eg: azure-servicebus, redis etc. + Type *string `json:"type,omitempty"` +} + // CustomizedAcceleratorProperties - Customized accelerator properties payload type CustomizedAcceleratorProperties struct { // REQUIRED @@ -1891,7 +1930,8 @@ type CustomizedAcceleratorsClientGetOptions struct { // placeholder for future optional parameters } -// CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.List method. +// CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.NewListPager +// method. type CustomizedAcceleratorsClientListOptions struct { // placeholder for future optional parameters } @@ -1983,7 +2023,7 @@ type DeploymentResourceProperties struct { // DeploymentSettings - Deployment settings payload type DeploymentSettings struct { // Collection of addons - AddonConfigs map[string]map[string]interface{} `json:"addonConfigs,omitempty"` + AddonConfigs map[string]any `json:"addonConfigs,omitempty"` // Container liveness and readiness probe settings ContainerProbeSettings *ContainerProbeSettings `json:"containerProbeSettings,omitempty"` @@ -2004,6 +2044,9 @@ type DeploymentSettings struct { // later. ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` + // Scaling properties for the Azure Spring Apps App Instance. + Scale *Scale `json:"scale,omitempty"` + // StartupProbe indicates that the App Instance has successfully initialized. If specified, no other probes are executed until // this completes successfully. If this probe fails, the Pod will be restarted, // just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a App Instance's @@ -2110,13 +2153,14 @@ type DeploymentsClientGetRemoteDebuggingConfigOptions struct { // placeholder for future optional parameters } -// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.ListForCluster method. +// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager +// method. type DeploymentsClientListForClusterOptions struct { // Version of the deployments to be listed Version []string } -// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.List method. +// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. type DeploymentsClientListOptions struct { // Version of the deployments to be listed Version []string @@ -2246,7 +2290,7 @@ type DevToolPortalsClientGetOptions struct { // placeholder for future optional parameters } -// DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.List method. +// DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.NewListPager method. type DevToolPortalsClientListOptions struct { // placeholder for future optional parameters } @@ -2417,7 +2461,8 @@ type GatewayCustomDomainsClientGetOptions struct { // placeholder for future optional parameters } -// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.List method. +// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager +// method. type GatewayCustomDomainsClientListOptions struct { // placeholder for future optional parameters } @@ -2621,7 +2666,7 @@ type GatewayRouteConfigsClientGetOptions struct { // placeholder for future optional parameters } -// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.List method. +// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager method. type GatewayRouteConfigsClientListOptions struct { // placeholder for future optional parameters } @@ -2638,6 +2683,12 @@ type GatewaysClientBeginDeleteOptions struct { ResumeToken string } +// GatewaysClientBeginUpdateCapacityOptions contains the optional parameters for the GatewaysClient.BeginUpdateCapacity method. +type GatewaysClientBeginUpdateCapacityOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. type GatewaysClientGetOptions struct { // placeholder for future optional parameters @@ -2648,7 +2699,7 @@ type GatewaysClientListEnvSecretsOptions struct { // placeholder for future optional parameters } -// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.List method. +// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. type GatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -2716,6 +2767,15 @@ func (h *HTTPGetAction) GetProbeAction() *ProbeAction { } } +// HTTPScaleRule - Azure Spring Apps App Instance Http scaling rule. +type HTTPScaleRule struct { + // Authentication secrets for the custom scale rule. + Auth []*ScaleRuleAuth `json:"auth,omitempty"` + + // Metadata properties to describe http scale rule. + Metadata map[string]*string `json:"metadata,omitempty"` +} + // ImageRegistryCredential - Credential of the image registry type ImageRegistryCredential struct { // The password of the image registry credential @@ -3146,7 +3206,7 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -3229,7 +3289,8 @@ type PredefinedAcceleratorsClientGetOptions struct { // placeholder for future optional parameters } -// PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.List method. +// PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.NewListPager +// method. type PredefinedAcceleratorsClientListOptions struct { // placeholder for future optional parameters } @@ -3294,6 +3355,18 @@ type ProxyResource struct { Type *string `json:"type,omitempty" azure:"ro"` } +// QueueScaleRule - Azure Spring Apps App Instance Azure Queue based scaling rule. +type QueueScaleRule struct { + // Authentication secrets for the queue scale rule. + Auth []*ScaleRuleAuth `json:"auth,omitempty"` + + // Queue length. + QueueLength *int32 `json:"queueLength,omitempty"` + + // Queue name. + QueueName *string `json:"queueName,omitempty"` +} + // RegenerateTestKeyRequestPayload - Regenerate test key request payload type RegenerateTestKeyRequestPayload struct { // REQUIRED; Type of the test key @@ -3488,11 +3561,65 @@ type SKUCapacity struct { ScaleType *SKUScaleType `json:"scaleType,omitempty"` } -// SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. +// SKUObject - Resource Sku object used for scaling out and scaling in. +type SKUObject struct { + // Sku of the Spring Cloud Gateway resource + SKU *SKU `json:"sku,omitempty"` +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. type SKUsClientListOptions struct { // placeholder for future optional parameters } +// Scale - Azure Spring Apps scaling configurations. +type Scale struct { + // Optional. Maximum number of container replicas. Defaults to 10 if not set. + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + + // Optional. Minimum number of container replicas. + MinReplicas *int32 `json:"minReplicas,omitempty"` + + // Scaling rules. + Rules []*ScaleRule `json:"rules,omitempty"` +} + +// ScaleRule - Azure Spring Apps App Instance scaling rule. +type ScaleRule struct { + // Azure Queue based scaling. + AzureQueue *QueueScaleRule `json:"azureQueue,omitempty"` + + // Custom scale rule. + Custom *CustomScaleRule `json:"custom,omitempty"` + + // HTTP requests based scaling. + HTTP *HTTPScaleRule `json:"http,omitempty"` + + // Scale Rule Name + Name *string `json:"name,omitempty"` + + // Tcp requests based scaling. + TCP *TCPScaleRule `json:"tcp,omitempty"` +} + +// ScaleRuleAuth - Auth Secrets for Azure Spring Apps App Instance Scale Rule +type ScaleRuleAuth struct { + // Name of the Azure Spring Apps App Instance secret from which to pull the auth params. + SecretRef *string `json:"secretRef,omitempty"` + + // Trigger Parameter that uses the secret + TriggerParameter *string `json:"triggerParameter,omitempty"` +} + +// Secret definition. +type Secret struct { + // Secret Name. + Name *string `json:"name,omitempty"` + + // Secret Value. + Value *string `json:"value,omitempty"` +} + // ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate // method. type ServiceRegistriesClientBeginCreateOrUpdateOptions struct { @@ -3512,7 +3639,7 @@ type ServiceRegistriesClientGetOptions struct { // placeholder for future optional parameters } -// ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.List method. +// ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager method. type ServiceRegistriesClientListOptions struct { // placeholder for future optional parameters } @@ -3680,12 +3807,13 @@ type ServicesClientGetOptions struct { // placeholder for future optional parameters } -// ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method. +// ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager +// method. type ServicesClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// ServicesClientListOptions contains the optional parameters for the ServicesClient.List method. +// ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. type ServicesClientListOptions struct { // placeholder for future optional parameters } @@ -3841,7 +3969,7 @@ type StoragesClientGetOptions struct { // placeholder for future optional parameters } -// StoragesClientListOptions contains the optional parameters for the StoragesClient.List method. +// StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. type StoragesClientListOptions struct { // placeholder for future optional parameters } @@ -3949,6 +4077,15 @@ type SystemData struct { LastModifiedByType *LastModifiedByType `json:"lastModifiedByType,omitempty"` } +// TCPScaleRule - Azure Spring Apps App Instance Tcp scaling rule. +type TCPScaleRule struct { + // Authentication secrets for the tcp scale rule. + Auth []*ScaleRuleAuth `json:"auth,omitempty"` + + // Metadata properties to describe tcp scale rule. + Metadata map[string]*string `json:"metadata,omitempty"` +} + // TCPSocketAction describes an action based on opening a socket type TCPSocketAction struct { // REQUIRED; The type of the action to take to perform the health check. diff --git a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go index c7f381620336..af76a8d3f4e8 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/models_serde.go +++ b/sdk/resourcemanager/appplatform/armappplatform/models_serde.go @@ -18,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainProperties. func (a APIPortalCustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "thumbprint", a.Thumbprint) return json.Marshal(objectMap) } @@ -45,7 +45,7 @@ func (a *APIPortalCustomDomainProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResource. func (a APIPortalCustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -88,7 +88,7 @@ func (a *APIPortalCustomDomainResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResourceCollection. func (a APIPortalCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -119,7 +119,7 @@ func (a *APIPortalCustomDomainResourceCollection) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type APIPortalInstance. func (a APIPortalInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", a.Name) populate(objectMap, "status", a.Status) return json.Marshal(objectMap) @@ -150,7 +150,7 @@ func (a *APIPortalInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalProperties. func (a APIPortalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gatewayIds", a.GatewayIDs) populate(objectMap, "httpsOnly", a.HTTPSOnly) populate(objectMap, "instances", a.Instances) @@ -209,7 +209,7 @@ func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalResource. func (a APIPortalResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -256,7 +256,7 @@ func (a *APIPortalResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalResourceCollection. func (a APIPortalResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -287,7 +287,7 @@ func (a *APIPortalResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type APIPortalResourceRequests. func (a APIPortalResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", a.CPU) populate(objectMap, "memory", a.Memory) return json.Marshal(objectMap) @@ -318,7 +318,7 @@ func (a *APIPortalResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AcceleratorAuthSetting. func (a AcceleratorAuthSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = a.AuthType return json.Marshal(objectMap) } @@ -345,7 +345,7 @@ func (a *AcceleratorAuthSetting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AcceleratorBasicAuthSetting. func (a AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = "BasicAuth" populate(objectMap, "password", a.Password) populate(objectMap, "username", a.Username) @@ -380,7 +380,7 @@ func (a *AcceleratorBasicAuthSetting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AcceleratorGitRepository. func (a AcceleratorGitRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authSetting", a.AuthSetting) populate(objectMap, "branch", a.Branch) populate(objectMap, "commit", a.Commit) @@ -427,7 +427,7 @@ func (a *AcceleratorGitRepository) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AcceleratorPublicSetting. func (a AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = "Public" return json.Marshal(objectMap) } @@ -454,7 +454,7 @@ func (a *AcceleratorPublicSetting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AcceleratorSSHSetting. func (a AcceleratorSSHSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = "SSH" populate(objectMap, "hostKey", a.HostKey) populate(objectMap, "hostKeyAlgorithm", a.HostKeyAlgorithm) @@ -493,7 +493,7 @@ func (a *AcceleratorSSHSetting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveDeploymentCollection. func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activeDeploymentNames", a.ActiveDeploymentNames) return json.Marshal(objectMap) } @@ -520,7 +520,7 @@ func (a *ActiveDeploymentCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppResource. func (a AppResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "identity", a.Identity) populate(objectMap, "location", a.Location) @@ -571,7 +571,7 @@ func (a *AppResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppResourceCollection. func (a AppResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -602,7 +602,7 @@ func (a *AppResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppResourceProperties. func (a AppResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addonConfigs", a.AddonConfigs) populate(objectMap, "customPersistentDisks", a.CustomPersistentDisks) populate(objectMap, "enableEndToEndTLS", a.EnableEndToEndTLS) @@ -613,6 +613,7 @@ func (a AppResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "persistentDisk", a.PersistentDisk) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "public", a.Public) + populate(objectMap, "secrets", a.Secrets) populate(objectMap, "temporaryDisk", a.TemporaryDisk) populate(objectMap, "url", a.URL) populate(objectMap, "vnetAddons", a.VnetAddons) @@ -658,6 +659,9 @@ func (a *AppResourceProperties) UnmarshalJSON(data []byte) error { case "public": err = unpopulate(val, "Public", &a.Public) delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &a.Secrets) + delete(rawMsg, key) case "temporaryDisk": err = unpopulate(val, "TemporaryDisk", &a.TemporaryDisk) delete(rawMsg, key) @@ -677,7 +681,7 @@ func (a *AppResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AppVNetAddons. func (a AppVNetAddons) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "publicEndpoint", a.PublicEndpoint) populate(objectMap, "publicEndpointUrl", a.PublicEndpointURL) return json.Marshal(objectMap) @@ -708,7 +712,7 @@ func (a *AppVNetAddons) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorComponent. func (a ApplicationAcceleratorComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", a.Instances) populate(objectMap, "name", a.Name) populate(objectMap, "resourceRequests", a.ResourceRequests) @@ -743,7 +747,7 @@ func (a *ApplicationAcceleratorComponent) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorInstance. func (a ApplicationAcceleratorInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", a.Name) populate(objectMap, "status", a.Status) return json.Marshal(objectMap) @@ -774,7 +778,7 @@ func (a *ApplicationAcceleratorInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorProperties. func (a ApplicationAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "components", a.Components) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) @@ -805,7 +809,7 @@ func (a *ApplicationAcceleratorProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResource. func (a ApplicationAcceleratorResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -852,7 +856,7 @@ func (a *ApplicationAcceleratorResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceCollection. func (a ApplicationAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -883,7 +887,7 @@ func (a *ApplicationAcceleratorResourceCollection) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceRequests. func (a ApplicationAcceleratorResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", a.CPU) populate(objectMap, "instanceCount", a.InstanceCount) populate(objectMap, "memory", a.Memory) @@ -918,7 +922,7 @@ func (a *ApplicationAcceleratorResourceRequests) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions. func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "java", a.Java) return json.Marshal(objectMap) } @@ -945,7 +949,7 @@ func (a *ApplicationInsightsAgentVersions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewComponent. func (a ApplicationLiveViewComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", a.Instances) populate(objectMap, "name", &a.Name) populate(objectMap, "resourceRequests", a.ResourceRequests) @@ -980,7 +984,7 @@ func (a *ApplicationLiveViewComponent) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewInstance. func (a ApplicationLiveViewInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", a.Name) populate(objectMap, "status", a.Status) return json.Marshal(objectMap) @@ -1011,7 +1015,7 @@ func (a *ApplicationLiveViewInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewProperties. func (a ApplicationLiveViewProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "components", a.Components) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) @@ -1042,7 +1046,7 @@ func (a *ApplicationLiveViewProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResource. func (a ApplicationLiveViewResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -1085,7 +1089,7 @@ func (a *ApplicationLiveViewResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResourceCollection. func (a ApplicationLiveViewResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -1116,7 +1120,7 @@ func (a *ApplicationLiveViewResourceCollection) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResourceRequests. func (a ApplicationLiveViewResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", a.CPU) populate(objectMap, "instanceCount", a.InstanceCount) populate(objectMap, "memory", a.Memory) @@ -1151,7 +1155,7 @@ func (a *ApplicationLiveViewResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableOperations. func (a AvailableOperations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -1182,7 +1186,7 @@ func (a *AvailableOperations) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions. func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) } @@ -1209,7 +1213,8 @@ func (a *AvailableRuntimeVersions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFileVolume. func (a AzureFileVolume) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "enableSubPath", a.EnableSubPath) populate(objectMap, "mountOptions", a.MountOptions) populate(objectMap, "mountPath", a.MountPath) populate(objectMap, "readOnly", a.ReadOnly) @@ -1227,6 +1232,9 @@ func (a *AzureFileVolume) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "enableSubPath": + err = unpopulate(val, "EnableSubPath", &a.EnableSubPath) + delete(rawMsg, key) case "mountOptions": err = unpopulate(val, "MountOptions", &a.MountOptions) delete(rawMsg, key) @@ -1252,7 +1260,7 @@ func (a *AzureFileVolume) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BindingResource. func (b BindingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -1295,7 +1303,7 @@ func (b *BindingResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection. func (b BindingResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1326,7 +1334,7 @@ func (b *BindingResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties. func (b BindingResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bindingParameters", b.BindingParameters) populate(objectMap, "createdAt", b.CreatedAt) populate(objectMap, "generatedProperties", b.GeneratedProperties) @@ -1381,7 +1389,7 @@ func (b *BindingResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Build. func (b Build) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -1424,7 +1432,7 @@ func (b *Build) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildCollection. func (b BuildCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1455,7 +1463,7 @@ func (b *BuildCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildProperties. func (b BuildProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "agentPool", b.AgentPool) populate(objectMap, "builder", b.Builder) populate(objectMap, "env", b.Env) @@ -1506,7 +1514,7 @@ func (b *BuildProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildResourceRequests. func (b BuildResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", b.CPU) populate(objectMap, "memory", b.Memory) return json.Marshal(objectMap) @@ -1537,7 +1545,7 @@ func (b *BuildResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildResult. func (b BuildResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -1580,7 +1588,7 @@ func (b *BuildResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildResultCollection. func (b BuildResultCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1611,7 +1619,7 @@ func (b *BuildResultCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildResultLog. func (b BuildResultLog) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "blobUrl", b.BlobURL) return json.Marshal(objectMap) } @@ -1638,7 +1646,7 @@ func (b *BuildResultLog) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. func (b BuildResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "buildPodName", b.BuildPodName) populate(objectMap, "buildStages", b.BuildStages) populate(objectMap, "error", b.Error) @@ -1681,7 +1689,7 @@ func (b *BuildResultProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "buildResultId", b.BuildResultID) objectMap["type"] = "BuildResult" populate(objectMap, "version", b.Version) @@ -1716,7 +1724,7 @@ func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildService. func (b BuildService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -1759,7 +1767,7 @@ func (b *BuildService) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties. func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "poolSize", b.PoolSize) populate(objectMap, "provisioningState", b.ProvisioningState) return json.Marshal(objectMap) @@ -1790,7 +1798,7 @@ func (b *BuildServiceAgentPoolProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -1833,7 +1841,7 @@ func (b *BuildServiceAgentPoolResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResourceCollection. func (b BuildServiceAgentPoolResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1864,7 +1872,7 @@ func (b *BuildServiceAgentPoolResourceCollection) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolSizeProperties. func (b BuildServiceAgentPoolSizeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", b.CPU) populate(objectMap, "memory", b.Memory) populate(objectMap, "name", b.Name) @@ -1899,7 +1907,7 @@ func (b *BuildServiceAgentPoolSizeProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildServiceCollection. func (b BuildServiceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1930,7 +1938,7 @@ func (b *BuildServiceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildServiceProperties. func (b BuildServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "kPackVersion", b.KPackVersion) populate(objectMap, "provisioningState", b.ProvisioningState) populate(objectMap, "resourceRequests", b.ResourceRequests) @@ -1965,7 +1973,7 @@ func (b *BuildServiceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildServicePropertiesResourceRequests. func (b BuildServicePropertiesResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", b.CPU) populate(objectMap, "memory", b.Memory) return json.Marshal(objectMap) @@ -1996,7 +2004,7 @@ func (b *BuildServicePropertiesResourceRequests) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type BuildStageProperties. func (b BuildStageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "exitCode", b.ExitCode) populate(objectMap, "name", b.Name) populate(objectMap, "reason", b.Reason) @@ -2035,7 +2043,7 @@ func (b *BuildStageProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuilderProperties. func (b BuilderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "buildpackGroups", b.BuildpackGroups) populate(objectMap, "provisioningState", b.ProvisioningState) populate(objectMap, "stack", b.Stack) @@ -2070,7 +2078,7 @@ func (b *BuilderProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuilderResource. func (b BuilderResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -2113,7 +2121,7 @@ func (b *BuilderResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuilderResourceCollection. func (b BuilderResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -2144,7 +2152,7 @@ func (b *BuilderResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties. func (b BuildpackBindingLaunchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", b.Properties) populate(objectMap, "secrets", b.Secrets) return json.Marshal(objectMap) @@ -2175,7 +2183,7 @@ func (b *BuildpackBindingLaunchProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildpackBindingProperties. func (b BuildpackBindingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bindingType", b.BindingType) populate(objectMap, "launchProperties", b.LaunchProperties) populate(objectMap, "provisioningState", b.ProvisioningState) @@ -2210,7 +2218,7 @@ func (b *BuildpackBindingProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResource. func (b BuildpackBindingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) populate(objectMap, "properties", b.Properties) @@ -2253,7 +2261,7 @@ func (b *BuildpackBindingResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResourceCollection. func (b BuildpackBindingResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -2284,7 +2292,7 @@ func (b *BuildpackBindingResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildpackProperties. func (b BuildpackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) return json.Marshal(objectMap) } @@ -2311,7 +2319,7 @@ func (b *BuildpackProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties. func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "buildpacks", b.Buildpacks) populate(objectMap, "name", b.Name) return json.Marshal(objectMap) @@ -2342,7 +2350,7 @@ func (b *BuildpacksGroupProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateProperties. func (c CertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activateDate", c.ActivateDate) populate(objectMap, "dnsNames", c.DNSNames) populate(objectMap, "expirationDate", c.ExpirationDate) @@ -2401,7 +2409,7 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateResource. func (c CertificateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2444,7 +2452,7 @@ func (c *CertificateResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateResourceCollection. func (c CertificateResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -2475,8 +2483,10 @@ func (c *CertificateResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties. func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdn", c.Fqdn) + populate(objectMap, "infraResourceGroup", c.InfraResourceGroup) + populate(objectMap, "managedEnvironmentId", c.ManagedEnvironmentID) populate(objectMap, "marketplaceResource", c.MarketplaceResource) populate(objectMap, "networkProfile", c.NetworkProfile) populate(objectMap, "powerState", c.PowerState) @@ -2500,6 +2510,12 @@ func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error { case "fqdn": err = unpopulate(val, "Fqdn", &c.Fqdn) delete(rawMsg, key) + case "infraResourceGroup": + err = unpopulate(val, "InfraResourceGroup", &c.InfraResourceGroup) + delete(rawMsg, key) + case "managedEnvironmentId": + err = unpopulate(val, "ManagedEnvironmentID", &c.ManagedEnvironmentID) + delete(rawMsg, key) case "marketplaceResource": err = unpopulate(val, "MarketplaceResource", &c.MarketplaceResource) delete(rawMsg, key) @@ -2534,7 +2550,7 @@ func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigServerGitProperty. func (c ConfigServerGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hostKey", c.HostKey) populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) populate(objectMap, "label", c.Label) @@ -2597,7 +2613,7 @@ func (c *ConfigServerGitProperty) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigServerProperties. func (c ConfigServerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configServer", c.ConfigServer) populate(objectMap, "error", c.Error) populate(objectMap, "provisioningState", c.ProvisioningState) @@ -2632,7 +2648,7 @@ func (c *ConfigServerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigServerResource. func (c ConfigServerResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2675,7 +2691,7 @@ func (c *ConfigServerResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigServerSettings. func (c ConfigServerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gitProperty", c.GitProperty) return json.Marshal(objectMap) } @@ -2702,7 +2718,7 @@ func (c *ConfigServerSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsErrorRecord. func (c ConfigServerSettingsErrorRecord) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "messages", c.Messages) populate(objectMap, "name", c.Name) populate(objectMap, "uri", c.URI) @@ -2737,7 +2753,7 @@ func (c *ConfigServerSettingsErrorRecord) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsValidateResult. func (c ConfigServerSettingsValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "details", c.Details) populate(objectMap, "isValid", c.IsValid) return json.Marshal(objectMap) @@ -2768,7 +2784,7 @@ func (c *ConfigServerSettingsValidateResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty. func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "repositories", c.Repositories) return json.Marshal(objectMap) } @@ -2795,7 +2811,7 @@ func (c *ConfigurationServiceGitProperty) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitPropertyValidateResult. func (c ConfigurationServiceGitPropertyValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gitReposValidationResult", c.GitReposValidationResult) populate(objectMap, "isValid", c.IsValid) return json.Marshal(objectMap) @@ -2826,7 +2842,7 @@ func (c *ConfigurationServiceGitPropertyValidateResult) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository. func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hostKey", c.HostKey) populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) populate(objectMap, "label", c.Label) @@ -2893,7 +2909,7 @@ func (c *ConfigurationServiceGitRepository) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceInstance. func (c ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", c.Name) populate(objectMap, "status", c.Status) return json.Marshal(objectMap) @@ -2924,7 +2940,7 @@ func (c *ConfigurationServiceInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceProperties. func (c ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", c.Instances) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "resourceRequests", c.ResourceRequests) @@ -2963,7 +2979,7 @@ func (c *ConfigurationServiceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource. func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -3006,7 +3022,7 @@ func (c *ConfigurationServiceResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceCollection. func (c ConfigurationServiceResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -3037,7 +3053,7 @@ func (c *ConfigurationServiceResourceCollection) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceRequests. func (c ConfigurationServiceResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", c.CPU) populate(objectMap, "instanceCount", c.InstanceCount) populate(objectMap, "memory", c.Memory) @@ -3072,7 +3088,7 @@ func (c *ConfigurationServiceResourceRequests) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettings. func (c ConfigurationServiceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gitProperty", c.GitProperty) return json.Marshal(objectMap) } @@ -3099,7 +3115,7 @@ func (c *ConfigurationServiceSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettingsValidateResult. func (c ConfigurationServiceSettingsValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gitPropertyValidationResult", c.GitPropertyValidationResult) return json.Marshal(objectMap) } @@ -3126,7 +3142,7 @@ func (c *ConfigurationServiceSettingsValidateResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ContainerProbeSettings. func (c ContainerProbeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "disableProbe", c.DisableProbe) return json.Marshal(objectMap) } @@ -3153,7 +3169,7 @@ func (c *ContainerProbeSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties. func (c ContentCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activateDate", c.ActivateDate) populate(objectMap, "content", c.Content) populate(objectMap, "dnsNames", c.DNSNames) @@ -3216,7 +3232,7 @@ func (c *ContentCertificateProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomContainer. func (c CustomContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "args", c.Args) populate(objectMap, "command", c.Command) populate(objectMap, "containerImage", c.ContainerImage) @@ -3263,7 +3279,7 @@ func (c *CustomContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomContainerUserSourceInfo. func (c CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customContainer", c.CustomContainer) objectMap["type"] = "Container" populate(objectMap, "version", c.Version) @@ -3298,7 +3314,7 @@ func (c *CustomContainerUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appName", c.AppName) populate(objectMap, "certName", c.CertName) populate(objectMap, "provisioningState", c.ProvisioningState) @@ -3337,7 +3353,7 @@ func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. func (c CustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -3380,7 +3396,7 @@ func (c *CustomDomainResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDomainResourceCollection. func (c CustomDomainResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -3411,7 +3427,7 @@ func (c *CustomDomainResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDomainValidatePayload. func (c CustomDomainValidatePayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", c.Name) return json.Marshal(objectMap) } @@ -3438,7 +3454,7 @@ func (c *CustomDomainValidatePayload) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDomainValidateResult. func (c CustomDomainValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "isValid", c.IsValid) populate(objectMap, "message", c.Message) return json.Marshal(objectMap) @@ -3469,7 +3485,8 @@ func (c *CustomDomainValidateResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskProperties. func (c CustomPersistentDiskProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "enableSubPath", c.EnableSubPath) populate(objectMap, "mountOptions", c.MountOptions) populate(objectMap, "mountPath", c.MountPath) populate(objectMap, "readOnly", c.ReadOnly) @@ -3486,6 +3503,9 @@ func (c *CustomPersistentDiskProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "enableSubPath": + err = unpopulate(val, "EnableSubPath", &c.EnableSubPath) + delete(rawMsg, key) case "mountOptions": err = unpopulate(val, "MountOptions", &c.MountOptions) delete(rawMsg, key) @@ -3508,7 +3528,7 @@ func (c *CustomPersistentDiskProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskResource. func (c CustomPersistentDiskResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customPersistentDiskProperties", c.CustomPersistentDiskProperties) populate(objectMap, "storageId", c.StorageID) return json.Marshal(objectMap) @@ -3537,9 +3557,44 @@ func (c *CustomPersistentDiskResource) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. +func (c CustomScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", c.Auth) + populate(objectMap, "metadata", c.Metadata) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. +func (c *CustomScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &c.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorProperties. func (c CustomizedAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "acceleratorTags", c.AcceleratorTags) populate(objectMap, "description", c.Description) populate(objectMap, "displayName", c.DisplayName) @@ -3586,7 +3641,7 @@ func (c *CustomizedAcceleratorProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorResource. func (c CustomizedAcceleratorResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -3633,7 +3688,7 @@ func (c *CustomizedAcceleratorResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorResourceCollection. func (c CustomizedAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -3664,7 +3719,7 @@ func (c *CustomizedAcceleratorResourceCollection) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorValidateResult. func (c CustomizedAcceleratorValidateResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "errorMessage", c.ErrorMessage) populate(objectMap, "state", c.State) return json.Marshal(objectMap) @@ -3695,7 +3750,7 @@ func (c *CustomizedAcceleratorValidateResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentInstance. func (d DeploymentInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "discoveryStatus", d.DiscoveryStatus) populate(objectMap, "name", d.Name) populate(objectMap, "reason", d.Reason) @@ -3742,7 +3797,7 @@ func (d *DeploymentInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentList. func (d DeploymentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deployments", d.Deployments) return json.Marshal(objectMap) } @@ -3769,7 +3824,7 @@ func (d *DeploymentList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentResource. func (d DeploymentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) @@ -3816,7 +3871,7 @@ func (d *DeploymentResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentResourceCollection. func (d DeploymentResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -3847,7 +3902,7 @@ func (d *DeploymentResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties. func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "active", d.Active) populate(objectMap, "deploymentSettings", d.DeploymentSettings) populate(objectMap, "instances", d.Instances) @@ -3894,13 +3949,14 @@ func (d *DeploymentResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentSettings. func (d DeploymentSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addonConfigs", d.AddonConfigs) populate(objectMap, "containerProbeSettings", d.ContainerProbeSettings) populate(objectMap, "environmentVariables", d.EnvironmentVariables) populate(objectMap, "livenessProbe", d.LivenessProbe) populate(objectMap, "readinessProbe", d.ReadinessProbe) populate(objectMap, "resourceRequests", d.ResourceRequests) + populate(objectMap, "scale", d.Scale) populate(objectMap, "startupProbe", d.StartupProbe) populate(objectMap, "terminationGracePeriodSeconds", d.TerminationGracePeriodSeconds) return json.Marshal(objectMap) @@ -3933,6 +3989,9 @@ func (d *DeploymentSettings) UnmarshalJSON(data []byte) error { case "resourceRequests": err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &d.Scale) + delete(rawMsg, key) case "startupProbe": err = unpopulate(val, "StartupProbe", &d.StartupProbe) delete(rawMsg, key) @@ -3949,7 +4008,7 @@ func (d *DeploymentSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalFeatureDetail. func (d DevToolPortalFeatureDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "route", d.Route) populate(objectMap, "state", d.State) return json.Marshal(objectMap) @@ -3980,7 +4039,7 @@ func (d *DevToolPortalFeatureDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalFeatureSettings. func (d DevToolPortalFeatureSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationAccelerator", d.ApplicationAccelerator) populate(objectMap, "applicationLiveView", d.ApplicationLiveView) return json.Marshal(objectMap) @@ -4011,7 +4070,7 @@ func (d *DevToolPortalFeatureSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalInstance. func (d DevToolPortalInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", d.Name) populate(objectMap, "status", d.Status) return json.Marshal(objectMap) @@ -4042,7 +4101,7 @@ func (d *DevToolPortalInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalProperties. func (d DevToolPortalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "features", d.Features) populate(objectMap, "instances", d.Instances) populate(objectMap, "provisioningState", d.ProvisioningState) @@ -4093,7 +4152,7 @@ func (d *DevToolPortalProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalResource. func (d DevToolPortalResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) @@ -4136,7 +4195,7 @@ func (d *DevToolPortalResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceCollection. func (d DevToolPortalResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -4167,7 +4226,7 @@ func (d *DevToolPortalResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceRequests. func (d DevToolPortalResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", d.CPU) populate(objectMap, "instanceCount", d.InstanceCount) populate(objectMap, "memory", d.Memory) @@ -4202,7 +4261,7 @@ func (d *DevToolPortalResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DevToolPortalSsoProperties. func (d DevToolPortalSsoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", d.ClientID) populate(objectMap, "clientSecret", d.ClientSecret) populate(objectMap, "metadataUrl", d.MetadataURL) @@ -4241,7 +4300,7 @@ func (d *DevToolPortalSsoProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnosticParameters. func (d DiagnosticParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInstance", d.AppInstance) populate(objectMap, "duration", d.Duration) populate(objectMap, "filePath", d.FilePath) @@ -4276,7 +4335,7 @@ func (d *DiagnosticParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Error. func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "code", e.Code) populate(objectMap, "message", e.Message) return json.Marshal(objectMap) @@ -4307,7 +4366,7 @@ func (e *Error) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExecAction. func (e ExecAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "command", e.Command) objectMap["type"] = ProbeActionTypeExecAction return json.Marshal(objectMap) @@ -4338,7 +4397,7 @@ func (e *ExecAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayAPIMetadataProperties. func (g GatewayAPIMetadataProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", g.Description) populate(objectMap, "documentation", g.Documentation) populate(objectMap, "serverUrl", g.ServerURL) @@ -4381,7 +4440,7 @@ func (g *GatewayAPIMetadataProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayAPIRoute. func (g GatewayAPIRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", g.Description) populate(objectMap, "filters", g.Filters) populate(objectMap, "order", g.Order) @@ -4440,7 +4499,7 @@ func (g *GatewayAPIRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCorsProperties. func (g GatewayCorsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowCredentials", g.AllowCredentials) populate(objectMap, "allowedHeaders", g.AllowedHeaders) populate(objectMap, "allowedMethods", g.AllowedMethods) @@ -4487,7 +4546,7 @@ func (g *GatewayCorsProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainProperties. func (g GatewayCustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "thumbprint", g.Thumbprint) return json.Marshal(objectMap) } @@ -4514,7 +4573,7 @@ func (g *GatewayCustomDomainProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResource. func (g GatewayCustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -4557,7 +4616,7 @@ func (g *GatewayCustomDomainResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResourceCollection. func (g GatewayCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -4588,7 +4647,7 @@ func (g *GatewayCustomDomainResourceCollection) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type GatewayInstance. func (g GatewayInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", g.Name) populate(objectMap, "status", g.Status) return json.Marshal(objectMap) @@ -4619,7 +4678,7 @@ func (g *GatewayInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayOperatorProperties. func (g GatewayOperatorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", g.Instances) populate(objectMap, "resourceRequests", g.ResourceRequests) return json.Marshal(objectMap) @@ -4650,7 +4709,7 @@ func (g *GatewayOperatorProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayOperatorResourceRequests. func (g GatewayOperatorResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", g.CPU) populate(objectMap, "instanceCount", g.InstanceCount) populate(objectMap, "memory", g.Memory) @@ -4685,7 +4744,7 @@ func (g *GatewayOperatorResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayProperties. func (g GatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "apiMetadataProperties", g.APIMetadataProperties) populate(objectMap, "apmTypes", g.ApmTypes) populate(objectMap, "corsProperties", g.CorsProperties) @@ -4756,7 +4815,7 @@ func (g *GatewayProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayPropertiesEnvironmentVariables. func (g GatewayPropertiesEnvironmentVariables) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", g.Properties) populate(objectMap, "secrets", g.Secrets) return json.Marshal(objectMap) @@ -4787,7 +4846,7 @@ func (g *GatewayPropertiesEnvironmentVariables) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type GatewayResource. func (g GatewayResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -4834,7 +4893,7 @@ func (g *GatewayResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayResourceCollection. func (g GatewayResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -4865,7 +4924,7 @@ func (g *GatewayResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayResourceRequests. func (g GatewayResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", g.CPU) populate(objectMap, "memory", g.Memory) return json.Marshal(objectMap) @@ -4896,7 +4955,7 @@ func (g *GatewayResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigOpenAPIProperties. func (g GatewayRouteConfigOpenAPIProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "uri", g.URI) return json.Marshal(objectMap) } @@ -4923,7 +4982,7 @@ func (g *GatewayRouteConfigOpenAPIProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigProperties. func (g GatewayRouteConfigProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appResourceId", g.AppResourceID) populate(objectMap, "filters", g.Filters) populate(objectMap, "openApi", g.OpenAPI) @@ -4978,7 +5037,7 @@ func (g *GatewayRouteConfigProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResource. func (g GatewayRouteConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) populate(objectMap, "properties", g.Properties) @@ -5021,7 +5080,7 @@ func (g *GatewayRouteConfigResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResourceCollection. func (g GatewayRouteConfigResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -5052,7 +5111,7 @@ func (g *GatewayRouteConfigResourceCollection) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type GitPatternRepository. func (g GitPatternRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hostKey", g.HostKey) populate(objectMap, "hostKeyAlgorithm", g.HostKeyAlgorithm) populate(objectMap, "label", g.Label) @@ -5119,7 +5178,7 @@ func (g *GitPatternRepository) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HTTPGetAction. func (h HTTPGetAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "path", h.Path) populate(objectMap, "scheme", h.Scheme) objectMap["type"] = ProbeActionTypeHTTPGetAction @@ -5152,9 +5211,40 @@ func (h *HTTPGetAction) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type HTTPScaleRule. +func (h HTTPScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", h.Auth) + populate(objectMap, "metadata", h.Metadata) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPScaleRule. +func (h *HTTPScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &h.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &h.Metadata) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ImageRegistryCredential. func (i ImageRegistryCredential) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "password", i.Password) populate(objectMap, "username", i.Username) return json.Marshal(objectMap) @@ -5185,7 +5275,7 @@ func (i *ImageRegistryCredential) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IngressConfig. func (i IngressConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) return json.Marshal(objectMap) } @@ -5212,7 +5302,7 @@ func (i *IngressConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IngressSettings. func (i IngressSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendProtocol", i.BackendProtocol) populate(objectMap, "clientAuth", i.ClientAuth) populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) @@ -5259,7 +5349,7 @@ func (i *IngressSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IngressSettingsClientAuth. func (i IngressSettingsClientAuth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "certificates", i.Certificates) return json.Marshal(objectMap) } @@ -5286,7 +5376,7 @@ func (i *IngressSettingsClientAuth) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JarUploadedUserSourceInfo. func (j JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "jvmOptions", j.JvmOptions) populate(objectMap, "relativePath", j.RelativePath) populate(objectMap, "runtimeVersion", j.RuntimeVersion) @@ -5329,7 +5419,7 @@ func (j *JarUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateProperties. func (k KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activateDate", k.ActivateDate) populate(objectMap, "certVersion", k.CertVersion) populate(objectMap, "dnsNames", k.DNSNames) @@ -5404,7 +5494,7 @@ func (k *KeyVaultCertificateProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadedCertificate. func (l LoadedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "loadTrustStore", l.LoadTrustStore) populate(objectMap, "resourceId", l.ResourceID) return json.Marshal(objectMap) @@ -5435,7 +5525,7 @@ func (l *LoadedCertificate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LogFileURLResponse. func (l LogFileURLResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "url", l.URL) return json.Marshal(objectMap) } @@ -5462,7 +5552,7 @@ func (l *LogFileURLResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LogSpecification. func (l LogSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "blobDuration", l.BlobDuration) populate(objectMap, "displayName", l.DisplayName) populate(objectMap, "name", l.Name) @@ -5497,7 +5587,7 @@ func (l *LogSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedIdentityProperties. func (m ManagedIdentityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -5536,7 +5626,7 @@ func (m *ManagedIdentityProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MarketplaceResource. func (m MarketplaceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "plan", m.Plan) populate(objectMap, "product", m.Product) populate(objectMap, "publisher", m.Publisher) @@ -5571,7 +5661,7 @@ func (m *MarketplaceResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MetricDimension. func (m MetricDimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "displayName", m.DisplayName) populate(objectMap, "name", m.Name) populate(objectMap, "toBeExportedForShoebox", m.ToBeExportedForShoebox) @@ -5606,7 +5696,7 @@ func (m *MetricDimension) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MetricSpecification. func (m MetricSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aggregationType", m.AggregationType) populate(objectMap, "category", m.Category) populate(objectMap, "dimensions", m.Dimensions) @@ -5673,7 +5763,7 @@ func (m *MetricSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MonitoringSettingProperties. func (m MonitoringSettingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInsightsAgentVersions", m.AppInsightsAgentVersions) populate(objectMap, "appInsightsInstrumentationKey", m.AppInsightsInstrumentationKey) populate(objectMap, "appInsightsSamplingRate", m.AppInsightsSamplingRate) @@ -5720,7 +5810,7 @@ func (m *MonitoringSettingProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MonitoringSettingResource. func (m MonitoringSettingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", m.ID) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -5763,7 +5853,7 @@ func (m *MonitoringSettingResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NameAvailability. func (n NameAvailability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "message", n.Message) populate(objectMap, "nameAvailable", n.NameAvailable) populate(objectMap, "reason", n.Reason) @@ -5798,7 +5888,7 @@ func (n *NameAvailability) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NameAvailabilityParameters. func (n NameAvailabilityParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", n.Name) populate(objectMap, "type", n.Type) return json.Marshal(objectMap) @@ -5829,7 +5919,7 @@ func (n *NameAvailabilityParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetCoreZipUploadedUserSourceInfo. func (n NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "netCoreMainEntryPath", n.NetCoreMainEntryPath) populate(objectMap, "relativePath", n.RelativePath) populate(objectMap, "runtimeVersion", n.RuntimeVersion) @@ -5872,7 +5962,7 @@ func (n *NetCoreZipUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetworkProfile. func (n NetworkProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appNetworkResourceGroup", n.AppNetworkResourceGroup) populate(objectMap, "appSubnetId", n.AppSubnetID) populate(objectMap, "ingressConfig", n.IngressConfig) @@ -5931,7 +6021,7 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetworkProfileOutboundIPs. func (n NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "publicIPs", n.PublicIPs) return json.Marshal(objectMap) } @@ -5958,7 +6048,7 @@ func (n *NetworkProfileOutboundIPs) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDetail. func (o OperationDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionType", o.ActionType) populate(objectMap, "display", o.Display) populate(objectMap, "isDataAction", o.IsDataAction) @@ -6005,7 +6095,7 @@ func (o *OperationDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDisplay. func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", o.Description) populate(objectMap, "operation", o.Operation) populate(objectMap, "provider", o.Provider) @@ -6044,7 +6134,7 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationProperties. func (o OperationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "serviceSpecification", o.ServiceSpecification) return json.Marshal(objectMap) } @@ -6071,7 +6161,7 @@ func (o *OperationProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PersistentDisk. func (p PersistentDisk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "mountPath", p.MountPath) populate(objectMap, "sizeInGB", p.SizeInGB) populate(objectMap, "usedInGB", p.UsedInGB) @@ -6106,7 +6196,7 @@ func (p *PersistentDisk) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorProperties. func (p PredefinedAcceleratorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "acceleratorTags", p.AcceleratorTags) populate(objectMap, "description", p.Description) populate(objectMap, "displayName", p.DisplayName) @@ -6153,7 +6243,7 @@ func (p *PredefinedAcceleratorProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorResource. func (p PredefinedAcceleratorResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "properties", p.Properties) @@ -6200,7 +6290,7 @@ func (p *PredefinedAcceleratorResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorResourceCollection. func (p PredefinedAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -6231,7 +6321,7 @@ func (p *PredefinedAcceleratorResourceCollection) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type Probe. func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "disableProbe", p.DisableProbe) populate(objectMap, "failureThreshold", p.FailureThreshold) populate(objectMap, "initialDelaySeconds", p.InitialDelaySeconds) @@ -6282,7 +6372,7 @@ func (p *Probe) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProbeAction. func (p ProbeAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["type"] = p.Type return json.Marshal(objectMap) } @@ -6309,7 +6399,7 @@ func (p *ProbeAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProxyResource. func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "systemData", p.SystemData) @@ -6346,9 +6436,44 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type QueueScaleRule. +func (q QueueScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", q.Auth) + populate(objectMap, "queueLength", q.QueueLength) + populate(objectMap, "queueName", q.QueueName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueScaleRule. +func (q *QueueScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &q.Auth) + delete(rawMsg, key) + case "queueLength": + err = unpopulate(val, "QueueLength", &q.QueueLength) + delete(rawMsg, key) + case "queueName": + err = unpopulate(val, "QueueName", &q.QueueName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type RegenerateTestKeyRequestPayload. func (r RegenerateTestKeyRequestPayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "keyType", r.KeyType) return json.Marshal(objectMap) } @@ -6375,7 +6500,7 @@ func (r *RegenerateTestKeyRequestPayload) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RemoteDebugging. func (r RemoteDebugging) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", r.Enabled) populate(objectMap, "port", r.Port) return json.Marshal(objectMap) @@ -6406,7 +6531,7 @@ func (r *RemoteDebugging) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RemoteDebuggingPayload. func (r RemoteDebuggingPayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", r.Port) return json.Marshal(objectMap) } @@ -6433,7 +6558,7 @@ func (r *RemoteDebuggingPayload) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RequiredTraffic. func (r RequiredTraffic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "direction", r.Direction) populate(objectMap, "fqdns", r.Fqdns) populate(objectMap, "ips", r.IPs) @@ -6476,7 +6601,7 @@ func (r *RequiredTraffic) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) populate(objectMap, "systemData", r.SystemData) @@ -6515,7 +6640,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceRequests. func (r ResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", r.CPU) populate(objectMap, "memory", r.Memory) return json.Marshal(objectMap) @@ -6546,7 +6671,7 @@ func (r *ResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKU. func (r ResourceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", r.Capacity) populate(objectMap, "locationInfo", r.LocationInfo) populate(objectMap, "locations", r.Locations) @@ -6597,7 +6722,7 @@ func (r *ResourceSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities. func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", r.Name) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -6628,7 +6753,7 @@ func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKUCollection. func (r ResourceSKUCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -6659,7 +6784,7 @@ func (r *ResourceSKUCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo. func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "location", r.Location) populate(objectMap, "zoneDetails", r.ZoneDetails) populate(objectMap, "zones", r.Zones) @@ -6694,7 +6819,7 @@ func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo. func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "locations", r.Locations) populate(objectMap, "zones", r.Zones) return json.Marshal(objectMap) @@ -6725,7 +6850,7 @@ func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions. func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "reasonCode", r.ReasonCode) populate(objectMap, "restrictionInfo", r.RestrictionInfo) populate(objectMap, "type", r.Type) @@ -6764,7 +6889,7 @@ func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails. func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capabilities", r.Capabilities) populate(objectMap, "name", r.Name) return json.Marshal(objectMap) @@ -6795,7 +6920,7 @@ func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceUploadDefinition. func (r ResourceUploadDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "relativePath", r.RelativePath) populate(objectMap, "uploadUrl", r.UploadURL) return json.Marshal(objectMap) @@ -6826,7 +6951,7 @@ func (r *ResourceUploadDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKU. func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", s.Capacity) populate(objectMap, "name", s.Name) populate(objectMap, "tier", s.Tier) @@ -6861,7 +6986,7 @@ func (s *SKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKUCapacity. func (s SKUCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "default", s.Default) populate(objectMap, "maximum", s.Maximum) populate(objectMap, "minimum", s.Minimum) @@ -6898,9 +7023,176 @@ func (s *SKUCapacity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SKUObject. +func (s SKUObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sku", s.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUObject. +func (s *SKUObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Scale. +func (s Scale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxReplicas", s.MaxReplicas) + populate(objectMap, "minReplicas", s.MinReplicas) + populate(objectMap, "rules", s.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Scale. +func (s *Scale) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxReplicas": + err = unpopulate(val, "MaxReplicas", &s.MaxReplicas) + delete(rawMsg, key) + case "minReplicas": + err = unpopulate(val, "MinReplicas", &s.MinReplicas) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &s.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRule. +func (s ScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureQueue", s.AzureQueue) + populate(objectMap, "custom", s.Custom) + populate(objectMap, "http", s.HTTP) + populate(objectMap, "name", s.Name) + populate(objectMap, "tcp", s.TCP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRule. +func (s *ScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureQueue": + err = unpopulate(val, "AzureQueue", &s.AzureQueue) + delete(rawMsg, key) + case "custom": + err = unpopulate(val, "Custom", &s.Custom) + delete(rawMsg, key) + case "http": + err = unpopulate(val, "HTTP", &s.HTTP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "tcp": + err = unpopulate(val, "TCP", &s.TCP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRuleAuth. +func (s ScaleRuleAuth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secretRef", s.SecretRef) + populate(objectMap, "triggerParameter", s.TriggerParameter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRuleAuth. +func (s *ScaleRuleAuth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretRef": + err = unpopulate(val, "SecretRef", &s.SecretRef) + delete(rawMsg, key) + case "triggerParameter": + err = unpopulate(val, "TriggerParameter", &s.TriggerParameter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Secret. +func (s Secret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. +func (s *Secret) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryInstance. func (s ServiceRegistryInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", s.Name) populate(objectMap, "status", s.Status) return json.Marshal(objectMap) @@ -6931,7 +7223,7 @@ func (s *ServiceRegistryInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryProperties. func (s ServiceRegistryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instances", s.Instances) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "resourceRequests", s.ResourceRequests) @@ -6966,7 +7258,7 @@ func (s *ServiceRegistryProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResource. func (s ServiceRegistryResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7009,7 +7301,7 @@ func (s *ServiceRegistryResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceCollection. func (s ServiceRegistryResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7040,7 +7332,7 @@ func (s *ServiceRegistryResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceRequests. func (s ServiceRegistryResourceRequests) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", s.CPU) populate(objectMap, "instanceCount", s.InstanceCount) populate(objectMap, "memory", s.Memory) @@ -7075,7 +7367,7 @@ func (s *ServiceRegistryResourceRequests) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceResource. func (s ServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) @@ -7130,7 +7422,7 @@ func (s *ServiceResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceResourceList. func (s ServiceResourceList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7161,7 +7453,7 @@ func (s *ServiceResourceList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. func (s ServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "logSpecifications", s.LogSpecifications) populate(objectMap, "metricSpecifications", s.MetricSpecifications) return json.Marshal(objectMap) @@ -7192,7 +7484,7 @@ func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceVNetAddons. func (s ServiceVNetAddons) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "logStreamPublicEndpoint", s.LogStreamPublicEndpoint) return json.Marshal(objectMap) } @@ -7219,7 +7511,7 @@ func (s *ServiceVNetAddons) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SourceUploadedUserSourceInfo. func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "artifactSelector", s.ArtifactSelector) populate(objectMap, "relativePath", s.RelativePath) populate(objectMap, "runtimeVersion", s.RuntimeVersion) @@ -7262,7 +7554,7 @@ func (s *SourceUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SsoProperties. func (s SsoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", s.ClientID) populate(objectMap, "clientSecret", s.ClientSecret) populate(objectMap, "issuerUri", s.IssuerURI) @@ -7301,7 +7593,7 @@ func (s *SsoProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StackProperties. func (s StackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "version", s.Version) return json.Marshal(objectMap) @@ -7332,7 +7624,7 @@ func (s *StackProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageAccount. func (s StorageAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "accountKey", s.AccountKey) populate(objectMap, "accountName", s.AccountName) objectMap["storageType"] = StorageTypeStorageAccount @@ -7367,7 +7659,7 @@ func (s *StorageAccount) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageProperties. func (s StorageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["storageType"] = s.StorageType return json.Marshal(objectMap) } @@ -7394,7 +7686,7 @@ func (s *StorageProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageResource. func (s StorageResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7437,7 +7729,7 @@ func (s *StorageResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StorageResourceCollection. func (s StorageResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7468,7 +7760,7 @@ func (s *StorageResourceCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResource. func (s SupportedBuildpackResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7511,7 +7803,7 @@ func (s *SupportedBuildpackResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResourceProperties. func (s SupportedBuildpackResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "buildpackId", s.BuildpackID) return json.Marshal(objectMap) } @@ -7538,7 +7830,7 @@ func (s *SupportedBuildpackResourceProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type SupportedBuildpacksCollection. func (s SupportedBuildpacksCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7569,7 +7861,7 @@ func (s *SupportedBuildpacksCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedRuntimeVersion. func (s SupportedRuntimeVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "platform", s.Platform) populate(objectMap, "value", s.Value) populate(objectMap, "version", s.Version) @@ -7604,7 +7896,7 @@ func (s *SupportedRuntimeVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedStackResource. func (s SupportedStackResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -7647,7 +7939,7 @@ func (s *SupportedStackResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedStackResourceProperties. func (s SupportedStackResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "stackId", s.StackID) populate(objectMap, "version", s.Version) return json.Marshal(objectMap) @@ -7678,7 +7970,7 @@ func (s *SupportedStackResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SupportedStacksCollection. func (s SupportedStacksCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -7709,7 +8001,7 @@ func (s *SupportedStacksCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) @@ -7754,9 +8046,40 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TCPScaleRule. +func (t TCPScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", t.Auth) + populate(objectMap, "metadata", t.Metadata) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TCPScaleRule. +func (t *TCPScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &t.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &t.Metadata) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type TCPSocketAction. func (t TCPSocketAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["type"] = ProbeActionTypeTCPSocketAction return json.Marshal(objectMap) } @@ -7783,7 +8106,7 @@ func (t *TCPSocketAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TemporaryDisk. func (t TemporaryDisk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "mountPath", t.MountPath) populate(objectMap, "sizeInGB", t.SizeInGB) return json.Marshal(objectMap) @@ -7814,7 +8137,7 @@ func (t *TemporaryDisk) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TestKeys. func (t TestKeys) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", t.Enabled) populate(objectMap, "primaryKey", t.PrimaryKey) populate(objectMap, "primaryTestEndpoint", t.PrimaryTestEndpoint) @@ -7857,7 +8180,7 @@ func (t *TestKeys) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) @@ -7904,7 +8227,7 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TriggeredBuildResult. func (t TriggeredBuildResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) return json.Marshal(objectMap) } @@ -7931,7 +8254,7 @@ func (t *TriggeredBuildResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UploadedUserSourceInfo. func (u UploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "relativePath", u.RelativePath) objectMap["type"] = "UploadedUserSourceInfo" populate(objectMap, "version", u.Version) @@ -7966,7 +8289,7 @@ func (u *UploadedUserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentity. func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", u.ClientID) populate(objectMap, "principalId", u.PrincipalID) return json.Marshal(objectMap) @@ -7997,7 +8320,7 @@ func (u *UserAssignedManagedIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserSourceInfo. func (u UserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["type"] = u.Type populate(objectMap, "version", u.Version) return json.Marshal(objectMap) @@ -8028,7 +8351,7 @@ func (u *UserSourceInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ValidationMessages. func (v ValidationMessages) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "messages", v.Messages) populate(objectMap, "name", v.Name) return json.Marshal(objectMap) @@ -8057,7 +8380,7 @@ func (v *ValidationMessages) UnmarshalJSON(data []byte) error { return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -8067,7 +8390,7 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil } diff --git a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go index 10ecbbea15d1..e0377a3a2434 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client.go @@ -32,10 +32,10 @@ type MonitoringSettingsClient struct { } // NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoringSettingsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenC // Get - Get the Monitoring Setting and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. func (client *MonitoringSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *MonitoringSettingsClientGetOptions) (MonitoringSettingsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -98,7 +99,7 @@ func (client *MonitoringSettingsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,13 +116,14 @@ func (client *MonitoringSettingsClient) getHandleResponse(resp *http.Response) ( // BeginUpdatePatch - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// monitoringSettingResource - Parameters for the update operation -// options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - monitoringSettingResource - Parameters for the update operation +// - options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch +// method. func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePatchResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) @@ -136,7 +138,8 @@ func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, re // UpdatePatch - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *MonitoringSettingsClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*http.Response, error) { req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) if err != nil { @@ -172,7 +175,7 @@ func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, monitoringSettingResource) @@ -180,13 +183,14 @@ func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Con // BeginUpdatePut - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// monitoringSettingResource - Parameters for the update operation -// options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - monitoringSettingResource - Parameters for the update operation +// - options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut +// method. func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePutResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updatePut(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) @@ -201,7 +205,8 @@ func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, reso // UpdatePut - Update the Monitoring Setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *MonitoringSettingsClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*http.Response, error) { req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) if err != nil { @@ -237,7 +242,7 @@ func (client *MonitoringSettingsClient) updatePutCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, monitoringSettingResource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go deleted file mode 100644 index 22908cea5fe0..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/monitoringsettings_client_example_test.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_Get.json -func ExampleMonitoringSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewMonitoringSettingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_UpdatePut.json -func ExampleMonitoringSettingsClient_BeginUpdatePut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewMonitoringSettingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePut(ctx, "myResourceGroup", "myservice", armappplatform.MonitoringSettingResource{ - Properties: &armappplatform.MonitoringSettingProperties{ - AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"), - AppInsightsSamplingRate: to.Ptr[float64](10), - TraceEnabled: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/MonitoringSettings_UpdatePatch.json -func ExampleMonitoringSettingsClient_BeginUpdatePatch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewMonitoringSettingsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdatePatch(ctx, "myResourceGroup", "myservice", armappplatform.MonitoringSettingResource{ - Properties: &armappplatform.MonitoringSettingProperties{ - AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"), - AppInsightsSamplingRate: to.Ptr[float64](10), - TraceEnabled: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go index 2f2faffdb921..016e42f87465 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/operations_client.go @@ -28,8 +28,8 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -50,8 +50,9 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider. -// Generated from API version 2022-11-01-preview -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { @@ -88,7 +89,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go deleted file mode 100644 index 35328e4c1b61..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/operations_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Operations_List.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go index ccfaa7cc32ca..b56f75c8c26a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go +++ b/sdk/resourcemanager/appplatform/armappplatform/polymorphic_helpers.go @@ -15,7 +15,7 @@ func unmarshalAcceleratorAuthSettingClassification(rawMsg json.RawMessage) (Acce if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -37,7 +37,7 @@ func unmarshalCertificatePropertiesClassification(rawMsg json.RawMessage) (Certi if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -57,7 +57,7 @@ func unmarshalCustomPersistentDiskPropertiesClassification(rawMsg json.RawMessag if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -75,7 +75,7 @@ func unmarshalProbeActionClassification(rawMsg json.RawMessage) (ProbeActionClas if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -97,7 +97,7 @@ func unmarshalStoragePropertiesClassification(rawMsg json.RawMessage) (StoragePr if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -115,7 +115,7 @@ func unmarshalUserSourceInfoClassification(rawMsg json.RawMessage) (UserSourceIn if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } diff --git a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go b/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go index f3b001903c56..f45d1fdcf381 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client.go @@ -32,10 +32,10 @@ type PredefinedAcceleratorsClient struct { } // NewPredefinedAcceleratorsClient creates a new instance of PredefinedAcceleratorsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPredefinedAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PredefinedAcceleratorsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewPredefinedAcceleratorsClient(subscriptionID string, credential azcore.To // BeginDisable - Disable predefined accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// predefinedAcceleratorName - The name of the predefined accelerator. -// options - PredefinedAcceleratorsClientBeginDisableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginDisable -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - predefinedAcceleratorName - The name of the predefined accelerator. +// - options - PredefinedAcceleratorsClientBeginDisableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginDisable +// method. func (client *PredefinedAcceleratorsClient) BeginDisable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*runtime.Poller[PredefinedAcceleratorsClientDisableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.disable(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) @@ -80,7 +81,8 @@ func (client *PredefinedAcceleratorsClient) BeginDisable(ctx context.Context, re // Disable - Disable predefined accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *PredefinedAcceleratorsClient) disable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*http.Response, error) { req, err := client.disableCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) if err != nil { @@ -124,7 +126,7 @@ func (client *PredefinedAcceleratorsClient) disableCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -132,14 +134,15 @@ func (client *PredefinedAcceleratorsClient) disableCreateRequest(ctx context.Con // BeginEnable - Enable predefined accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// predefinedAcceleratorName - The name of the predefined accelerator. -// options - PredefinedAcceleratorsClientBeginEnableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginEnable -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - predefinedAcceleratorName - The name of the predefined accelerator. +// - options - PredefinedAcceleratorsClientBeginEnableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginEnable +// method. func (client *PredefinedAcceleratorsClient) BeginEnable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*runtime.Poller[PredefinedAcceleratorsClientEnableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.enable(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) @@ -154,7 +157,8 @@ func (client *PredefinedAcceleratorsClient) BeginEnable(ctx context.Context, res // Enable - Enable predefined accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *PredefinedAcceleratorsClient) enable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*http.Response, error) { req, err := client.enableCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) if err != nil { @@ -198,7 +202,7 @@ func (client *PredefinedAcceleratorsClient) enableCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -206,14 +210,15 @@ func (client *PredefinedAcceleratorsClient) enableCreateRequest(ctx context.Cont // Get - Get the predefined accelerator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// predefinedAcceleratorName - The name of the predefined accelerator. -// options - PredefinedAcceleratorsClientGetOptions contains the optional parameters for the PredefinedAcceleratorsClient.Get -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - predefinedAcceleratorName - The name of the predefined accelerator. +// - options - PredefinedAcceleratorsClientGetOptions contains the optional parameters for the PredefinedAcceleratorsClient.Get +// method. func (client *PredefinedAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientGetOptions) (PredefinedAcceleratorsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) if err != nil { @@ -257,7 +262,7 @@ func (client *PredefinedAcceleratorsClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,13 +278,14 @@ func (client *PredefinedAcceleratorsClient) getHandleResponse(resp *http.Respons } // NewListPager - Handle requests to list all predefined accelerators. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// applicationAcceleratorName - The name of the application accelerator. -// options - PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.List -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.NewListPager +// method. func (client *PredefinedAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, applicationAcceleratorName string, options *PredefinedAcceleratorsClientListOptions) *runtime.Pager[PredefinedAcceleratorsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PredefinedAcceleratorsClientListResponse]{ More: func(page PredefinedAcceleratorsClientListResponse) bool { @@ -332,7 +338,7 @@ func (client *PredefinedAcceleratorsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go deleted file mode 100644 index 1193344a496d..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/predefinedaccelerators_client_example_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_List.json -func ExamplePredefinedAcceleratorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", "default", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_Get.json -func ExamplePredefinedAcceleratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_Disable.json -func ExamplePredefinedAcceleratorsClient_BeginDisable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDisable(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/PredefinedAccelerators_Enable.json -func ExamplePredefinedAcceleratorsClient_BeginEnable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewPredefinedAcceleratorsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginEnable(ctx, "myResourceGroup", "myservice", "default", "acc-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/response_types.go b/sdk/resourcemanager/appplatform/armappplatform/response_types.go index d73c83024b42..22e617e496e4 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/response_types.go +++ b/sdk/resourcemanager/appplatform/armappplatform/response_types.go @@ -9,12 +9,12 @@ package armappplatform -// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.CreateOrUpdate. +// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.BeginCreateOrUpdate. type APIPortalCustomDomainsClientCreateOrUpdateResponse struct { APIPortalCustomDomainResource } -// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.Delete. +// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.BeginDelete. type APIPortalCustomDomainsClientDeleteResponse struct { // placeholder for future response values } @@ -24,17 +24,17 @@ type APIPortalCustomDomainsClientGetResponse struct { APIPortalCustomDomainResource } -// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.List. +// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.NewListPager. type APIPortalCustomDomainsClientListResponse struct { APIPortalCustomDomainResourceCollection } -// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.CreateOrUpdate. +// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.BeginCreateOrUpdate. type APIPortalsClientCreateOrUpdateResponse struct { APIPortalResource } -// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.Delete. +// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.BeginDelete. type APIPortalsClientDeleteResponse struct { // placeholder for future response values } @@ -44,7 +44,7 @@ type APIPortalsClientGetResponse struct { APIPortalResource } -// APIPortalsClientListResponse contains the response from method APIPortalsClient.List. +// APIPortalsClientListResponse contains the response from method APIPortalsClient.NewListPager. type APIPortalsClientListResponse struct { APIPortalResourceCollection } @@ -54,12 +54,12 @@ type APIPortalsClientValidateDomainResponse struct { CustomDomainValidateResult } -// ApplicationAcceleratorsClientCreateOrUpdateResponse contains the response from method ApplicationAcceleratorsClient.CreateOrUpdate. +// ApplicationAcceleratorsClientCreateOrUpdateResponse contains the response from method ApplicationAcceleratorsClient.BeginCreateOrUpdate. type ApplicationAcceleratorsClientCreateOrUpdateResponse struct { ApplicationAcceleratorResource } -// ApplicationAcceleratorsClientDeleteResponse contains the response from method ApplicationAcceleratorsClient.Delete. +// ApplicationAcceleratorsClientDeleteResponse contains the response from method ApplicationAcceleratorsClient.BeginDelete. type ApplicationAcceleratorsClientDeleteResponse struct { // placeholder for future response values } @@ -69,17 +69,17 @@ type ApplicationAcceleratorsClientGetResponse struct { ApplicationAcceleratorResource } -// ApplicationAcceleratorsClientListResponse contains the response from method ApplicationAcceleratorsClient.List. +// ApplicationAcceleratorsClientListResponse contains the response from method ApplicationAcceleratorsClient.NewListPager. type ApplicationAcceleratorsClientListResponse struct { ApplicationAcceleratorResourceCollection } -// ApplicationLiveViewsClientCreateOrUpdateResponse contains the response from method ApplicationLiveViewsClient.CreateOrUpdate. +// ApplicationLiveViewsClientCreateOrUpdateResponse contains the response from method ApplicationLiveViewsClient.BeginCreateOrUpdate. type ApplicationLiveViewsClientCreateOrUpdateResponse struct { ApplicationLiveViewResource } -// ApplicationLiveViewsClientDeleteResponse contains the response from method ApplicationLiveViewsClient.Delete. +// ApplicationLiveViewsClientDeleteResponse contains the response from method ApplicationLiveViewsClient.BeginDelete. type ApplicationLiveViewsClientDeleteResponse struct { // placeholder for future response values } @@ -89,17 +89,17 @@ type ApplicationLiveViewsClientGetResponse struct { ApplicationLiveViewResource } -// ApplicationLiveViewsClientListResponse contains the response from method ApplicationLiveViewsClient.List. +// ApplicationLiveViewsClientListResponse contains the response from method ApplicationLiveViewsClient.NewListPager. type ApplicationLiveViewsClientListResponse struct { ApplicationLiveViewResourceCollection } -// AppsClientCreateOrUpdateResponse contains the response from method AppsClient.CreateOrUpdate. +// AppsClientCreateOrUpdateResponse contains the response from method AppsClient.BeginCreateOrUpdate. type AppsClientCreateOrUpdateResponse struct { AppResource } -// AppsClientDeleteResponse contains the response from method AppsClient.Delete. +// AppsClientDeleteResponse contains the response from method AppsClient.BeginDelete. type AppsClientDeleteResponse struct { // placeholder for future response values } @@ -114,17 +114,17 @@ type AppsClientGetResponse struct { AppResource } -// AppsClientListResponse contains the response from method AppsClient.List. +// AppsClientListResponse contains the response from method AppsClient.NewListPager. type AppsClientListResponse struct { AppResourceCollection } -// AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.SetActiveDeployments. +// AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.BeginSetActiveDeployments. type AppsClientSetActiveDeploymentsResponse struct { AppResource } -// AppsClientUpdateResponse contains the response from method AppsClient.Update. +// AppsClientUpdateResponse contains the response from method AppsClient.BeginUpdate. type AppsClientUpdateResponse struct { AppResource } @@ -134,12 +134,12 @@ type AppsClientValidateDomainResponse struct { CustomDomainValidateResult } -// BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.CreateOrUpdate. +// BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.BeginCreateOrUpdate. type BindingsClientCreateOrUpdateResponse struct { BindingResource } -// BindingsClientDeleteResponse contains the response from method BindingsClient.Delete. +// BindingsClientDeleteResponse contains the response from method BindingsClient.BeginDelete. type BindingsClientDeleteResponse struct { // placeholder for future response values } @@ -149,12 +149,12 @@ type BindingsClientGetResponse struct { BindingResource } -// BindingsClientListResponse contains the response from method BindingsClient.List. +// BindingsClientListResponse contains the response from method BindingsClient.NewListPager. type BindingsClientListResponse struct { BindingResourceCollection } -// BindingsClientUpdateResponse contains the response from method BindingsClient.Update. +// BindingsClientUpdateResponse contains the response from method BindingsClient.BeginUpdate. type BindingsClientUpdateResponse struct { BindingResource } @@ -164,22 +164,22 @@ type BuildServiceAgentPoolClientGetResponse struct { BuildServiceAgentPoolResource } -// BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.List. +// BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.NewListPager. type BuildServiceAgentPoolClientListResponse struct { BuildServiceAgentPoolResourceCollection } -// BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.UpdatePut. +// BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.BeginUpdatePut. type BuildServiceAgentPoolClientUpdatePutResponse struct { BuildServiceAgentPoolResource } -// BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.CreateOrUpdate. +// BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.BeginCreateOrUpdate. type BuildServiceBuilderClientCreateOrUpdateResponse struct { BuilderResource } -// BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.Delete. +// BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.BeginDelete. type BuildServiceBuilderClientDeleteResponse struct { // placeholder for future response values } @@ -194,7 +194,7 @@ type BuildServiceBuilderClientListDeploymentsResponse struct { DeploymentList } -// BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.List. +// BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.NewListPager. type BuildServiceBuilderClientListResponse struct { BuilderResourceCollection } @@ -239,17 +239,17 @@ type BuildServiceClientGetSupportedStackResponse struct { SupportedStackResource } -// BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.ListBuildResults. +// BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.NewListBuildResultsPager. type BuildServiceClientListBuildResultsResponse struct { BuildResultCollection } -// BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.ListBuildServices. +// BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.NewListBuildServicesPager. type BuildServiceClientListBuildServicesResponse struct { BuildServiceCollection } -// BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.ListBuilds. +// BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.NewListBuildsPager. type BuildServiceClientListBuildsResponse struct { BuildCollection } @@ -264,12 +264,12 @@ type BuildServiceClientListSupportedStacksResponse struct { SupportedStacksCollection } -// BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.CreateOrUpdate. +// BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.BeginCreateOrUpdate. type BuildpackBindingClientCreateOrUpdateResponse struct { BuildpackBindingResource } -// BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.Delete. +// BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.BeginDelete. type BuildpackBindingClientDeleteResponse struct { // placeholder for future response values } @@ -279,17 +279,22 @@ type BuildpackBindingClientGetResponse struct { BuildpackBindingResource } -// BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.List. +// BuildpackBindingClientListForClusterResponse contains the response from method BuildpackBindingClient.NewListForClusterPager. +type BuildpackBindingClientListForClusterResponse struct { + BuildpackBindingResourceCollection +} + +// BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.NewListPager. type BuildpackBindingClientListResponse struct { BuildpackBindingResourceCollection } -// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. +// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.BeginCreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { CertificateResource } -// CertificatesClientDeleteResponse contains the response from method CertificatesClient.Delete. +// CertificatesClientDeleteResponse contains the response from method CertificatesClient.BeginDelete. type CertificatesClientDeleteResponse struct { // placeholder for future response values } @@ -299,7 +304,7 @@ type CertificatesClientGetResponse struct { CertificateResource } -// CertificatesClientListResponse contains the response from method CertificatesClient.List. +// CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager. type CertificatesClientListResponse struct { CertificateResourceCollection } @@ -309,27 +314,27 @@ type ConfigServersClientGetResponse struct { ConfigServerResource } -// ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.UpdatePatch. +// ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.BeginUpdatePatch. type ConfigServersClientUpdatePatchResponse struct { ConfigServerResource } -// ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.UpdatePut. +// ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.BeginUpdatePut. type ConfigServersClientUpdatePutResponse struct { ConfigServerResource } -// ConfigServersClientValidateResponse contains the response from method ConfigServersClient.Validate. +// ConfigServersClientValidateResponse contains the response from method ConfigServersClient.BeginValidate. type ConfigServersClientValidateResponse struct { ConfigServerSettingsValidateResult } -// ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.CreateOrUpdate. +// ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.BeginCreateOrUpdate. type ConfigurationServicesClientCreateOrUpdateResponse struct { ConfigurationServiceResource } -// ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.Delete. +// ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.BeginDelete. type ConfigurationServicesClientDeleteResponse struct { // placeholder for future response values } @@ -339,22 +344,22 @@ type ConfigurationServicesClientGetResponse struct { ConfigurationServiceResource } -// ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.List. +// ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.NewListPager. type ConfigurationServicesClientListResponse struct { ConfigurationServiceResourceCollection } -// ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.Validate. +// ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.BeginValidate. type ConfigurationServicesClientValidateResponse struct { ConfigurationServiceSettingsValidateResult } -// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.CreateOrUpdate. +// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate. type CustomDomainsClientCreateOrUpdateResponse struct { CustomDomainResource } -// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.Delete. +// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete. type CustomDomainsClientDeleteResponse struct { // placeholder for future response values } @@ -364,22 +369,22 @@ type CustomDomainsClientGetResponse struct { CustomDomainResource } -// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.List. +// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.NewListPager. type CustomDomainsClientListResponse struct { CustomDomainResourceCollection } -// CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.Update. +// CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.BeginUpdate. type CustomDomainsClientUpdateResponse struct { CustomDomainResource } -// CustomizedAcceleratorsClientCreateOrUpdateResponse contains the response from method CustomizedAcceleratorsClient.CreateOrUpdate. +// CustomizedAcceleratorsClientCreateOrUpdateResponse contains the response from method CustomizedAcceleratorsClient.BeginCreateOrUpdate. type CustomizedAcceleratorsClientCreateOrUpdateResponse struct { CustomizedAcceleratorResource } -// CustomizedAcceleratorsClientDeleteResponse contains the response from method CustomizedAcceleratorsClient.Delete. +// CustomizedAcceleratorsClientDeleteResponse contains the response from method CustomizedAcceleratorsClient.BeginDelete. type CustomizedAcceleratorsClientDeleteResponse struct { // placeholder for future response values } @@ -389,7 +394,7 @@ type CustomizedAcceleratorsClientGetResponse struct { CustomizedAcceleratorResource } -// CustomizedAcceleratorsClientListResponse contains the response from method CustomizedAcceleratorsClient.List. +// CustomizedAcceleratorsClientListResponse contains the response from method CustomizedAcceleratorsClient.NewListPager. type CustomizedAcceleratorsClientListResponse struct { CustomizedAcceleratorResourceCollection } @@ -399,32 +404,32 @@ type CustomizedAcceleratorsClientValidateResponse struct { CustomizedAcceleratorValidateResult } -// DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.CreateOrUpdate. +// DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate. type DeploymentsClientCreateOrUpdateResponse struct { DeploymentResource } -// DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.Delete. +// DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.BeginDelete. type DeploymentsClientDeleteResponse struct { // placeholder for future response values } -// DeploymentsClientDisableRemoteDebuggingResponse contains the response from method DeploymentsClient.DisableRemoteDebugging. +// DeploymentsClientDisableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginDisableRemoteDebugging. type DeploymentsClientDisableRemoteDebuggingResponse struct { RemoteDebugging } -// DeploymentsClientEnableRemoteDebuggingResponse contains the response from method DeploymentsClient.EnableRemoteDebugging. +// DeploymentsClientEnableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginEnableRemoteDebugging. type DeploymentsClientEnableRemoteDebuggingResponse struct { RemoteDebugging } -// DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.GenerateHeapDump. +// DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.BeginGenerateHeapDump. type DeploymentsClientGenerateHeapDumpResponse struct { // placeholder for future response values } -// DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.GenerateThreadDump. +// DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.BeginGenerateThreadDump. type DeploymentsClientGenerateThreadDumpResponse struct { // placeholder for future response values } @@ -444,47 +449,47 @@ type DeploymentsClientGetResponse struct { DeploymentResource } -// DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.ListForCluster. +// DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.NewListForClusterPager. type DeploymentsClientListForClusterResponse struct { DeploymentResourceCollection } -// DeploymentsClientListResponse contains the response from method DeploymentsClient.List. +// DeploymentsClientListResponse contains the response from method DeploymentsClient.NewListPager. type DeploymentsClientListResponse struct { DeploymentResourceCollection } -// DeploymentsClientRestartResponse contains the response from method DeploymentsClient.Restart. +// DeploymentsClientRestartResponse contains the response from method DeploymentsClient.BeginRestart. type DeploymentsClientRestartResponse struct { // placeholder for future response values } -// DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.StartJFR. +// DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.BeginStartJFR. type DeploymentsClientStartJFRResponse struct { // placeholder for future response values } -// DeploymentsClientStartResponse contains the response from method DeploymentsClient.Start. +// DeploymentsClientStartResponse contains the response from method DeploymentsClient.BeginStart. type DeploymentsClientStartResponse struct { // placeholder for future response values } -// DeploymentsClientStopResponse contains the response from method DeploymentsClient.Stop. +// DeploymentsClientStopResponse contains the response from method DeploymentsClient.BeginStop. type DeploymentsClientStopResponse struct { // placeholder for future response values } -// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.Update. +// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.BeginUpdate. type DeploymentsClientUpdateResponse struct { DeploymentResource } -// DevToolPortalsClientCreateOrUpdateResponse contains the response from method DevToolPortalsClient.CreateOrUpdate. +// DevToolPortalsClientCreateOrUpdateResponse contains the response from method DevToolPortalsClient.BeginCreateOrUpdate. type DevToolPortalsClientCreateOrUpdateResponse struct { DevToolPortalResource } -// DevToolPortalsClientDeleteResponse contains the response from method DevToolPortalsClient.Delete. +// DevToolPortalsClientDeleteResponse contains the response from method DevToolPortalsClient.BeginDelete. type DevToolPortalsClientDeleteResponse struct { // placeholder for future response values } @@ -494,17 +499,17 @@ type DevToolPortalsClientGetResponse struct { DevToolPortalResource } -// DevToolPortalsClientListResponse contains the response from method DevToolPortalsClient.List. +// DevToolPortalsClientListResponse contains the response from method DevToolPortalsClient.NewListPager. type DevToolPortalsClientListResponse struct { DevToolPortalResourceCollection } -// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.CreateOrUpdate. +// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.BeginCreateOrUpdate. type GatewayCustomDomainsClientCreateOrUpdateResponse struct { GatewayCustomDomainResource } -// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.Delete. +// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.BeginDelete. type GatewayCustomDomainsClientDeleteResponse struct { // placeholder for future response values } @@ -514,17 +519,17 @@ type GatewayCustomDomainsClientGetResponse struct { GatewayCustomDomainResource } -// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.List. +// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.NewListPager. type GatewayCustomDomainsClientListResponse struct { GatewayCustomDomainResourceCollection } -// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.CreateOrUpdate. +// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.BeginCreateOrUpdate. type GatewayRouteConfigsClientCreateOrUpdateResponse struct { GatewayRouteConfigResource } -// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.Delete. +// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.BeginDelete. type GatewayRouteConfigsClientDeleteResponse struct { // placeholder for future response values } @@ -534,17 +539,17 @@ type GatewayRouteConfigsClientGetResponse struct { GatewayRouteConfigResource } -// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.List. +// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.NewListPager. type GatewayRouteConfigsClientListResponse struct { GatewayRouteConfigResourceCollection } -// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.CreateOrUpdate. +// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.BeginCreateOrUpdate. type GatewaysClientCreateOrUpdateResponse struct { GatewayResource } -// GatewaysClientDeleteResponse contains the response from method GatewaysClient.Delete. +// GatewaysClientDeleteResponse contains the response from method GatewaysClient.BeginDelete. type GatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -560,11 +565,16 @@ type GatewaysClientListEnvSecretsResponse struct { Value map[string]*string } -// GatewaysClientListResponse contains the response from method GatewaysClient.List. +// GatewaysClientListResponse contains the response from method GatewaysClient.NewListPager. type GatewaysClientListResponse struct { GatewayResourceCollection } +// GatewaysClientUpdateCapacityResponse contains the response from method GatewaysClient.BeginUpdateCapacity. +type GatewaysClientUpdateCapacityResponse struct { + GatewayResource +} + // GatewaysClientValidateDomainResponse contains the response from method GatewaysClient.ValidateDomain. type GatewaysClientValidateDomainResponse struct { CustomDomainValidateResult @@ -575,27 +585,27 @@ type MonitoringSettingsClientGetResponse struct { MonitoringSettingResource } -// MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.UpdatePatch. +// MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.BeginUpdatePatch. type MonitoringSettingsClientUpdatePatchResponse struct { MonitoringSettingResource } -// MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.UpdatePut. +// MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.BeginUpdatePut. type MonitoringSettingsClientUpdatePutResponse struct { MonitoringSettingResource } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { AvailableOperations } -// PredefinedAcceleratorsClientDisableResponse contains the response from method PredefinedAcceleratorsClient.Disable. +// PredefinedAcceleratorsClientDisableResponse contains the response from method PredefinedAcceleratorsClient.BeginDisable. type PredefinedAcceleratorsClientDisableResponse struct { // placeholder for future response values } -// PredefinedAcceleratorsClientEnableResponse contains the response from method PredefinedAcceleratorsClient.Enable. +// PredefinedAcceleratorsClientEnableResponse contains the response from method PredefinedAcceleratorsClient.BeginEnable. type PredefinedAcceleratorsClientEnableResponse struct { // placeholder for future response values } @@ -605,7 +615,7 @@ type PredefinedAcceleratorsClientGetResponse struct { PredefinedAcceleratorResource } -// PredefinedAcceleratorsClientListResponse contains the response from method PredefinedAcceleratorsClient.List. +// PredefinedAcceleratorsClientListResponse contains the response from method PredefinedAcceleratorsClient.NewListPager. type PredefinedAcceleratorsClientListResponse struct { PredefinedAcceleratorResourceCollection } @@ -615,17 +625,17 @@ type RuntimeVersionsClientListRuntimeVersionsResponse struct { AvailableRuntimeVersions } -// SKUsClientListResponse contains the response from method SKUsClient.List. +// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. type SKUsClientListResponse struct { ResourceSKUCollection } -// ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.CreateOrUpdate. +// ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.BeginCreateOrUpdate. type ServiceRegistriesClientCreateOrUpdateResponse struct { ServiceRegistryResource } -// ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.Delete. +// ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.BeginDelete. type ServiceRegistriesClientDeleteResponse struct { // placeholder for future response values } @@ -635,7 +645,7 @@ type ServiceRegistriesClientGetResponse struct { ServiceRegistryResource } -// ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.List. +// ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.NewListPager. type ServiceRegistriesClientListResponse struct { ServiceRegistryResourceCollection } @@ -645,12 +655,12 @@ type ServicesClientCheckNameAvailabilityResponse struct { NameAvailability } -// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.CreateOrUpdate. +// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate. type ServicesClientCreateOrUpdateResponse struct { ServiceResource } -// ServicesClientDeleteResponse contains the response from method ServicesClient.Delete. +// ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete. type ServicesClientDeleteResponse struct { // placeholder for future response values } @@ -670,12 +680,12 @@ type ServicesClientGetResponse struct { ServiceResource } -// ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.ListBySubscription. +// ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.NewListBySubscriptionPager. type ServicesClientListBySubscriptionResponse struct { ServiceResourceList } -// ServicesClientListResponse contains the response from method ServicesClient.List. +// ServicesClientListResponse contains the response from method ServicesClient.NewListPager. type ServicesClientListResponse struct { ServiceResourceList } @@ -690,27 +700,27 @@ type ServicesClientRegenerateTestKeyResponse struct { TestKeys } -// ServicesClientStartResponse contains the response from method ServicesClient.Start. +// ServicesClientStartResponse contains the response from method ServicesClient.BeginStart. type ServicesClientStartResponse struct { // placeholder for future response values } -// ServicesClientStopResponse contains the response from method ServicesClient.Stop. +// ServicesClientStopResponse contains the response from method ServicesClient.BeginStop. type ServicesClientStopResponse struct { // placeholder for future response values } -// ServicesClientUpdateResponse contains the response from method ServicesClient.Update. +// ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate. type ServicesClientUpdateResponse struct { ServiceResource } -// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.CreateOrUpdate. +// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.BeginCreateOrUpdate. type StoragesClientCreateOrUpdateResponse struct { StorageResource } -// StoragesClientDeleteResponse contains the response from method StoragesClient.Delete. +// StoragesClientDeleteResponse contains the response from method StoragesClient.BeginDelete. type StoragesClientDeleteResponse struct { // placeholder for future response values } @@ -720,7 +730,7 @@ type StoragesClientGetResponse struct { StorageResource } -// StoragesClientListResponse contains the response from method StoragesClient.List. +// StoragesClientListResponse contains the response from method StoragesClient.NewListPager. type StoragesClientListResponse struct { StorageResourceCollection } diff --git a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go index bfc2bae5af9f..a56cd38801bc 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client.go @@ -28,8 +28,8 @@ type RuntimeVersionsClient struct { } // NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RuntimeVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -51,9 +51,10 @@ func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.Cl // ListRuntimeVersions - Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions -// method. +// +// Generated from API version 2023-01-01-preview +// - options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions +// method. func (client *RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { req, err := client.listRuntimeVersionsCreateRequest(ctx, options) if err != nil { @@ -77,7 +78,7 @@ func (client *RuntimeVersionsClient) listRuntimeVersionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go deleted file mode 100644 index db85e52ade10..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/runtimeversions_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/RuntimeVersions_ListRuntimeVersions.json -func ExampleRuntimeVersionsClient_ListRuntimeVersions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewRuntimeVersionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListRuntimeVersions(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go index 60efc80fa8b9..2d08309e623f 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client.go @@ -32,10 +32,10 @@ type ServiceRegistriesClient struct { } // NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceRegistriesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create the default Service Registry or update the existing Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate +// method. func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, serviceRegistryName, options) @@ -79,7 +80,8 @@ func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create the default Service Registry or update the existing Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServiceRegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) if err != nil { @@ -119,7 +121,7 @@ func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,13 +129,14 @@ func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Disable the default Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete +// method. func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*runtime.Poller[ServiceRegistriesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, serviceRegistryName, options) @@ -148,7 +151,8 @@ func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resource // Delete - Disable the default Service Registry. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServiceRegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) if err != nil { @@ -188,7 +192,7 @@ func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, // Get - Get the Service Registry and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. func (client *ServiceRegistriesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (ServiceRegistriesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) if err != nil { @@ -241,7 +246,7 @@ func (client *ServiceRegistriesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,13 @@ func (client *ServiceRegistriesClient) getHandleResponse(resp *http.Response) (S } // NewListPager - Handles requests to list all resources in a Service. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager +// method. func (client *ServiceRegistriesClient) NewListPager(resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) *runtime.Pager[ServiceRegistriesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServiceRegistriesClientListResponse]{ More: func(page ServiceRegistriesClientListResponse) bool { @@ -310,7 +317,7 @@ func (client *ServiceRegistriesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go deleted file mode 100644 index 10d7ab2b696b..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/serviceregistries_client_example_test.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_Get.json -func ExampleServiceRegistriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_CreateOrUpdate.json -func ExampleServiceRegistriesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_Delete.json -func ExampleServiceRegistriesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/ServiceRegistries_List.json -func ExampleServiceRegistriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServiceRegistriesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myservice", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/services_client.go b/sdk/resourcemanager/appplatform/armappplatform/services_client.go index 62ef66013766..71c3e0c15f04 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/services_client.go @@ -32,10 +32,10 @@ type ServicesClient struct { } // NewServicesClient creates a new instance of ServicesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks that the resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// location - the region -// availabilityParameters - Parameters supplied to the operation. -// options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability -// method. +// +// Generated from API version 2023-01-01-preview +// - location - the region +// - availabilityParameters - Parameters supplied to the operation. +// - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability +// method. func (client *ServicesClient) CheckNameAvailability(ctx context.Context, location string, availabilityParameters NameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, location, availabilityParameters, options) if err != nil { @@ -94,7 +95,7 @@ func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, availabilityParameters) @@ -111,13 +112,14 @@ func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Res // BeginCreateOrUpdate - Create a new Service or update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// resource - Parameters for the create or update operation -// options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - resource - Parameters for the create or update operation +// - options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate +// method. func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, resource, options) @@ -132,7 +134,8 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new Service or update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) if err != nil { @@ -168,7 +171,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resource) @@ -176,11 +179,12 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Operation to delete a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) @@ -195,7 +199,8 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Operation to delete a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -231,7 +236,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,12 +244,13 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG // DisableTestEndpoint - Disable test endpoint functionality for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint +// method. func (client *ServicesClient) DisableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (ServicesClientDisableTestEndpointResponse, error) { req, err := client.disableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -280,7 +286,7 @@ func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -288,12 +294,13 @@ func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Conte // EnableTestEndpoint - Enable test endpoint functionality for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint +// method. func (client *ServicesClient) EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (ServicesClientEnableTestEndpointResponse, error) { req, err := client.enableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -329,7 +336,7 @@ func (client *ServicesClient) enableTestEndpointCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,11 +353,12 @@ func (client *ServicesClient) enableTestEndpointHandleResponse(resp *http.Respon // Get - Get a Service and its properties. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -386,7 +394,7 @@ func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -402,10 +410,11 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl } // NewListPager - Handles requests to list all resources in a resource group. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// options - ServicesClientListOptions contains the optional parameters for the ServicesClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. func (client *ServicesClient) NewListPager(resourceGroupName string, options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ More: func(page ServicesClientListResponse) bool { @@ -450,7 +459,7 @@ func (client *ServicesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,9 +475,10 @@ func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesC } // NewListBySubscriptionPager - Handles requests to list all resources in a subscription. -// Generated from API version 2022-11-01-preview -// options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription -// method. +// +// Generated from API version 2023-01-01-preview +// - options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager +// method. func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListBySubscriptionResponse]{ More: func(page ServicesClientListBySubscriptionResponse) bool { @@ -509,7 +519,7 @@ func (client *ServicesClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -526,11 +536,12 @@ func (client *ServicesClient) listBySubscriptionHandleResponse(resp *http.Respon // ListTestKeys - List test keys for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. func (client *ServicesClient) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (ServicesClientListTestKeysResponse, error) { req, err := client.listTestKeysCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -566,7 +577,7 @@ func (client *ServicesClient) listTestKeysCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -583,13 +594,14 @@ func (client *ServicesClient) listTestKeysHandleResponse(resp *http.Response) (S // RegenerateTestKey - Regenerate a test key for a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// regenerateTestKeyRequest - Parameters for the operation -// options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - regenerateTestKeyRequest - Parameters for the operation +// - options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey +// method. func (client *ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (ServicesClientRegenerateTestKeyResponse, error) { req, err := client.regenerateTestKeyCreateRequest(ctx, resourceGroupName, serviceName, regenerateTestKeyRequest, options) if err != nil { @@ -625,7 +637,7 @@ func (client *ServicesClient) regenerateTestKeyCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regenerateTestKeyRequest) @@ -642,11 +654,12 @@ func (client *ServicesClient) regenerateTestKeyHandleResponse(resp *http.Respons // BeginStart - Start a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. func (client *ServicesClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, serviceName, options) @@ -661,7 +674,8 @@ func (client *ServicesClient) BeginStart(ctx context.Context, resourceGroupName // Start - Start a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServicesClient) start(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -697,7 +711,7 @@ func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -705,11 +719,12 @@ func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGr // BeginStop - Stop a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. func (client *ServicesClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, serviceName, options) @@ -724,7 +739,8 @@ func (client *ServicesClient) BeginStop(ctx context.Context, resourceGroupName s // Stop - Stop a Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServicesClient) stop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -760,7 +776,7 @@ func (client *ServicesClient) stopCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -768,12 +784,13 @@ func (client *ServicesClient) stopCreateRequest(ctx context.Context, resourceGro // BeginUpdate - Operation to update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// resource - Parameters for the update operation -// options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - resource - Parameters for the update operation +// - options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serviceName, resource, options) @@ -788,7 +805,8 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Operation to update an exiting Service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *ServicesClient) update(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) if err != nil { @@ -824,7 +842,7 @@ func (client *ServicesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resource) diff --git a/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go deleted file mode 100644 index 35c68d633c31..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/services_client_example_test.go +++ /dev/null @@ -1,398 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Get.json -func ExampleServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate.json -func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{}, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Tier: to.Ptr("Standard"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate_Enterprise.json -func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateEnterprise() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{ - MarketplaceResource: &armappplatform.MarketplaceResource{ - Plan: to.Ptr("tanzu-asc-ent-mtr"), - Product: to.Ptr("azure-spring-cloud-vmware-tanzu-2"), - Publisher: to.Ptr("vmware-inc"), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("E0"), - Tier: to.Ptr("Enterprise"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json -func ExampleServicesClient_BeginCreateOrUpdate_servicesCreateOrUpdateVNetInjection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{ - NetworkProfile: &armappplatform.NetworkProfile{ - AppNetworkResourceGroup: to.Ptr("my-app-network-rg"), - AppSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/apps"), - IngressConfig: &armappplatform.IngressConfig{ - ReadTimeoutInSeconds: to.Ptr[int32](300), - }, - ServiceCidr: to.Ptr("10.8.0.0/16,10.244.0.0/16,10.245.0.1/16"), - ServiceRuntimeNetworkResourceGroup: to.Ptr("my-service-runtime-network-rg"), - ServiceRuntimeSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/serviceRuntime"), - }, - VnetAddons: &armappplatform.ServiceVNetAddons{ - LogStreamPublicEndpoint: to.Ptr(true), - }, - }, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Tier: to.Ptr("Standard"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Delete.json -func ExampleServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Update.json -func ExampleServicesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armappplatform.ClusterResourceProperties{}, - SKU: &armappplatform.SKU{ - Name: to.Ptr("S0"), - Tier: to.Ptr("Standard"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_ListTestKeys.json -func ExampleServicesClient_ListTestKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListTestKeys(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_RegenerateTestKey.json -func ExampleServicesClient_RegenerateTestKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.RegenerateTestKey(ctx, "myResourceGroup", "myservice", armappplatform.RegenerateTestKeyRequestPayload{ - KeyType: to.Ptr(armappplatform.TestKeyTypePrimary), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_DisableTestEndpoint.json -func ExampleServicesClient_DisableTestEndpoint() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DisableTestEndpoint(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_EnableTestEndpoint.json -func ExampleServicesClient_EnableTestEndpoint() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.EnableTestEndpoint(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Stop.json -func ExampleServicesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_Start.json -func ExampleServicesClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, "myResourceGroup", "myservice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_CheckNameAvailability.json -func ExampleServicesClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, "eastus", armappplatform.NameAvailabilityParameters{ - Name: to.Ptr("myservice"), - Type: to.Ptr("Microsoft.AppPlatform/Spring"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_ListBySubscription.json -func ExampleServicesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Services_List.json -func ExampleServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go index 5f504a26cb25..53ec263cc6bb 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/skus_client.go @@ -32,10 +32,10 @@ type SKUsClient struct { } // NewSKUsClient creates a new instance of SKUsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,8 +57,9 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt } // NewListPager - Lists all of the available skus of the Microsoft.AppPlatform provider. -// Generated from API version 2022-11-01-preview -// options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. +// +// Generated from API version 2023-01-01-preview +// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ More: func(page SKUsClientListResponse) bool { @@ -99,7 +100,7 @@ func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsCl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go deleted file mode 100644 index deef09d5b745..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/skus_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Skus_List.json -func ExampleSKUsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewSKUsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go b/sdk/resourcemanager/appplatform/armappplatform/storages_client.go index 7ba97d7df408..006d2cc9035a 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client.go +++ b/sdk/resourcemanager/appplatform/armappplatform/storages_client.go @@ -32,10 +32,10 @@ type StoragesClient struct { } // NewStoragesClient creates a new instance of StoragesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StoragesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewStoragesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create or update storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// storageName - The name of the storage resource. -// storageResource - Parameters for the create or update operation -// options - StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - storageName - The name of the storage resource. +// - storageResource - Parameters for the create or update operation +// - options - StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate +// method. func (client *StoragesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, storageName, storageResource, options) @@ -80,7 +81,8 @@ func (client *StoragesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *StoragesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, storageName, storageResource, options) if err != nil { @@ -120,7 +122,7 @@ func (client *StoragesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageResource) @@ -128,12 +130,13 @@ func (client *StoragesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Delete the storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// storageName - The name of the storage resource. -// options - StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - storageName - The name of the storage resource. +// - options - StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. func (client *StoragesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, storageName, options) @@ -148,7 +151,8 @@ func (client *StoragesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview +// +// Generated from API version 2023-01-01-preview func (client *StoragesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) if err != nil { @@ -188,7 +192,7 @@ func (client *StoragesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,12 +200,13 @@ func (client *StoragesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get the storage resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// storageName - The name of the storage resource. -// options - StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - storageName - The name of the storage resource. +// - options - StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. func (client *StoragesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (StoragesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) if err != nil { @@ -241,7 +246,7 @@ func (client *StoragesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,11 +262,12 @@ func (client *StoragesClient) getHandleResponse(resp *http.Response) (StoragesCl } // NewListPager - List all the storages of one Azure Spring Apps resource. -// Generated from API version 2022-11-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - StoragesClientListOptions contains the optional parameters for the StoragesClient.List method. +// +// Generated from API version 2023-01-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. func (client *StoragesClient) NewListPager(resourceGroupName string, serviceName string, options *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[StoragesClientListResponse]{ More: func(page StoragesClientListResponse) bool { @@ -310,7 +316,7 @@ func (client *StoragesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-01-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go b/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go deleted file mode 100644 index 65e9edd463bf..000000000000 --- a/sdk/resourcemanager/appplatform/armappplatform/storages_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_Get.json -func ExampleStoragesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "myservice", "mystorage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_CreateOrUpdate.json -func ExampleStoragesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "mystorage", armappplatform.StorageResource{ - Properties: &armappplatform.StorageAccount{ - StorageType: to.Ptr(armappplatform.StorageTypeStorageAccount), - AccountKey: to.Ptr("account-key-of-storage-account"), - AccountName: to.Ptr("storage-account-name"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_Delete.json -func ExampleStoragesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "mystorage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Storages_List.json -func ExampleStoragesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappplatform.NewStoragesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "myService", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go b/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go index c2e3f14d72a8..22ee10481ef1 100644 --- a/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go +++ b/sdk/resourcemanager/appplatform/armappplatform/time_rfc3339.go @@ -62,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) {