From e0375000136c37c73860b9954b3d55e5d09b94e7 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Wed, 17 Jan 2024 17:02:48 +0800 Subject: [PATCH 1/3] Update swagger_to_sdk_config.json --- eng/swagger_to_sdk_config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/swagger_to_sdk_config.json b/eng/swagger_to_sdk_config.json index e47880efcbad..171896fa0ada 100644 --- a/eng/swagger_to_sdk_config.json +++ b/eng/swagger_to_sdk_config.json @@ -23,6 +23,7 @@ } }, "packageOptions": { - "breakingChangeLabel": "CI-BreakingChange-Go" + "breakingChangeLabel": "CI-BreakingChange-Go", + "breakingChangeSuppressionLabel": "BreakingChange-Go-Suppression" } } From 3f503ffe847912b07f87a077a3ae15d3d63bf869 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Tue, 30 Jan 2024 11:42:44 +0800 Subject: [PATCH 2/3] Update swagger_to_sdk_config.json --- eng/swagger_to_sdk_config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/swagger_to_sdk_config.json b/eng/swagger_to_sdk_config.json index 171896fa0ada..74ad2c044667 100644 --- a/eng/swagger_to_sdk_config.json +++ b/eng/swagger_to_sdk_config.json @@ -24,6 +24,7 @@ }, "packageOptions": { "breakingChangeLabel": "CI-BreakingChange-Go", + "breakingChangesLabel": "BreakingChange-Go-Sdk", "breakingChangeSuppressionLabel": "BreakingChange-Go-Suppression" } } From bfa1ca3a05233f70e8057917353f63d4304e90f3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 24 Apr 2024 06:45:52 +0000 Subject: [PATCH 3/3] CodeGen from PR 3322 in test-repo-billy/azure-rest-api-specs Merge 593e419313fbeb1b1b8464513d55e18e69d81b13 into 3d8fc4117fc1de8ab32bf106b6ead1564414a80f --- .../appservice/armappservice/CHANGELOG.md | 138 + ...cecertificateorders_client_example_test.go | 555 ---- ...serviceenvironments_client_example_test.go | 1155 ------- .../appserviceplans_client_example_test.go | 173 - .../appservice/armappservice/autorest.md | 6 +- .../armappservice/certificateorders_client.go | 87 +- .../certificateordersdiagnostics_client.go | 9 +- ...teordersdiagnostics_client_example_test.go | 69 - .../certificateregistrationprovider_client.go | 5 +- ...egistrationprovider_client_example_test.go | 41 - .../armappservice/certificates_client.go | 26 +- .../certificates_client_example_test.go | 166 - .../appservice/armappservice/constants.go | 205 +- .../armappservice/containerapps_client.go | 30 +- .../containerapps_client_example_test.go | 198 -- .../containerappsrevisions_client.go | 21 +- ...tainerappsrevisions_client_example_test.go | 129 - .../armappservice/deletedwebapps_client.go | 14 +- .../deletedwebapps_client_example_test.go | 64 - .../armappservice/diagnostics_client.go | 97 +- .../diagnostics_client_example_test.go | 593 ---- .../domainregistrationprovider_client.go | 5 +- ...egistrationprovider_client_example_test.go | 41 - .../armappservice/domains_client.go | 70 +- .../domains_client_example_test.go | 564 ---- .../armappservice/environments_client.go | 303 +- .../getusagesinlocation_client.go | 120 + .../appservice/armappservice/global_client.go | 12 +- .../global_client_example_test.go | 79 - .../appservice/armappservice/go.mod | 16 +- .../appservice/armappservice/go.sum | 24 +- .../armappservice/kubeenvironments_client.go | 30 +- .../kubeenvironments_client_example_test.go | 172 - .../appservice/armappservice/models.go | 771 ++++- .../appservice/armappservice/models_serde.go | 1635 +++++++++- .../appservice/armappservice/plans_client.go | 116 +- .../armappservice/provider_client.go | 35 +- .../provider_client_example_test.go | 139 - .../armappservice/recommendations_client.go | 65 +- .../resourcehealthmetadata_client.go | 28 +- ...ourcehealthmetadata_client_example_test.go | 164 - .../armappservice/response_types.go | 180 +- .../armappservice/staticsites_client.go | 1515 +++++++-- .../staticsites_client_example_test.go | 1537 --------- .../armappservice/topleveldomains_client.go | 14 +- .../topleveldomains_client_example_test.go | 92 - .../armappservice/webapps_client.go | 2825 +++++++++++------ .../webapps_client_example_test.go | 1187 ------- .../armappservice/websitemanagement_client.go | 133 +- ...itemanagementclient_client_example_test.go | 69 - .../workflowrunactionrepetitions_client.go | 14 +- ...unactionrepetitions_client_example_test.go | 102 - ...ctionrepetitionsrequesthistories_client.go | 9 +- ...onsrequesthistories_client_example_test.go | 74 - .../workflowrunactions_client.go | 14 +- .../workflowrunactions_client_example_test.go | 101 - ...orkflowrunactionscoperepetitions_client.go | 9 +- ...ionscoperepetitions_client_example_test.go | 72 - .../armappservice/workflowruns_client.go | 13 +- .../workflowruns_client_example_test.go | 92 - .../armappservice/workflows_client.go | 8 +- .../workflows_client_example_test.go | 76 - .../workflowtriggerhistories_client.go | 15 +- ...lowtriggerhistories_client_example_test.go | 99 - .../armappservice/workflowtriggers_client.go | 23 +- .../workflowtriggers_client_example_test.go | 96 - .../armappservice/workflowversions_client.go | 9 +- .../workflowversions_client_example_test.go | 68 - 68 files changed, 6663 insertions(+), 9953 deletions(-) delete mode 100644 sdk/resourcemanager/appservice/armappservice/appservicecertificateorders_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/appserviceenvironments_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/appserviceplans_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go create mode 100644 sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/global_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/websitemanagementclient_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go diff --git a/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md b/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md index 574dbf9f3cf3..33bd35a1b874 100644 --- a/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md +++ b/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md @@ -1,5 +1,143 @@ # Release History +## 3.0.0 (2024-04-24) +### Breaking Changes + +- Function `*EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, RemotePrivateEndpointConnectionARMResource, *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` +- Function `*StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, RemotePrivateEndpointConnectionARMResource, *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` +- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, RemotePrivateEndpointConnectionARMResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` +- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions)` to `(context.Context, string, string, string, string, RemotePrivateEndpointConnectionARMResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions)` +- Type of `ContentLink.Metadata` has been changed from `any` to `interface{}` +- Type of `ContinuousWebJobProperties.Settings` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse.Interface` has been changed from `any` to `interface{}` +- Type of `EnvironmentsClientDeletePrivateEndpointConnectionResponse.Interface` has been changed from `any` to `interface{}` +- Type of `Expression.Value` has been changed from `any` to `interface{}` +- Type of `ExpressionRoot.Value` has been changed from `any` to `interface{}` +- Type of `ExpressionTraces.Value` has been changed from `any` to `interface{}` +- Type of `FunctionEnvelopeProperties.Config` has been changed from `any` to `interface{}` +- Type of `KeyValuePairStringObject.Value` has been changed from `any` to `interface{}` +- Type of `OperationResult.Error` has been changed from `any` to `interface{}` +- Type of `OperationResult.Inputs` has been changed from `any` to `interface{}` +- Type of `OperationResult.TrackedProperties` has been changed from `any` to `interface{}` +- Type of `OperationResult.Outputs` has been changed from `any` to `interface{}` +- Type of `OperationResultProperties.Error` has been changed from `any` to `interface{}` +- Type of `PlansClientGetServerFarmSKUsResponse.Interface` has been changed from `any` to `interface{}` +- Type of `Request.Headers` has been changed from `any` to `interface{}` +- Type of `Response.Headers` has been changed from `any` to `interface{}` +- Type of `StackMajorVersion.SiteConfigPropertiesDictionary` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `StackMajorVersion.AppSettingsDictionary` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `StaticSitesClientDeletePrivateEndpointConnectionResponse.Interface` has been changed from `any` to `interface{}` +- Type of `TriggeredWebJobProperties.Settings` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `WebAppsClientCreateOneDeployOperationResponse.Interface` has been changed from `any` to `interface{}` +- Type of `WebAppsClientDeletePrivateEndpointConnectionResponse.Interface` has been changed from `any` to `interface{}` +- Type of `WebAppsClientDeletePrivateEndpointConnectionSlotResponse.Interface` has been changed from `any` to `interface{}` +- Type of `WebAppsClientGetOneDeployStatusResponse.Interface` has been changed from `any` to `interface{}` +- Type of `WebJobProperties.Settings` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `WorkflowArtifacts.AppSettings` has been changed from `any` to `interface{}` +- Type of `WorkflowArtifacts.Files` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `WorkflowEnvelopeProperties.Files` has been changed from `map[string]any` to `map[string]interface{}` +- Type of `WorkflowOutputParameter.Value` has been changed from `any` to `interface{}` +- Type of `WorkflowOutputParameter.Error` has been changed from `any` to `interface{}` +- Type of `WorkflowOutputParameter.Metadata` has been changed from `any` to `interface{}` +- Type of `WorkflowParameter.Metadata` has been changed from `any` to `interface{}` +- Type of `WorkflowParameter.Value` has been changed from `any` to `interface{}` +- Type of `WorkflowProperties.Definition` has been changed from `any` to `interface{}` +- Type of `WorkflowRunActionProperties.Error` has been changed from `any` to `interface{}` +- Type of `WorkflowRunActionProperties.TrackedProperties` has been changed from `any` to `interface{}` +- Type of `WorkflowRunActionRepetitionProperties.Outputs` has been changed from `any` to `interface{}` +- Type of `WorkflowRunActionRepetitionProperties.Inputs` has been changed from `any` to `interface{}` +- Type of `WorkflowRunActionRepetitionProperties.TrackedProperties` has been changed from `any` to `interface{}` +- Type of `WorkflowRunActionRepetitionProperties.Error` has been changed from `any` to `interface{}` +- Type of `WorkflowRunProperties.Error` has been changed from `any` to `interface{}` +- Type of `WorkflowRunTrigger.Inputs` has been changed from `any` to `interface{}` +- Type of `WorkflowRunTrigger.Error` has been changed from `any` to `interface{}` +- Type of `WorkflowRunTrigger.Outputs` has been changed from `any` to `interface{}` +- Type of `WorkflowRunTrigger.TrackedProperties` has been changed from `any` to `interface{}` +- Type of `WorkflowTriggerHistoryProperties.Error` has been changed from `any` to `interface{}` +- Type of `WorkflowVersionProperties.Definition` has been changed from `any` to `interface{}` +- Function `NewClientFactory` has been removed +- Function `*ClientFactory.NewCertificateOrdersClient` has been removed +- Function `*ClientFactory.NewCertificateOrdersDiagnosticsClient` has been removed +- Function `*ClientFactory.NewCertificateRegistrationProviderClient` has been removed +- Function `*ClientFactory.NewCertificatesClient` has been removed +- Function `*ClientFactory.NewContainerAppsClient` has been removed +- Function `*ClientFactory.NewContainerAppsRevisionsClient` has been removed +- Function `*ClientFactory.NewDeletedWebAppsClient` has been removed +- Function `*ClientFactory.NewDiagnosticsClient` has been removed +- Function `*ClientFactory.NewDomainRegistrationProviderClient` has been removed +- Function `*ClientFactory.NewDomainsClient` has been removed +- Function `*ClientFactory.NewEnvironmentsClient` has been removed +- Function `*ClientFactory.NewGetUsagesInLocationClient` has been removed +- Function `*ClientFactory.NewGlobalClient` has been removed +- Function `*ClientFactory.NewKubeEnvironmentsClient` has been removed +- Function `*ClientFactory.NewPlansClient` has been removed +- Function `*ClientFactory.NewProviderClient` has been removed +- Function `*ClientFactory.NewRecommendationsClient` has been removed +- Function `*ClientFactory.NewResourceHealthMetadataClient` has been removed +- Function `*ClientFactory.NewStaticSitesClient` has been removed +- Function `*ClientFactory.NewTopLevelDomainsClient` has been removed +- Function `*ClientFactory.NewWebAppsClient` has been removed +- Function `*ClientFactory.NewWebSiteManagementClient` has been removed +- Function `*ClientFactory.NewWorkflowRunActionRepetitionsClient` has been removed +- Function `*ClientFactory.NewWorkflowRunActionRepetitionsRequestHistoriesClient` has been removed +- Function `*ClientFactory.NewWorkflowRunActionScopeRepetitionsClient` has been removed +- Function `*ClientFactory.NewWorkflowRunActionsClient` has been removed +- Function `*ClientFactory.NewWorkflowRunsClient` has been removed +- Function `*ClientFactory.NewWorkflowTriggerHistoriesClient` has been removed +- Function `*ClientFactory.NewWorkflowTriggersClient` has been removed +- Function `*ClientFactory.NewWorkflowVersionsClient` has been removed +- Function `*ClientFactory.NewWorkflowsClient` has been removed +- Function `*EnvironmentsClient.NewListByResourceGroupPager` has been removed +- Function `dateTimeRFC3339.MarshalText` has been removed +- Function `*dateTimeRFC3339.Parse` has been removed +- Function `*dateTimeRFC3339.UnmarshalText` has been removed +- Struct `ClientFactory` has been removed +- Struct `EnvironmentsClientListByResourceGroupResponse` has been removed + +### Features Added + +- New value `SKUNameFlexConsumption` added to type alias `SKUName` +- New value `StorageTypeBlobContainer` added to type alias `StorageType` +- New value `SupportedTLSVersionsOne3` added to type alias `SupportedTLSVersions` +- New type alias `AuthType` with values `AuthTypeAnonymous`, `AuthTypeSystemIdentity`, `AuthTypeUserAssigned`, `AuthTypeUserCredentials` +- New type alias `AuthenticationType` with values `AuthenticationTypeStorageAccountConnectionString`, `AuthenticationTypeSystemAssignedIdentity`, `AuthenticationTypeUserAssignedIdentity` +- New type alias `AzureStorageProtocol` with values `AzureStorageProtocolHTTP`, `AzureStorageProtocolNfs`, `AzureStorageProtocolSmb` +- New type alias `RuntimeName` with values `RuntimeNameCustom`, `RuntimeNameDotnetIsolated`, `RuntimeNameJava`, `RuntimeNameNode`, `RuntimeNamePowershell`, `RuntimeNamePython` +- New function `*WebAppsClient.CreateOrUpdateSiteContainer(context.Context, string, string, string, SiteContainer, *WebAppsClientCreateOrUpdateSiteContainerOptions) (WebAppsClientCreateOrUpdateSiteContainerResponse, error)` +- New function `*WebAppsClient.CreateOrUpdateSiteContainerSlot(context.Context, string, string, string, string, SiteContainer, *WebAppsClientCreateOrUpdateSiteContainerSlotOptions) (WebAppsClientCreateOrUpdateSiteContainerSlotResponse, error)` +- New function `*WebAppsClient.DeleteSiteContainer(context.Context, string, string, string, *WebAppsClientDeleteSiteContainerOptions) (WebAppsClientDeleteSiteContainerResponse, error)` +- New function `*WebAppsClient.DeleteSiteContainerSlot(context.Context, string, string, string, string, *WebAppsClientDeleteSiteContainerSlotOptions) (WebAppsClientDeleteSiteContainerSlotResponse, error)` +- New function `*WebAppsClient.GetSiteContainer(context.Context, string, string, string, *WebAppsClientGetSiteContainerOptions) (WebAppsClientGetSiteContainerResponse, error)` +- New function `*WebAppsClient.GetSiteContainerSlot(context.Context, string, string, string, string, *WebAppsClientGetSiteContainerSlotOptions) (WebAppsClientGetSiteContainerSlotResponse, error)` +- New function `*WebAppsClient.NewListSiteContainersPager(string, string, *WebAppsClientListSiteContainersOptions) *runtime.Pager[WebAppsClientListSiteContainersResponse]` +- New function `*WebAppsClient.NewListSiteContainersSlotPager(string, string, string, *WebAppsClientListSiteContainersSlotOptions) *runtime.Pager[WebAppsClientListSiteContainersSlotResponse]` +- New function `timeRFC3339.MarshalText() ([]byte, error)` +- New function `*timeRFC3339.Parse(string) error` +- New function `*timeRFC3339.UnmarshalText([]byte) error` +- New struct `EnvironmentVariable` +- New struct `FunctionAppConfig` +- New struct `FunctionsAlwaysReadyConfig` +- New struct `FunctionsDeployment` +- New struct `FunctionsDeploymentStorage` +- New struct `FunctionsDeploymentStorageAuthentication` +- New struct `FunctionsRuntime` +- New struct `FunctionsScaleAndConcurrency` +- New struct `FunctionsScaleAndConcurrencyTriggers` +- New struct `FunctionsScaleAndConcurrencyTriggersHTTP` +- New struct `SiteContainer` +- New struct `SiteContainerCollection` +- New struct `SiteContainerProperties` +- New struct `SiteDNSConfig` +- New struct `VolumeMount` +- New struct `WebAppsClientListSiteContainersResponse` +- New struct `WebAppsClientListSiteContainersSlotResponse` +- New field `Protocol` in struct `AzureStorageInfoValue` +- New field `DNSConfiguration` in struct `SitePatchResourceProperties` +- New field `DNSConfiguration` in struct `SiteProperties` +- New field `FunctionAppConfig` in struct `SiteProperties` +- New field `VnetBackupRestoreEnabled` in struct `SiteProperties` + + ## 2.0.0 (2022-07-12) ### Breaking Changes diff --git a/sdk/resourcemanager/appservice/armappservice/appservicecertificateorders_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/appservicecertificateorders_client_example_test.go deleted file mode 100644 index b916a4239ef5..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/appservicecertificateorders_client_example_test.go +++ /dev/null @@ -1,555 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ListAppServiceCertificateOrdersBySubscription.json -func ExampleCertificateOrdersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ValidateAppServiceCertificatePurchaseInformationBySubscription.json -func ExampleCertificateOrdersClient_ValidatePurchaseInformation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.ValidatePurchaseInformation(ctx, - armappservice.CertificateOrder{ - Location: to.Ptr("Global"), - Properties: &armappservice.CertificateOrderProperties{ - AutoRenew: to.Ptr(true), - Certificates: map[string]*armappservice.Certificate{ - "SampleCertName1": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - "SampleCertName2": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName2"), - }, - }, - DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - KeySize: to.Ptr[int32](2048), - ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - ValidityInYears: to.Ptr[int32](2), - }, - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ListAppServiceCertificateOrdersByResourceGroup.json -func ExampleCertificateOrdersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testrg123", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/GetAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "SampleCertificateOrderName", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/CreateAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testrg123", - "SampleCertificateOrderName", - armappservice.CertificateOrder{ - Location: to.Ptr("Global"), - Properties: &armappservice.CertificateOrderProperties{ - AutoRenew: to.Ptr(true), - Certificates: map[string]*armappservice.Certificate{ - "SampleCertName1": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - "SampleCertName2": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName2"), - }, - }, - DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - KeySize: to.Ptr[int32](2048), - ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - ValidityInYears: 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/DeleteAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "SampleCertificateOrderName", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/UpdateAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "testrg123", - "SampleCertificateOrderName", - armappservice.CertificateOrderPatchResource{ - Properties: &armappservice.CertificateOrderPatchResourceProperties{ - AutoRenew: to.Ptr(true), - Certificates: map[string]*armappservice.Certificate{ - "SampleCertName1": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - "SampleCertName2": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName2"), - }, - }, - DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - KeySize: to.Ptr[int32](2048), - ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - ValidityInYears: to.Ptr[int32](2), - }, - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ListCertificatesByAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_NewListCertificatesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCertificatesPager("testrg123", - "SampleCertificateOrderName", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/GetAppServiceCertificate.json -func ExampleCertificateOrdersClient_GetCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetCertificate(ctx, - "testrg123", - "SampleCertificateOrderName", - "SampleCertName1", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/CreateAppServiceCertificate.json -func ExampleCertificateOrdersClient_BeginCreateOrUpdateCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdateCertificate(ctx, - "testrg123", - "SampleCertificateOrderName", - "SampleCertName1", - armappservice.CertificateResource{ - Location: to.Ptr("Global"), - Properties: &armappservice.Certificate{ - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/DeleteAppServiceCertificate.json -func ExampleCertificateOrdersClient_DeleteCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DeleteCertificate(ctx, - "testrg123", - "SampleCertificateOrderName", - "SampleCertName1", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/UpdateAppServiceCertificate.json -func ExampleCertificateOrdersClient_UpdateCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateCertificate(ctx, - "testrg123", - "SampleCertificateOrderName", - "SampleCertName1", - armappservice.CertificatePatchResource{ - Properties: &armappservice.Certificate{ - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ReissueAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Reissue() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Reissue(ctx, - "testrg123", - "SampleCertificateOrderName", - armappservice.ReissueCertificateOrderRequest{ - Properties: &armappservice.ReissueCertificateOrderRequestProperties{ - Csr: to.Ptr("CSR1223238Value"), - DelayExistingRevokeInHours: to.Ptr[int32](2), - IsPrivateKeyExternal: to.Ptr(false), - KeySize: to.Ptr[int32](2048), - }, - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/RenewAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Renew() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Renew(ctx, - "testrg123", - "SampleCertificateOrderName", - armappservice.RenewCertificateOrderRequest{ - Properties: &armappservice.RenewCertificateOrderRequestProperties{ - Csr: to.Ptr("CSR1223238Value"), - IsPrivateKeyExternal: to.Ptr(false), - KeySize: to.Ptr[int32](2048), - }, - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ResendAppServiceCertificateOrderEmail.json -func ExampleCertificateOrdersClient_ResendEmail() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.ResendEmail(ctx, - "testrg123", - "SampleCertificateOrderName", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ResendDomainOwnershipVerificationEmail.json -func ExampleCertificateOrdersClient_ResendRequestEmails() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.ResendRequestEmails(ctx, - "testrg123", - "SampleCertificateOrderName", - armappservice.NameIdentifier{ - Name: to.Ptr("Domain name"), - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/RetrieveSiteSeal.json -func ExampleCertificateOrdersClient_RetrieveSiteSeal() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.RetrieveSiteSeal(ctx, - "testrg123", - "SampleCertOrder", - armappservice.SiteSealRequest{ - LightTheme: to.Ptr(true), - Locale: to.Ptr("en-us"), - }, - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/VerifyDomainOwnership.json -func ExampleCertificateOrdersClient_VerifyDomainOwnership() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.VerifyDomainOwnership(ctx, - "testrg123", - "SampleCertificateOrderName", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/RetrieveCertificateOrderActions.json -func ExampleCertificateOrdersClient_RetrieveCertificateActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.RetrieveCertificateActions(ctx, - "testrg123", - "SampleCertOrder", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/RetrieveCertificateEmailHistory.json -func ExampleCertificateOrdersClient_RetrieveCertificateEmailHistory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.RetrieveCertificateEmailHistory(ctx, - "testrg123", - "SampleCertOrder", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/appserviceenvironments_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/appserviceenvironments_client_example_test.go deleted file mode 100644 index 8be9fbcd52e2..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/appserviceenvironments_client_example_test.go +++ /dev/null @@ -1,1155 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_List.json -func ExampleEnvironmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListByResourceGroup.json -func ExampleEnvironmentsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("test-rg", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Get.json -func ExampleEnvironmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_CreateOrUpdate.json -func ExampleEnvironmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "test-rg", - "test-ase", - armappservice.EnvironmentResource{ - Kind: to.Ptr("Asev3"), - Location: to.Ptr("South Central US"), - Properties: &armappservice.Environment{ - VirtualNetwork: &armappservice.VirtualNetworkProfile{ - ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/delegated"), - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Delete.json -func ExampleEnvironmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "test-rg", - "test-ase", - &armappservice.EnvironmentsClientBeginDeleteOptions{ForceDelete: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Update.json -func ExampleEnvironmentsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "test-rg", - "test-ase", - armappservice.EnvironmentPatchResource{ - Properties: &armappservice.Environment{ - FrontEndScaleFactor: to.Ptr[int32](20), - VirtualNetwork: &armappservice.VirtualNetworkProfile{ - ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListCapacities.json -func ExampleEnvironmentsClient_NewListCapacitiesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCapacitiesPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetVipInfo.json -func ExampleEnvironmentsClient_GetVipInfo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetVipInfo(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ChangeVnet.json -func ExampleEnvironmentsClient_BeginChangeVnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginChangeVnet(ctx, - "test-rg", - "test-ase", - armappservice.VirtualNetworkProfile{ - ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/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) - } - for res.More() { - nextResult, err := res.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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetAseV3NetworkingConfiguration.json -func ExampleEnvironmentsClient_GetAseV3NetworkingConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAseV3NetworkingConfiguration(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_UpdateAseNetworkingConfiguration.json -func ExampleEnvironmentsClient_UpdateAseNetworkingConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateAseNetworkingConfiguration(ctx, - "test-rg", - "test-ase", - armappservice.AseV3NetworkingConfiguration{ - Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - FtpEnabled: to.Ptr(true), - RemoteDebugEnabled: to.Ptr(true), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListDiagnostics.json -func ExampleEnvironmentsClient_ListDiagnostics() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListDiagnostics(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetDiagnosticsItem.json -func ExampleEnvironmentsClient_GetDiagnosticsItem() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDiagnosticsItem(ctx, - "test-rg", - "test-ase", - "test-diagnostic", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetInboundNetworkDependenciesEndpoints.json -func ExampleEnvironmentsClient_NewGetInboundNetworkDependenciesEndpointsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetInboundNetworkDependenciesEndpointsPager("Sample-WestUSResourceGroup", - "SampleAse", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListMultiRolePools.json -func ExampleEnvironmentsClient_NewListMultiRolePoolsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListMultiRolePoolsPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetMultiRolePool.json -func ExampleEnvironmentsClient_GetMultiRolePool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetMultiRolePool(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json -func ExampleEnvironmentsClient_BeginCreateOrUpdateMultiRolePool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdateMultiRolePool(ctx, - "test-rg", - "test-ase", - armappservice.WorkerPoolResource{ - Properties: &armappservice.WorkerPool{ - WorkerCount: to.Ptr[int32](3), - WorkerSize: to.Ptr("Medium"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json -func ExampleEnvironmentsClient_UpdateMultiRolePool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateMultiRolePool(ctx, - "test-rg", - "test-ase", - armappservice.WorkerPoolResource{ - Properties: &armappservice.WorkerPool{ - WorkerCount: to.Ptr[int32](3), - WorkerSize: to.Ptr("Medium"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions.json -func ExampleEnvironmentsClient_NewListMultiRolePoolInstanceMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListMultiRolePoolInstanceMetricDefinitionsPager("test-rg", - "test-ase", - "10.7.1.8", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListMultiRoleMetricDefinitions.json -func ExampleEnvironmentsClient_NewListMultiRoleMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListMultiRoleMetricDefinitionsPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_TestUpgradeAvailableNotification.json -func ExampleEnvironmentsClient_TestUpgradeAvailableNotification() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.TestUpgradeAvailableNotification(ctx, - "rg", - "SampleHostingEnvironment", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Upgrade.json -func ExampleEnvironmentsClient_BeginUpgrade() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpgrade(ctx, - "rg", - "SampleHostingEnvironment", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListMultiRoleUsages.json -func ExampleEnvironmentsClient_NewListMultiRoleUsagesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListMultiRoleUsagesPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListOperations.json -func ExampleEnvironmentsClient_ListOperations() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListOperations(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetOutboundNetworkDependenciesEndpoints.json -func ExampleEnvironmentsClient_NewGetOutboundNetworkDependenciesEndpointsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetOutboundNetworkDependenciesEndpointsPager("Sample-WestUSResourceGroup", - "SampleAse", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetPrivateEndpointConnectionList.json -func ExampleEnvironmentsClient_NewGetPrivateEndpointConnectionListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetPrivateEndpointConnectionListPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json -func ExampleEnvironmentsClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnection(ctx, - "test-rg", - "test-ase", - "fa38656c-034e-43d8-adce-fe06ce039c98", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json -func ExampleEnvironmentsClient_BeginApproveOrRejectPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginApproveOrRejectPrivateEndpointConnection(ctx, - "test-rg", - "test-ase", - "fa38656c-034e-43d8-adce-fe06ce039c98", - armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by johndoe@company.com"), - Status: to.Ptr("Approved"), - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_DeletePrivateEndpointConnection.json -func ExampleEnvironmentsClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeletePrivateEndpointConnection(ctx, - "test-rg", - "test-ase", - "fa38656c-034e-43d8-adce-fe06ce039c98", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetPrivateLinkResources.json -func ExampleEnvironmentsClient_GetPrivateLinkResources() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResources(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Reboot.json -func ExampleEnvironmentsClient_Reboot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Reboot(ctx, - "test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Resume.json -func ExampleEnvironmentsClient_BeginResume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResume(ctx, - "test-rg", - "test-ase", - 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) - } - for res.More() { - nextResult, err := res.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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListAppServicePlans.json -func ExampleEnvironmentsClient_NewListAppServicePlansPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAppServicePlansPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListWebApps.json -func ExampleEnvironmentsClient_NewListWebAppsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListWebAppsPager("test-rg", - "test-ase", - &armappservice.EnvironmentsClientListWebAppsOptions{PropertiesToInclude: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_Suspend.json -func ExampleEnvironmentsClient_BeginSuspend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSuspend(ctx, - "test-rg", - "test-ase", - 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) - } - for res.More() { - nextResult, err := res.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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListUsages.json -func ExampleEnvironmentsClient_NewListUsagesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListUsagesPager("test-rg", - "test-ase", - &armappservice.EnvironmentsClientListUsagesOptions{Filter: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListWorkerPools.json -func ExampleEnvironmentsClient_NewListWorkerPoolsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListWorkerPoolsPager("test-rg", - "test-ase", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_GetWorkerPool.json -func ExampleEnvironmentsClient_GetWorkerPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetWorkerPool(ctx, - "test-rg", - "test-ase", - "workerPool1", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json -func ExampleEnvironmentsClient_BeginCreateOrUpdateWorkerPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdateWorkerPool(ctx, - "test-rg", - "test-ase", - "0", - armappservice.WorkerPoolResource{ - Properties: &armappservice.WorkerPool{ - WorkerCount: to.Ptr[int32](3), - WorkerSize: to.Ptr("Small"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json -func ExampleEnvironmentsClient_UpdateWorkerPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateWorkerPool(ctx, - "test-rg", - "test-ase", - "0", - armappservice.WorkerPoolResource{ - Properties: &armappservice.WorkerPool{ - WorkerCount: to.Ptr[int32](3), - WorkerSize: to.Ptr("Small"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions.json -func ExampleEnvironmentsClient_NewListWorkerPoolInstanceMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListWorkerPoolInstanceMetricDefinitionsPager("test-rg", - "test-ase", - "0", - "10.8.0.7", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListWebWorkerMetricDefinitions.json -func ExampleEnvironmentsClient_NewListWebWorkerMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListWebWorkerMetricDefinitionsPager("test-rg", - "test-ase", - "0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/AppServiceEnvironments_ListWebWorkerUsages.json -func ExampleEnvironmentsClient_NewListWebWorkerUsagesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListWebWorkerUsagesPager("test-rg", - "test-ase", - "0", - 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/appservice/armappservice/appserviceplans_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/appserviceplans_client_example_test.go deleted file mode 100644 index 1ed698079ebb..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/appserviceplans_client_example_test.go +++ /dev/null @@ -1,173 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListAppServicePlans.json -func ExamplePlansClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(&armappservice.PlansClientListOptions{Detailed: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListAppServicePlansByResourceGroup.json -func ExamplePlansClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testrg123", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetAppServicePlan.json -func ExamplePlansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "testsf6141", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateAppServicePlan.json -func ExamplePlansClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testrg123", - "testsf6141", - armappservice.Plan{ - Kind: to.Ptr("app"), - Location: to.Ptr("East US"), - Properties: &armappservice.PlanProperties{}, - SKU: &armappservice.SKUDescription{ - Name: to.Ptr("P1"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("P"), - Size: to.Ptr("P1"), - Tier: to.Ptr("Premium"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteAppServicePlan.json -func ExamplePlansClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "testsf6141", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/PatchAppServicePlan.json -func ExamplePlansClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "testrg123", - "testsf6141", - armappservice.PlanPatchResource{ - Kind: to.Ptr("app"), - Properties: &armappservice.PlanPatchResourceProperties{}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/autorest.md b/sdk/resourcemanager/appservice/armappservice/autorest.md index f179fd49654b..6b2c1fcb7fbf 100644 --- a/sdk/resourcemanager/appservice/armappservice/autorest.md +++ b/sdk/resourcemanager/appservice/armappservice/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/432872fac1d0f8edcae98a0e8504afc0ee302710/specification/web/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/432872fac1d0f8edcae98a0e8504afc0ee302710/specification/web/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/web/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/web/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0 +module-version: 3.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go b/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go index 98713508d43a..46bf9ccc1a3e 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go @@ -57,7 +57,7 @@ func NewCertificateOrdersClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // certificateDistinguishedName - Distinguished name to use for the certificate order. @@ -77,7 +77,7 @@ func (client *CertificateOrdersClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *CertificateOrdersClient) createOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) if err != nil { @@ -113,7 +113,7 @@ func (client *CertificateOrdersClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) @@ -121,7 +121,7 @@ func (client *CertificateOrdersClient) createOrUpdateCreateRequest(ctx context.C // BeginCreateOrUpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -142,7 +142,7 @@ func (client *CertificateOrdersClient) BeginCreateOrUpdateCertificate(ctx contex // CreateOrUpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *CertificateOrdersClient) createOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*http.Response, error) { req, err := client.createOrUpdateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) if err != nil { @@ -182,7 +182,7 @@ func (client *CertificateOrdersClient) createOrUpdateCertificateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, keyVaultCertificate) @@ -190,7 +190,7 @@ func (client *CertificateOrdersClient) createOrUpdateCertificateCreateRequest(ct // Delete - Description for Delete an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // options - CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete @@ -230,7 +230,7 @@ func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +238,7 @@ func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, // DeleteCertificate - Description for Delete the certificate associated with a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -283,7 +283,7 @@ func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,7 +291,7 @@ func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx contex // Get - Description for Get a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order.. // options - CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. @@ -330,7 +330,7 @@ func (client *CertificateOrdersClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +347,7 @@ func (client *CertificateOrdersClient) getHandleResponse(resp *http.Response) (C // GetCertificate - Description for Get the certificate associated with a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -392,7 +392,7 @@ func (client *CertificateOrdersClient) getCertificateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,8 +408,7 @@ func (client *CertificateOrdersClient) getCertificateHandleResponse(resp *http.R } // NewListPager - Description for List all certificate orders in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.List method. func (client *CertificateOrdersClient) NewListPager(options *CertificateOrdersClientListOptions) *runtime.Pager[CertificateOrdersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListResponse]{ @@ -451,7 +450,7 @@ func (client *CertificateOrdersClient) listCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -467,8 +466,7 @@ func (client *CertificateOrdersClient) listHandleResponse(resp *http.Response) ( } // NewListByResourceGroupPager - Description for Get certificate orders in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.ListByResourceGroup // method. @@ -516,7 +514,7 @@ func (client *CertificateOrdersClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -532,8 +530,7 @@ func (client *CertificateOrdersClient) listByResourceGroupHandleResponse(resp *h } // NewListCertificatesPager - Description for List all certificates associated with a certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // options - CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.ListCertificates @@ -586,7 +583,7 @@ func (client *CertificateOrdersClient) listCertificatesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -603,7 +600,7 @@ func (client *CertificateOrdersClient) listCertificatesHandleResponse(resp *http // Reissue - Description for Reissue an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // reissueCertificateOrderRequest - Parameters for the reissue. @@ -644,7 +641,7 @@ func (client *CertificateOrdersClient) reissueCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, reissueCertificateOrderRequest) @@ -652,7 +649,7 @@ func (client *CertificateOrdersClient) reissueCreateRequest(ctx context.Context, // Renew - Description for Renew an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // renewCertificateOrderRequest - Renew parameters @@ -692,7 +689,7 @@ func (client *CertificateOrdersClient) renewCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, renewCertificateOrderRequest) @@ -700,7 +697,7 @@ func (client *CertificateOrdersClient) renewCreateRequest(ctx context.Context, r // ResendEmail - Description for Resend certificate email. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // options - CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail @@ -740,7 +737,7 @@ func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -749,7 +746,7 @@ func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Cont // ResendRequestEmails - Resend domain verification ownership email containing steps on how to verify a domain for a given // certificate order // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // nameIdentifier - Email address @@ -790,7 +787,7 @@ func (client *CertificateOrdersClient) resendRequestEmailsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, nameIdentifier) @@ -798,7 +795,7 @@ func (client *CertificateOrdersClient) resendRequestEmailsCreateRequest(ctx cont // RetrieveCertificateActions - Description for Retrieve the list of certificate actions. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the certificate order. // options - CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions @@ -838,7 +835,7 @@ func (client *CertificateOrdersClient) retrieveCertificateActionsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -855,7 +852,7 @@ func (client *CertificateOrdersClient) retrieveCertificateActionsHandleResponse( // RetrieveCertificateEmailHistory - Description for Retrieve email history. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the certificate order. // options - CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory @@ -895,7 +892,7 @@ func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -918,7 +915,7 @@ func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryHandleResp // clicks on the site seal. The site seal images are expected to be static images // and hosted by the reseller, to minimize delays for customer page load times. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // siteSealRequest - Site seal request. @@ -959,7 +956,7 @@ func (client *CertificateOrdersClient) retrieveSiteSealCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSealRequest) @@ -976,7 +973,7 @@ func (client *CertificateOrdersClient) retrieveSiteSealHandleResponse(resp *http // Update - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // certificateDistinguishedName - Distinguished name to use for the certificate order. @@ -1017,7 +1014,7 @@ func (client *CertificateOrdersClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) @@ -1034,7 +1031,7 @@ func (client *CertificateOrdersClient) updateHandleResponse(resp *http.Response) // UpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -1080,7 +1077,7 @@ func (client *CertificateOrdersClient) updateCertificateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, keyVaultCertificate) @@ -1097,7 +1094,7 @@ func (client *CertificateOrdersClient) updateCertificateHandleResponse(resp *htt // ValidatePurchaseInformation - Description for Validate information for a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // appServiceCertificateOrder - Information for a certificate order. // options - CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation // method. @@ -1128,7 +1125,7 @@ func (client *CertificateOrdersClient) validatePurchaseInformationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appServiceCertificateOrder) @@ -1136,7 +1133,7 @@ func (client *CertificateOrdersClient) validatePurchaseInformationCreateRequest( // VerifyDomainOwnership - Description for Verify domain ownership for this certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // options - CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership @@ -1176,7 +1173,7 @@ func (client *CertificateOrdersClient) verifyDomainOwnershipCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go index b27294a71692..55da00b43416 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go @@ -59,7 +59,7 @@ func NewCertificateOrdersDiagnosticsClient(subscriptionID string, credential azc // GetAppServiceCertificateOrderDetectorResponse - Description for Microsoft.CertificateRegistration call to get a detector // response from App Lens. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - The certificate order name for which the response is needed. // detectorName - The detector name which needs to be run. @@ -113,7 +113,7 @@ func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderD if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -130,8 +130,7 @@ func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderD // NewListAppServiceCertificateOrderDetectorResponsePager - Description for Microsoft.CertificateRegistration to get the list // of detectors for this RP. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - The certificate order name for which the response is needed. // options - CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional @@ -184,7 +183,7 @@ func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrder return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go deleted file mode 100644 index 95880cf3850d..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go +++ /dev/null @@ -1,69 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json -func ExampleCertificateOrdersDiagnosticsClient_NewListAppServiceCertificateOrderDetectorResponsePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersDiagnosticsClient("5700fc96-77b4-4f8d-afce-c353d8c443bd", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAppServiceCertificateOrderDetectorResponsePager("Sample-WestUSResourceGroup", - "SampleCertificateOrderName", - 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/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json -func ExampleCertificateOrdersDiagnosticsClient_GetAppServiceCertificateOrderDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateOrdersDiagnosticsClient("5700fc96-77b4-4f8d-afce-c353d8c443bd", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAppServiceCertificateOrderDetectorResponse(ctx, - "Sample-WestUSResourceGroup", - "SampleCertificateOrderName", - "AutoRenewStatus", - &armappservice.CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go index 84bf66ce3c6d..b100b7acb89f 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go @@ -51,8 +51,7 @@ func NewCertificateRegistrationProviderClient(credential azcore.TokenCredential, // NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under // the resource provider -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.ListOperations // method. func (client *CertificateRegistrationProviderClient) NewListOperationsPager(options *CertificateRegistrationProviderClientListOperationsOptions) *runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse] { @@ -91,7 +90,7 @@ func (client *CertificateRegistrationProviderClient) listOperationsCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go deleted file mode 100644 index 53841d889402..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-03-01/examples/ListOperations.json -func ExampleCertificateRegistrationProviderClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificateRegistrationProviderClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(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/appservice/armappservice/certificates_client.go b/sdk/resourcemanager/appservice/armappservice/certificates_client.go index e9623de7aa49..d0e04bea3723 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificates_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificates_client.go @@ -57,7 +57,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Description for Create or update a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the certificate. // certificateEnvelope - Details of certificate, if it exists already. @@ -98,7 +98,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateEnvelope) @@ -115,7 +115,7 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Description for Delete a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the certificate. // options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. @@ -154,7 +154,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -162,7 +162,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Description for Get a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the certificate. // options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. @@ -201,7 +201,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,8 +217,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif } // NewListPager - Description for Get all certificates for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. func (client *CertificatesClient) NewListPager(options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ @@ -260,7 +259,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -281,8 +280,7 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi } // NewListByResourceGroupPager - Description for Get all certificates in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.ListByResourceGroup // method. @@ -330,7 +328,7 @@ func (client *CertificatesClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +345,7 @@ func (client *CertificatesClient) listByResourceGroupHandleResponse(resp *http.R // Update - Description for Create or update a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the certificate. // certificateEnvelope - Details of certificate, if it exists already. @@ -387,7 +385,7 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go deleted file mode 100644 index 893c875f47d2..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go +++ /dev/null @@ -1,166 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListCertificates.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 := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(&armappservice.CertificatesClientListOptions{Filter: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListCertificatesByResourceGroup.json -func ExampleCertificatesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testrg123", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetCertificate.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 := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "testc6282", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateCertificate.json -func ExampleCertificatesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "testrg123", - "testc6282", - armappservice.AppCertificate{ - Location: to.Ptr("East US"), - Properties: &armappservice.AppCertificateProperties{ - HostNames: []*string{ - to.Ptr("ServerCert")}, - Password: to.Ptr(""), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteCertificate.json -func ExampleCertificatesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "testc6282", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/PatchCertificate.json -func ExampleCertificatesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "testrg123", - "testc6282", - armappservice.AppCertificatePatchResource{ - Properties: &armappservice.AppCertificatePatchResourceProperties{ - Password: to.Ptr(""), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/constants.go b/sdk/resourcemanager/appservice/armappservice/constants.go index 5e8bbec5a887..9e35862aaf52 100644 --- a/sdk/resourcemanager/appservice/armappservice/constants.go +++ b/sdk/resourcemanager/appservice/armappservice/constants.go @@ -11,7 +11,7 @@ package armappservice const ( moduleName = "armappservice" - moduleVersion = "v2.0.0" + moduleVersion = "v3.0.0" ) // ActiveRevisionsMode - ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple @@ -56,6 +56,45 @@ func PossibleAppServicePlanRestrictionsValues() []AppServicePlanRestrictions { } } +// AuthType - Auth Type +type AuthType string + +const ( + AuthTypeAnonymous AuthType = "Anonymous" + AuthTypeUserCredentials AuthType = "UserCredentials" + AuthTypeSystemIdentity AuthType = "SystemIdentity" + AuthTypeUserAssigned AuthType = "UserAssigned" +) + +// PossibleAuthTypeValues returns the possible values for the AuthType const type. +func PossibleAuthTypeValues() []AuthType { + return []AuthType{ + AuthTypeAnonymous, + AuthTypeUserCredentials, + AuthTypeSystemIdentity, + AuthTypeUserAssigned, + } +} + +// AuthenticationType - Property to select authentication type to access the selected storage account. Available options: +// SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. +type AuthenticationType string + +const ( + AuthenticationTypeStorageAccountConnectionString AuthenticationType = "StorageAccountConnectionString" + AuthenticationTypeSystemAssignedIdentity AuthenticationType = "SystemAssignedIdentity" + AuthenticationTypeUserAssignedIdentity AuthenticationType = "UserAssignedIdentity" +) + +// PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type. +func PossibleAuthenticationTypeValues() []AuthenticationType { + return []AuthenticationType{ + AuthenticationTypeStorageAccountConnectionString, + AuthenticationTypeSystemAssignedIdentity, + AuthenticationTypeUserAssignedIdentity, + } +} + // AutoHealActionType - Predefined action to be taken. type AutoHealActionType string @@ -90,6 +129,24 @@ func PossibleAzureResourceTypeValues() []AzureResourceType { } } +// AzureStorageProtocol - Mounting protocol to use for the storage account. +type AzureStorageProtocol string + +const ( + AzureStorageProtocolHTTP AzureStorageProtocol = "Http" + AzureStorageProtocolNfs AzureStorageProtocol = "Nfs" + AzureStorageProtocolSmb AzureStorageProtocol = "Smb" +) + +// PossibleAzureStorageProtocolValues returns the possible values for the AzureStorageProtocol const type. +func PossibleAzureStorageProtocolValues() []AzureStorageProtocol { + return []AzureStorageProtocol{ + AzureStorageProtocolHTTP, + AzureStorageProtocolNfs, + AzureStorageProtocolSmb, + } +} + // AzureStorageState - State of the storage account. type AzureStorageState string @@ -180,6 +237,19 @@ func PossibleBackupRestoreOperationTypeValues() []BackupRestoreOperationType { } } +type BasicAuthName string + +const ( + BasicAuthNameDefault BasicAuthName = "default" +) + +// PossibleBasicAuthNameValues returns the possible values for the BasicAuthName const type. +func PossibleBasicAuthNameValues() []BasicAuthName { + return []BasicAuthName{ + BasicAuthNameDefault, + } +} + // BuildStatus - The status of the static site build. type BuildStatus string @@ -614,6 +684,26 @@ func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { } } +// DaprLogLevel - Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. +type DaprLogLevel string + +const ( + DaprLogLevelDebug DaprLogLevel = "debug" + DaprLogLevelError DaprLogLevel = "error" + DaprLogLevelInfo DaprLogLevel = "info" + DaprLogLevelWarn DaprLogLevel = "warn" +) + +// PossibleDaprLogLevelValues returns the possible values for the DaprLogLevel const type. +func PossibleDaprLogLevelValues() []DaprLogLevel { + return []DaprLogLevel{ + DaprLogLevelDebug, + DaprLogLevelError, + DaprLogLevelInfo, + DaprLogLevelWarn, + } +} + // DatabaseType - Database type (e.g. SqlAzure / MySql). type DatabaseType string @@ -685,6 +775,22 @@ func PossibleDaysOfWeekValues() []DaysOfWeek { } } +// DefaultAction - Default action for main access restriction if no rules are matched. +type DefaultAction string + +const ( + DefaultActionAllow DefaultAction = "Allow" + DefaultActionDeny DefaultAction = "Deny" +) + +// PossibleDefaultActionValues returns the possible values for the DefaultAction const type. +func PossibleDefaultActionValues() []DefaultAction { + return []DefaultAction{ + DefaultActionAllow, + DefaultActionDeny, + } +} + // DeploymentBuildStatus - Deployment build status. type DeploymentBuildStatus string @@ -1712,6 +1818,30 @@ func PossibleRouteTypeValues() []RouteType { } } +// RuntimeName - Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom +type RuntimeName string + +const ( + RuntimeNameCustom RuntimeName = "custom" + RuntimeNameDotnetIsolated RuntimeName = "dotnet-isolated" + RuntimeNameJava RuntimeName = "java" + RuntimeNameNode RuntimeName = "node" + RuntimeNamePowershell RuntimeName = "powershell" + RuntimeNamePython RuntimeName = "python" +) + +// PossibleRuntimeNameValues returns the possible values for the RuntimeName const type. +func PossibleRuntimeNameValues() []RuntimeName { + return []RuntimeName{ + RuntimeNameCustom, + RuntimeNameDotnetIsolated, + RuntimeNameJava, + RuntimeNameNode, + RuntimeNamePowershell, + RuntimeNamePython, + } +} + type SKUName string const ( @@ -1719,6 +1849,7 @@ const ( SKUNameDynamic SKUName = "Dynamic" SKUNameElasticIsolated SKUName = "ElasticIsolated" SKUNameElasticPremium SKUName = "ElasticPremium" + SKUNameFlexConsumption SKUName = "FlexConsumption" SKUNameFree SKUName = "Free" SKUNameIsolated SKUName = "Isolated" SKUNameIsolatedV2 SKUName = "IsolatedV2" @@ -1737,6 +1868,7 @@ func PossibleSKUNameValues() []SKUName { SKUNameDynamic, SKUNameElasticIsolated, SKUNameElasticPremium, + SKUNameFlexConsumption, SKUNameFree, SKUNameIsolated, SKUNameIsolatedV2, @@ -1950,9 +2082,11 @@ func PossibleStatusOptionsValues() []StatusOptions { } } +// StorageType - Property to select Azure Storage type. Available options: blobContainer. type StorageType string const ( + StorageTypeBlobContainer StorageType = "blobContainer" StorageTypeLocalNode StorageType = "LocalNode" StorageTypeNetworkFileSystem StorageType = "NetworkFileSystem" ) @@ -1960,6 +2094,7 @@ const ( // PossibleStorageTypeValues returns the possible values for the StorageType const type. func PossibleStorageTypeValues() []StorageType { return []StorageType{ + StorageTypeBlobContainer, StorageTypeLocalNode, StorageTypeNetworkFileSystem, } @@ -1972,6 +2107,7 @@ const ( SupportedTLSVersionsOne0 SupportedTLSVersions = "1.0" SupportedTLSVersionsOne1 SupportedTLSVersions = "1.1" SupportedTLSVersionsOne2 SupportedTLSVersions = "1.2" + SupportedTLSVersionsOne3 SupportedTLSVersions = "1.3" ) // PossibleSupportedTLSVersionsValues returns the possible values for the SupportedTLSVersions const type. @@ -1980,6 +2116,53 @@ func PossibleSupportedTLSVersionsValues() []SupportedTLSVersions { SupportedTLSVersionsOne0, SupportedTLSVersionsOne1, SupportedTLSVersionsOne2, + SupportedTLSVersionsOne3, + } +} + +// TLSCipherSuites - The minimum strength TLS cipher suite allowed for an application +type TLSCipherSuites string + +const ( + TLSCipherSuitesTLSAES128GCMSHA256 TLSCipherSuites = "TLS_AES_128_GCM_SHA256" + TLSCipherSuitesTLSAES256GCMSHA384 TLSCipherSuites = "TLS_AES_256_GCM_SHA384" + TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + TLSCipherSuitesTLSRSAWITHAES128CBCSHA TLSCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" + TLSCipherSuitesTLSRSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSRSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSRSAWITHAES256CBCSHA TLSCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" + TLSCipherSuitesTLSRSAWITHAES256CBCSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TLSCipherSuitesTLSRSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// PossibleTLSCipherSuitesValues returns the possible values for the TLSCipherSuites const type. +func PossibleTLSCipherSuitesValues() []TLSCipherSuites { + return []TLSCipherSuites{ + TLSCipherSuitesTLSAES128GCMSHA256, + TLSCipherSuitesTLSAES256GCMSHA384, + TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384, + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA, + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA, + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384, + TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384, + TLSCipherSuitesTLSRSAWITHAES128CBCSHA, + TLSCipherSuitesTLSRSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSRSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSRSAWITHAES256CBCSHA, + TLSCipherSuitesTLSRSAWITHAES256CBCSHA256, + TLSCipherSuitesTLSRSAWITHAES256GCMSHA384, } } @@ -2184,6 +2367,26 @@ func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { } } +// WorkflowHealthState - Gets or sets the workflow health state. +type WorkflowHealthState string + +const ( + WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" + WorkflowHealthStateHealthy WorkflowHealthState = "Healthy" + WorkflowHealthStateUnhealthy WorkflowHealthState = "Unhealthy" + WorkflowHealthStateUnknown WorkflowHealthState = "Unknown" +) + +// PossibleWorkflowHealthStateValues returns the possible values for the WorkflowHealthState const type. +func PossibleWorkflowHealthStateValues() []WorkflowHealthState { + return []WorkflowHealthState{ + WorkflowHealthStateNotSpecified, + WorkflowHealthStateHealthy, + WorkflowHealthStateUnhealthy, + WorkflowHealthStateUnknown, + } +} + // WorkflowProvisioningState - The workflow provisioning state. type WorkflowProvisioningState string diff --git a/sdk/resourcemanager/appservice/armappservice/containerapps_client.go b/sdk/resourcemanager/appservice/armappservice/containerapps_client.go index 6474a87afa89..5b43a102ae29 100644 --- a/sdk/resourcemanager/appservice/armappservice/containerapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/containerapps_client.go @@ -57,7 +57,7 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Description for Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Container App. // options - ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate @@ -76,7 +76,7 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Description for Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, containerAppEnvelope, options) if err != nil { @@ -112,7 +112,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerAppEnvelope) @@ -120,7 +120,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Description for Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Container App. // options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete @@ -139,7 +139,7 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Description for Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -175,7 +175,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Container App. // options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. @@ -222,7 +222,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,8 +238,7 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta } // NewListByResourceGroupPager - Get the Container Apps in a given resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.ListByResourceGroup // method. @@ -287,7 +286,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,8 +302,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. } // NewListBySubscriptionPager - Get the Container Apps in a given subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.ListBySubscription // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -347,7 +345,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -364,7 +362,7 @@ func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.R // ListSecrets - List secrets for a container app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // name - Name of the Container App. // options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets // method. @@ -399,7 +397,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go deleted file mode 100644 index f5feff159206..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go +++ /dev/null @@ -1,198 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListContainerAppsBySubscription.json -func ExampleContainerAppsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListContainerAppsByResourceGroup.json -func ExampleContainerAppsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetContainerApp.json -func ExampleContainerAppsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg", - "testcontainerApp0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateContainerApp.json -func ExampleContainerAppsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg", - "testcontainerApp0", - armappservice.ContainerApp{ - Kind: to.Ptr("containerApp"), - Location: to.Ptr("East US"), - Properties: &armappservice.ContainerAppProperties{ - Configuration: &armappservice.Configuration{ - Ingress: &armappservice.Ingress{ - External: to.Ptr(true), - TargetPort: to.Ptr[int32](3000), - }, - }, - KubeEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube"), - Template: &armappservice.Template{ - Containers: []*armappservice.Container{ - { - Name: to.Ptr("testcontainerApp0"), - Image: to.Ptr("repo/testcontainerApp0:v1"), - }}, - Dapr: &armappservice.Dapr{ - AppPort: to.Ptr[int32](3000), - Enabled: to.Ptr(true), - }, - Scale: &armappservice.Scale{ - MaxReplicas: to.Ptr[int32](5), - MinReplicas: to.Ptr[int32](1), - Rules: []*armappservice.ScaleRule{ - { - Name: to.Ptr("httpscalingrule"), - Custom: &armappservice.CustomScaleRule{ - Type: to.Ptr("http"), - Metadata: map[string]*string{ - "concurrentRequests": to.Ptr("50"), - }, - }, - }}, - }, - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteContainerApp.json -func ExampleContainerAppsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg", - "testWorkerApp0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListContainerAppSecrets.json -func ExampleContainerAppsClient_ListSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSecrets(ctx, - "testcontainerApp0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go index f1ee042148b8..af1240015896 100644 --- a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go @@ -57,7 +57,7 @@ func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.To // ActivateRevision - Activates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // containerAppName - Name of the Container App. // name - Name of the Container App Revision to activate @@ -102,7 +102,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,7 +110,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co // DeactivateRevision - Deactivates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // containerAppName - Name of the Container App. // name - Name of the Container App Revision to deactivate @@ -155,7 +155,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -163,7 +163,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // containerAppName - Name of the Container App. // name - Name of the Container App Revision. @@ -208,7 +208,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -224,8 +224,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http } // NewListRevisionsPager - Get the Revisions for a given Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // containerAppName - Name of the Container App for which Revisions are needed. // options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.ListRevisions @@ -278,7 +277,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,7 +294,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *ht // RestartRevision - Restarts a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // containerAppName - Name of the Container App. // name - Name of the Container App Revision to restart @@ -340,7 +339,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go deleted file mode 100644 index 8b4176f31498..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go +++ /dev/null @@ -1,129 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListRevisions.json -func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListRevisionsPager("rg", - "testcontainerApp0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetRevision.json -func ExampleContainerAppsRevisionsClient_GetRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetRevision(ctx, - "rg", - "testcontainerApp0", - "testcontainerApp0-pjxhsye", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ActivateRevision.json -func ExampleContainerAppsRevisionsClient_ActivateRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.ActivateRevision(ctx, - "rg", - "testcontainerApp0", - "testcontainerApp0-pjxhsye", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeactivateRevision.json -func ExampleContainerAppsRevisionsClient_DeactivateRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DeactivateRevision(ctx, - "rg", - "testcontainerApp0", - "testcontainerApp0-pjxhsye", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/RestartRevision.json -func ExampleContainerAppsRevisionsClient_RestartRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.RestartRevision(ctx, - "rg", - "testStaticSite0", - "testcontainerApp0-pjxhsye", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go index ae12a542b18a..b17dc14db567 100644 --- a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go @@ -57,7 +57,7 @@ func NewDeletedWebAppsClient(subscriptionID string, credential azcore.TokenCrede // GetDeletedWebAppByLocation - Description for Get deleted app for a subscription at location. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // options - DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation // method. @@ -96,7 +96,7 @@ func (client *DeletedWebAppsClient) getDeletedWebAppByLocationCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,8 +112,7 @@ func (client *DeletedWebAppsClient) getDeletedWebAppByLocationHandleResponse(res } // NewListPager - Description for Get all deleted apps for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.List method. func (client *DeletedWebAppsClient) NewListPager(options *DeletedWebAppsClientListOptions) *runtime.Pager[DeletedWebAppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListResponse]{ @@ -155,7 +154,7 @@ func (client *DeletedWebAppsClient) listCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,8 +170,7 @@ func (client *DeletedWebAppsClient) listHandleResponse(resp *http.Response) (Del } // NewListByLocationPager - Description for Get all deleted apps for a subscription at location -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.ListByLocation // method. func (client *DeletedWebAppsClient) NewListByLocationPager(location string, options *DeletedWebAppsClientListByLocationOptions) *runtime.Pager[DeletedWebAppsClientListByLocationResponse] { @@ -219,7 +217,7 @@ func (client *DeletedWebAppsClient) listByLocationCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go deleted file mode 100644 index b70c549af40c..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go +++ /dev/null @@ -1,64 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListDeletedWebAppsByLocation.json -func ExampleDeletedWebAppsClient_NewListByLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDeletedWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByLocationPager("West US 2", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetDeletedWebAppByLocation.json -func ExampleDeletedWebAppsClient_GetDeletedWebAppByLocation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDeletedWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDeletedWebAppByLocation(ctx, - "West US 2", - "9", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go b/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go index 2dec58fc86a4..f3d9626b60f1 100644 --- a/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go +++ b/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go @@ -58,7 +58,7 @@ func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredenti // ExecuteSiteAnalysis - Description for Execute Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Category Name @@ -117,7 +117,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisCreateRequest(ctx context.Co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -134,7 +134,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisHandleResponse(resp *http.Re // ExecuteSiteAnalysisSlot - Description for Execute Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Category Name @@ -198,7 +198,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,7 +215,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotHandleResponse(resp *htt // ExecuteSiteDetector - Description for Execute Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -274,7 +274,7 @@ func (client *DiagnosticsClient) executeSiteDetectorCreateRequest(ctx context.Co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,7 +291,7 @@ func (client *DiagnosticsClient) executeSiteDetectorHandleResponse(resp *http.Re // ExecuteSiteDetectorSlot - Description for Execute Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -355,7 +355,7 @@ func (client *DiagnosticsClient) executeSiteDetectorSlotCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -372,7 +372,7 @@ func (client *DiagnosticsClient) executeSiteDetectorSlotHandleResponse(resp *htt // GetHostingEnvironmentDetectorResponse - Description for Get Hosting Environment Detector Response // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - App Service Environment Name // detectorName - Detector Resource Name @@ -426,7 +426,7 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseCreateRequ if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -443,7 +443,7 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseHandleResp // GetSiteAnalysis - Description for Get Site Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -493,7 +493,7 @@ func (client *DiagnosticsClient) getSiteAnalysisCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -510,7 +510,7 @@ func (client *DiagnosticsClient) getSiteAnalysisHandleResponse(resp *http.Respon // GetSiteAnalysisSlot - Description for Get Site Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -565,7 +565,7 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -582,7 +582,7 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotHandleResponse(resp *http.Re // GetSiteDetector - Description for Get Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -632,7 +632,7 @@ func (client *DiagnosticsClient) getSiteDetectorCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -649,7 +649,7 @@ func (client *DiagnosticsClient) getSiteDetectorHandleResponse(resp *http.Respon // GetSiteDetectorResponse - Description for Get site detector response // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -703,7 +703,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -720,7 +720,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseHandleResponse(resp *htt // GetSiteDetectorResponseSlot - Description for Get site detector response // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -779,7 +779,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotCreateRequest(ctx co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -796,7 +796,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotHandleResponse(resp // GetSiteDetectorSlot - Description for Get Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -851,7 +851,7 @@ func (client *DiagnosticsClient) getSiteDetectorSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -868,7 +868,7 @@ func (client *DiagnosticsClient) getSiteDetectorSlotHandleResponse(resp *http.Re // GetSiteDiagnosticCategory - Description for Get Diagnostics Category // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -913,7 +913,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -930,7 +930,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryHandleResponse(resp *h // GetSiteDiagnosticCategorySlot - Description for Get Diagnostics Category // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -980,7 +980,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -996,8 +996,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotHandleResponse(res } // NewListHostingEnvironmentDetectorResponsesPager - Description for List Hosting Environment Detector Responses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site Name // options - DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListHostingEnvironmentDetectorResponses @@ -1050,7 +1049,7 @@ func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1066,8 +1065,7 @@ func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesHandleRe } // NewListSiteAnalysesPager - Description for Get Site Analyses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1125,7 +1123,7 @@ func (client *DiagnosticsClient) listSiteAnalysesCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1141,8 +1139,7 @@ func (client *DiagnosticsClient) listSiteAnalysesHandleResponse(resp *http.Respo } // NewListSiteAnalysesSlotPager - Description for Get Site Analyses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1205,7 +1202,7 @@ func (client *DiagnosticsClient) listSiteAnalysesSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1221,8 +1218,7 @@ func (client *DiagnosticsClient) listSiteAnalysesSlotHandleResponse(resp *http.R } // NewListSiteDetectorResponsesPager - Description for List Site Detector Responses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // options - DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorResponses @@ -1275,7 +1271,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1291,8 +1287,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesHandleResponse(resp *h } // NewListSiteDetectorResponsesSlotPager - Description for List Site Detector Responses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // slot - Slot Name @@ -1350,7 +1345,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1366,8 +1361,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesSlotHandleResponse(res } // NewListSiteDetectorsPager - Description for Get Detectors -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1425,7 +1419,7 @@ func (client *DiagnosticsClient) listSiteDetectorsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1441,8 +1435,7 @@ func (client *DiagnosticsClient) listSiteDetectorsHandleResponse(resp *http.Resp } // NewListSiteDetectorsSlotPager - Description for Get Detectors -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1505,7 +1498,7 @@ func (client *DiagnosticsClient) listSiteDetectorsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1521,8 +1514,7 @@ func (client *DiagnosticsClient) listSiteDetectorsSlotHandleResponse(resp *http. } // NewListSiteDiagnosticCategoriesPager - Description for Get Diagnostics Categories -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // options - DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDiagnosticCategories @@ -1575,7 +1567,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1591,8 +1583,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesHandleResponse(resp } // NewListSiteDiagnosticCategoriesSlotPager - Description for Get Diagnostics Categories -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // slot - Slot Name @@ -1650,7 +1641,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go deleted file mode 100644 index 830e34bca639..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go +++ /dev/null @@ -1,593 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json -func ExampleDiagnosticsClient_NewListHostingEnvironmentDetectorResponsesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListHostingEnvironmentDetectorResponsesPager("Sample-WestUSResourceGroup", - "SampleAppServiceEnvironment", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json -func ExampleDiagnosticsClient_GetHostingEnvironmentDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetHostingEnvironmentDetectorResponse(ctx, - "Sample-WestUSResourceGroup", - "SampleAppServiceEnvironment", - "runtimeavailability", - &armappservice.DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteDetectorResponses.json -func ExampleDiagnosticsClient_NewListSiteDetectorResponsesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorResponsesPager("Sample-WestUSResourceGroup", - "SampleApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteDetectorResponse.json -func ExampleDiagnosticsClient_GetSiteDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetectorResponse(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "runtimeavailability", - &armappservice.DiagnosticsClientGetSiteDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json -func ExampleDiagnosticsClient_NewListSiteDiagnosticCategoriesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDiagnosticCategoriesPager("Sample-WestUSResourceGroup", - "SampleApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json -func ExampleDiagnosticsClient_GetSiteDiagnosticCategory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDiagnosticCategory(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteAnalyses.json -func ExampleDiagnosticsClient_NewListSiteAnalysesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteAnalysesPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteAnalysis.json -func ExampleDiagnosticsClient_GetSiteAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteAnalysis(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "appanalysis", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json -func ExampleDiagnosticsClient_ExecuteSiteAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExecuteSiteAnalysis(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "apprestartanalyses", - &armappservice.DiagnosticsClientExecuteSiteAnalysisOptions{StartTime: nil, - EndTime: nil, - TimeGrain: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteDetectors.json -func ExampleDiagnosticsClient_NewListSiteDetectorsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorsPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteDetector.json -func ExampleDiagnosticsClient_GetSiteDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetector(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "sitecrashes", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ExecuteSiteDetector.json -func ExampleDiagnosticsClient_ExecuteSiteDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExecuteSiteDetector(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "sitecrashes", - "availability", - &armappservice.DiagnosticsClientExecuteSiteDetectorOptions{StartTime: nil, - EndTime: nil, - TimeGrain: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteDetectorResponses.json -func ExampleDiagnosticsClient_NewListSiteDetectorResponsesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorResponsesSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "staging", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteDetectorResponse.json -func ExampleDiagnosticsClient_GetSiteDetectorResponseSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetectorResponseSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "runtimeavailability", - "staging", - &armappservice.DiagnosticsClientGetSiteDetectorResponseSlotOptions{StartTime: nil, - EndTime: nil, - TimeGrain: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json -func ExampleDiagnosticsClient_NewListSiteDiagnosticCategoriesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDiagnosticCategoriesSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json -func ExampleDiagnosticsClient_GetSiteDiagnosticCategorySlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDiagnosticCategorySlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteAnalyses.json -func ExampleDiagnosticsClient_NewListSiteAnalysesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteAnalysesSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteAnalysis.json -func ExampleDiagnosticsClient_GetSiteAnalysisSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteAnalysisSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "appanalysis", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json -func ExampleDiagnosticsClient_ExecuteSiteAnalysisSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExecuteSiteAnalysisSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "apprestartanalyses", - "Production", - &armappservice.DiagnosticsClientExecuteSiteAnalysisSlotOptions{StartTime: nil, - EndTime: nil, - TimeGrain: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ListSiteDetectors.json -func ExampleDiagnosticsClient_NewListSiteDetectorsSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorsSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_GetSiteDetector.json -func ExampleDiagnosticsClient_GetSiteDetectorSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetectorSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "sitecrashes", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Diagnostics_ExecuteSiteDetector.json -func ExampleDiagnosticsClient_ExecuteSiteDetectorSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExecuteSiteDetectorSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "sitecrashes", - "availability", - "Production", - &armappservice.DiagnosticsClientExecuteSiteDetectorSlotOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go index 432aa11b8f07..5dc958dc31cd 100644 --- a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go @@ -51,8 +51,7 @@ func NewDomainRegistrationProviderClient(credential azcore.TokenCredential, opti // NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under // the resource provider -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.ListOperations // method. func (client *DomainRegistrationProviderClient) NewListOperationsPager(options *DomainRegistrationProviderClientListOperationsOptions) *runtime.Pager[DomainRegistrationProviderClientListOperationsResponse] { @@ -91,7 +90,7 @@ func (client *DomainRegistrationProviderClient) listOperationsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go deleted file mode 100644 index ab17a2fac6c2..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListOperations.json -func ExampleDomainRegistrationProviderClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainRegistrationProviderClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(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/appservice/armappservice/domains_client.go b/sdk/resourcemanager/appservice/armappservice/domains_client.go index 47058fee9013..cd9cf803f838 100644 --- a/sdk/resourcemanager/appservice/armappservice/domains_client.go +++ b/sdk/resourcemanager/appservice/armappservice/domains_client.go @@ -58,7 +58,7 @@ func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, // CheckAvailability - Description for Check if a domain is available for registration. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // identifier - Name of the domain. // options - DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability // method. @@ -89,7 +89,7 @@ func (client *DomainsClient) checkAvailabilityCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, identifier) @@ -106,7 +106,7 @@ func (client *DomainsClient) checkAvailabilityHandleResponse(resp *http.Response // BeginCreateOrUpdate - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // domain - Domain registration information. @@ -126,7 +126,7 @@ func (client *DomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // CreateOrUpdate - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *DomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, domainName, domain, options) if err != nil { @@ -162,7 +162,7 @@ func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domain) @@ -171,7 +171,7 @@ func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, re // CreateOrUpdateOwnershipIdentifier - Description for Creates an ownership identifier for a domain or updates identifier // details for an existing identifier // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -217,7 +217,7 @@ func (client *DomainsClient) createOrUpdateOwnershipIdentifierCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -234,7 +234,7 @@ func (client *DomainsClient) createOrUpdateOwnershipIdentifierHandleResponse(res // Delete - Description for Delete a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // options - DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. @@ -276,7 +276,7 @@ func (client *DomainsClient) deleteCreateRequest(ctx context.Context, resourceGr if options != nil && options.ForceHardDeleteDomain != nil { reqQP.Set("forceHardDeleteDomain", strconv.FormatBool(*options.ForceHardDeleteDomain)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +284,7 @@ func (client *DomainsClient) deleteCreateRequest(ctx context.Context, resourceGr // DeleteOwnershipIdentifier - Description for Delete ownership identifier for domain // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -329,7 +329,7 @@ func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -337,7 +337,7 @@ func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context. // Get - Description for Get a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // options - DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. @@ -376,7 +376,7 @@ func (client *DomainsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -393,7 +393,7 @@ func (client *DomainsClient) getHandleResponse(resp *http.Response) (DomainsClie // GetControlCenterSsoRequest - Description for Generate a single sign-on request for the domain management portal. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest // method. func (client *DomainsClient) GetControlCenterSsoRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (DomainsClientGetControlCenterSsoRequestResponse, error) { @@ -423,7 +423,7 @@ func (client *DomainsClient) getControlCenterSsoRequestCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -440,7 +440,7 @@ func (client *DomainsClient) getControlCenterSsoRequestHandleResponse(resp *http // GetOwnershipIdentifier - Description for Get ownership identifier for domain // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -485,7 +485,7 @@ func (client *DomainsClient) getOwnershipIdentifierCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -501,8 +501,7 @@ func (client *DomainsClient) getOwnershipIdentifierHandleResponse(resp *http.Res } // NewListPager - Description for Get all domains in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - DomainsClientListOptions contains the optional parameters for the DomainsClient.List method. func (client *DomainsClient) NewListPager(options *DomainsClientListOptions) *runtime.Pager[DomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DomainsClientListResponse]{ @@ -544,7 +543,7 @@ func (client *DomainsClient) listCreateRequest(ctx context.Context, options *Dom return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -560,8 +559,7 @@ func (client *DomainsClient) listHandleResponse(resp *http.Response) (DomainsCli } // NewListByResourceGroupPager - Description for Get all domains in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.ListByResourceGroup // method. @@ -609,7 +607,7 @@ func (client *DomainsClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -625,8 +623,7 @@ func (client *DomainsClient) listByResourceGroupHandleResponse(resp *http.Respon } // NewListOwnershipIdentifiersPager - Description for Lists domain ownership identifiers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // options - DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.ListOwnershipIdentifiers @@ -679,7 +676,7 @@ func (client *DomainsClient) listOwnershipIdentifiersCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -695,8 +692,7 @@ func (client *DomainsClient) listOwnershipIdentifiersHandleResponse(resp *http.R } // NewListRecommendationsPager - Description for Get domain name recommendations based on keywords. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // parameters - Search parameters for domain name recommendations. // options - DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.ListRecommendations // method. @@ -740,7 +736,7 @@ func (client *DomainsClient) listRecommendationsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -757,7 +753,7 @@ func (client *DomainsClient) listRecommendationsHandleResponse(resp *http.Respon // Renew - Description for Renew a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // options - DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. @@ -796,7 +792,7 @@ func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -804,7 +800,7 @@ func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGro // TransferOut - Transfer out domain to another registrar // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // options - DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. @@ -843,7 +839,7 @@ func (client *DomainsClient) transferOutCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -860,7 +856,7 @@ func (client *DomainsClient) transferOutHandleResponse(resp *http.Response) (Dom // Update - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // domain - Domain registration information. @@ -900,7 +896,7 @@ func (client *DomainsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domain) @@ -918,7 +914,7 @@ func (client *DomainsClient) updateHandleResponse(resp *http.Response) (DomainsC // UpdateOwnershipIdentifier - Description for Creates an ownership identifier for a domain or updates identifier details // for an existing identifier // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -964,7 +960,7 @@ func (client *DomainsClient) updateOwnershipIdentifierCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) diff --git a/sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go deleted file mode 100644 index 6e540d691032..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go +++ /dev/null @@ -1,564 +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 armappservice_test - -import ( - "context" - "log" - - "time" - - "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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/CheckDomainAvailability.json -func ExampleDomainsClient_CheckAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckAvailability(ctx, - armappservice.NameIdentifier{ - Name: to.Ptr("abcd.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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListDomainsBySubscription.json -func ExampleDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/GetDomainControlCenterSsoRequest.json -func ExampleDomainsClient_GetControlCenterSsoRequest() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetControlCenterSsoRequest(ctx, - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListDomainRecommendations.json -func ExampleDomainsClient_NewListRecommendationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListRecommendationsPager(armappservice.DomainRecommendationSearchParameters{ - Keywords: to.Ptr("example1"), - MaxDomainRecommendations: to.Ptr[int32](10), - }, - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListDomainsByResourceGroup.json -func ExampleDomainsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testrg123", - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/GetDomain.json -func ExampleDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "example.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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/CreateAppServiceDomain.json -func ExampleDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testrg123", - "example.com", - armappservice.Domain{ - Location: to.Ptr("global"), - Tags: map[string]*string{}, - Properties: &armappservice.DomainProperties{ - AuthCode: to.Ptr("exampleAuthCode"), - AutoRenew: to.Ptr(true), - Consent: &armappservice.DomainPurchaseConsent{ - AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t }()), - AgreedBy: to.Ptr("192.0.2.1"), - AgreementKeys: []*string{ - to.Ptr("agreementKey1")}, - }, - ContactAdmin: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("admin@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Admin"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactBilling: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("billing@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Billing"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactRegistrant: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("registrant@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Registrant"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactTech: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("tech@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Tech"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - Privacy: to.Ptr(false), - }, - }, - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/DeleteAppServiceDomain.json -func ExampleDomainsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "example.com", - &armappservice.DomainsClientDeleteOptions{ForceHardDeleteDomain: to.Ptr(true)}) - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/UpdateAppServiceDomain.json -func ExampleDomainsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "testrg123", - "example.com", - armappservice.DomainPatchResource{ - Properties: &armappservice.DomainPatchResourceProperties{ - AuthCode: to.Ptr("exampleAuthCode"), - AutoRenew: to.Ptr(true), - Consent: &armappservice.DomainPurchaseConsent{ - AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t }()), - AgreedBy: to.Ptr("192.0.2.1"), - AgreementKeys: []*string{ - to.Ptr("agreementKey1")}, - }, - ContactAdmin: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("admin@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Admin"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactBilling: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("billing@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Billing"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactRegistrant: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("registrant@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Registrant"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactTech: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("tech@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Tech"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - Privacy: to.Ptr(false), - }, - }, - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListDomainOwnershipIdentifiers.json -func ExampleDomainsClient_NewListOwnershipIdentifiersPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOwnershipIdentifiersPager("testrg123", - "example.com", - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/GetDomainOwnershipIdentifier.json -func ExampleDomainsClient_GetOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetOwnershipIdentifier(ctx, - "testrg123", - "example.com", - "SampleOwnershipId", - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/CreateAppServiceDomainOwnershipIdentifier.json -func ExampleDomainsClient_CreateOrUpdateOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateOwnershipIdentifier(ctx, - "testrg123", - "example.com", - "SampleOwnershipId", - armappservice.DomainOwnershipIdentifier{ - Properties: &armappservice.DomainOwnershipIdentifierProperties{ - OwnershipID: to.Ptr("SampleOwnershipId"), - }, - }, - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/DeleteAppServiceDomainOwnershipIdentifier.json -func ExampleDomainsClient_DeleteOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DeleteOwnershipIdentifier(ctx, - "testrg123", - "example.com", - "ownershipIdentifier", - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/UpdateAppServiceDomainOwnershipIdentifier.json -func ExampleDomainsClient_UpdateOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateOwnershipIdentifier(ctx, - "testrg123", - "example.com", - "SampleOwnershipId", - armappservice.DomainOwnershipIdentifier{ - Properties: &armappservice.DomainOwnershipIdentifierProperties{ - OwnershipID: to.Ptr("SampleOwnershipId"), - }, - }, - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/RenewDomain.json -func ExampleDomainsClient_Renew() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("3dddfa4f-cedf-4dc0-ba29-b6d1a69ab545", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Renew(ctx, - "RG", - "example.com", - 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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/TransferOutDomain.json -func ExampleDomainsClient_TransferOut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.TransferOut(ctx, - "testrg123", - "example.com", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/environments_client.go b/sdk/resourcemanager/appservice/armappservice/environments_client.go index bb86d287cf3d..564cfc020a34 100644 --- a/sdk/resourcemanager/appservice/armappservice/environments_client.go +++ b/sdk/resourcemanager/appservice/armappservice/environments_client.go @@ -58,12 +58,12 @@ func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredent // BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the // EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection method. -func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { +func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { @@ -77,8 +77,8 @@ func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection( // ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { +// Generated from API version 2023-12-01 +func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { return nil, err @@ -94,7 +94,7 @@ func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx c } // approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. -func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { +func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -117,15 +117,14 @@ func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) } // BeginChangeVnet - Description for Move an App Service Environment to a different VNET. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // vnetInfo - Details for the new virtual network. @@ -167,8 +166,7 @@ func (client *EnvironmentsClient) BeginChangeVnet(ctx context.Context, resourceG } // ChangeVnet - Description for Move an App Service Environment to a different VNET. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) changeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*http.Response, error) { req, err := client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) if err != nil { @@ -204,7 +202,7 @@ func (client *EnvironmentsClient) changeVnetCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vnetInfo) @@ -221,7 +219,7 @@ func (client *EnvironmentsClient) changeVnetHandleResponse(resp *http.Response) // BeginCreateOrUpdate - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // hostingEnvironmentEnvelope - Configuration details of the App Service Environment. @@ -241,7 +239,7 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) if err != nil { @@ -277,7 +275,7 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) @@ -285,7 +283,7 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex // BeginCreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // multiRolePoolEnvelope - Properties of the multi-role pool. @@ -305,7 +303,7 @@ func (client *EnvironmentsClient) BeginCreateOrUpdateMultiRolePool(ctx context.C // CreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) createOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*http.Response, error) { req, err := client.createOrUpdateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) if err != nil { @@ -341,7 +339,7 @@ func (client *EnvironmentsClient) createOrUpdateMultiRolePoolCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) @@ -349,7 +347,7 @@ func (client *EnvironmentsClient) createOrUpdateMultiRolePoolCreateRequest(ctx c // BeginCreateOrUpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -370,7 +368,7 @@ func (client *EnvironmentsClient) BeginCreateOrUpdateWorkerPool(ctx context.Cont // CreateOrUpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) createOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*http.Response, error) { req, err := client.createOrUpdateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) if err != nil { @@ -410,7 +408,7 @@ func (client *EnvironmentsClient) createOrUpdateWorkerPoolCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) @@ -418,7 +416,7 @@ func (client *EnvironmentsClient) createOrUpdateWorkerPoolCreateRequest(ctx cont // BeginDelete - Description for Delete an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete @@ -437,7 +435,7 @@ func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Description for Delete an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -476,7 +474,7 @@ func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resou if options != nil && options.ForceDelete != nil { reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -484,7 +482,7 @@ func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resou // DeleteAseCustomDNSSuffixConfiguration - Delete Custom Dns Suffix configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration @@ -524,7 +522,7 @@ func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -541,7 +539,7 @@ func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationHandleRes // BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection @@ -560,7 +558,7 @@ func (client *EnvironmentsClient) BeginDeletePrivateEndpointConnection(ctx conte // DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { @@ -600,7 +598,7 @@ func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -608,7 +606,7 @@ func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(c // Get - Description for Get the properties of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. @@ -647,7 +645,7 @@ func (client *EnvironmentsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -664,7 +662,7 @@ func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (Enviro // GetAseCustomDNSSuffixConfiguration - Get Custom Dns Suffix configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseCustomDNSSuffixConfiguration @@ -704,7 +702,7 @@ func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -721,7 +719,7 @@ func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationHandleRespon // GetAseV3NetworkingConfiguration - Description for Get networking configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration @@ -761,7 +759,7 @@ func (client *EnvironmentsClient) getAseV3NetworkingConfigurationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -778,7 +776,7 @@ func (client *EnvironmentsClient) getAseV3NetworkingConfigurationHandleResponse( // GetDiagnosticsItem - Description for Get a diagnostics item for an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // diagnosticsName - Name of the diagnostics item. @@ -823,7 +821,7 @@ func (client *EnvironmentsClient) getDiagnosticsItemCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -840,8 +838,7 @@ func (client *EnvironmentsClient) getDiagnosticsItemHandleResponse(resp *http.Re // NewGetInboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all inbound dependencies // of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.GetInboundNetworkDependenciesEndpoints @@ -894,7 +891,7 @@ func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -911,7 +908,7 @@ func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsHandleRe // GetMultiRolePool - Description for Get properties of a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool @@ -951,7 +948,7 @@ func (client *EnvironmentsClient) getMultiRolePoolCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -968,8 +965,7 @@ func (client *EnvironmentsClient) getMultiRolePoolHandleResponse(resp *http.Resp // NewGetOutboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all outbound dependencies // of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints @@ -1022,7 +1018,7 @@ func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1039,7 +1035,7 @@ func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsHandleR // GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -1084,7 +1080,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1101,8 +1097,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionHandleResponse(res // NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoints associated with a hosting // environment -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnectionList @@ -1155,7 +1150,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionListCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1172,7 +1167,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionListHandleResponse // GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources @@ -1212,7 +1207,7 @@ func (client *EnvironmentsClient) getPrivateLinkResourcesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1229,7 +1224,7 @@ func (client *EnvironmentsClient) getPrivateLinkResourcesHandleResponse(resp *ht // GetVipInfo - Description for Get IP addresses assigned to an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. @@ -1268,7 +1263,7 @@ func (client *EnvironmentsClient) getVipInfoCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1285,7 +1280,7 @@ func (client *EnvironmentsClient) getVipInfoHandleResponse(resp *http.Response) // GetWorkerPool - Description for Get properties of a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -1330,7 +1325,7 @@ func (client *EnvironmentsClient) getWorkerPoolCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1346,8 +1341,7 @@ func (client *EnvironmentsClient) getWorkerPoolHandleResponse(resp *http.Respons } // NewListPager - Description for Get all App Service Environments for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.List method. func (client *EnvironmentsClient) NewListPager(options *EnvironmentsClientListOptions) *runtime.Pager[EnvironmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListResponse]{ @@ -1389,7 +1383,7 @@ func (client *EnvironmentsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1405,8 +1399,7 @@ func (client *EnvironmentsClient) listHandleResponse(resp *http.Response) (Envir } // NewListAppServicePlansPager - Description for Get all App Service plans in an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.ListAppServicePlans @@ -1459,7 +1452,7 @@ func (client *EnvironmentsClient) listAppServicePlansCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1474,74 +1467,8 @@ func (client *EnvironmentsClient) listAppServicePlansHandleResponse(resp *http.R return result, nil } -// NewListByResourceGroupPager - Description for Get all App Service Environments in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup -// method. -func (client *EnvironmentsClient) NewListByResourceGroupPager(resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) *runtime.Pager[EnvironmentsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListByResourceGroupResponse]{ - More: func(page EnvironmentsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListByResourceGroupResponse) (EnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *EnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - 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", "2022-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *EnvironmentsClient) listByResourceGroupHandleResponse(resp *http.Response) (EnvironmentsClientListByResourceGroupResponse, error) { - result := EnvironmentsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentCollection); err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - return result, nil -} - // NewListCapacitiesPager - Description for Get the used, available, and total worker capacity an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.ListCapacities @@ -1594,7 +1521,7 @@ func (client *EnvironmentsClient) listCapacitiesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1611,7 +1538,7 @@ func (client *EnvironmentsClient) listCapacitiesHandleResponse(resp *http.Respon // ListDiagnostics - Description for Get diagnostic information for an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics @@ -1651,7 +1578,7 @@ func (client *EnvironmentsClient) listDiagnosticsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1668,8 +1595,7 @@ func (client *EnvironmentsClient) listDiagnosticsHandleResponse(resp *http.Respo // NewListMultiRoleMetricDefinitionsPager - Description for Get metric definitions for a multi-role pool of an App Service // Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRoleMetricDefinitions @@ -1722,7 +1648,7 @@ func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1739,8 +1665,7 @@ func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsHandleResponse(r // NewListMultiRolePoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of // a multi-role pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // instance - Name of the instance in the multi-role pool. @@ -1798,7 +1723,7 @@ func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1814,8 +1739,7 @@ func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsHand } // NewListMultiRolePoolSKUsPager - Description for Get available SKUs for scaling a multi-role pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePoolSKUs @@ -1868,7 +1792,7 @@ func (client *EnvironmentsClient) listMultiRolePoolSKUsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1884,8 +1808,7 @@ func (client *EnvironmentsClient) listMultiRolePoolSKUsHandleResponse(resp *http } // NewListMultiRolePoolsPager - Description for Get all multi-role pools. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePools @@ -1938,7 +1861,7 @@ func (client *EnvironmentsClient) listMultiRolePoolsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1954,8 +1877,7 @@ func (client *EnvironmentsClient) listMultiRolePoolsHandleResponse(resp *http.Re } // NewListMultiRoleUsagesPager - Description for Get usage metrics for a multi-role pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.ListMultiRoleUsages @@ -2008,7 +1930,7 @@ func (client *EnvironmentsClient) listMultiRoleUsagesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2025,7 +1947,7 @@ func (client *EnvironmentsClient) listMultiRoleUsagesHandleResponse(resp *http.R // ListOperations - Description for List all currently running operations on the App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations @@ -2065,7 +1987,7 @@ func (client *EnvironmentsClient) listOperationsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2081,8 +2003,7 @@ func (client *EnvironmentsClient) listOperationsHandleResponse(resp *http.Respon } // NewListUsagesPager - Description for Get global usage metrics of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.ListUsages method. @@ -2134,7 +2055,7 @@ func (client *EnvironmentsClient) listUsagesCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -2155,8 +2076,7 @@ func (client *EnvironmentsClient) listUsagesHandleResponse(resp *http.Response) } // NewListWebAppsPager - Description for Get all apps in an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.ListWebApps @@ -2212,7 +2132,7 @@ func (client *EnvironmentsClient) listWebAppsCreateRequest(ctx context.Context, if options != nil && options.PropertiesToInclude != nil { reqQP.Set("propertiesToInclude", *options.PropertiesToInclude) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2228,8 +2148,7 @@ func (client *EnvironmentsClient) listWebAppsHandleResponse(resp *http.Response) } // NewListWebWorkerMetricDefinitionsPager - Description for Get metric definitions for a worker pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -2287,7 +2206,7 @@ func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2303,8 +2222,7 @@ func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsHandleResponse(r } // NewListWebWorkerUsagesPager - Description for Get usage metrics for a worker pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -2362,7 +2280,7 @@ func (client *EnvironmentsClient) listWebWorkerUsagesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2379,8 +2297,7 @@ func (client *EnvironmentsClient) listWebWorkerUsagesHandleResponse(resp *http.R // NewListWorkerPoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of a worker // pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -2443,7 +2360,7 @@ func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2459,8 +2376,7 @@ func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsHandleR } // NewListWorkerPoolSKUsPager - Description for Get available SKUs for scaling a worker pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -2518,7 +2434,7 @@ func (client *EnvironmentsClient) listWorkerPoolSKUsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2534,8 +2450,7 @@ func (client *EnvironmentsClient) listWorkerPoolSKUsHandleResponse(resp *http.Re } // NewListWorkerPoolsPager - Description for Get all worker pools of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPools @@ -2588,7 +2503,7 @@ func (client *EnvironmentsClient) listWorkerPoolsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2605,7 +2520,7 @@ func (client *EnvironmentsClient) listWorkerPoolsHandleResponse(resp *http.Respo // Reboot - Description for Reboot all machines in an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. @@ -2644,15 +2559,14 @@ func (client *EnvironmentsClient) rebootCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // BeginResume - Description for Resume an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume @@ -2693,8 +2607,7 @@ func (client *EnvironmentsClient) BeginResume(ctx context.Context, resourceGroup } // Resume - Description for Resume an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) resume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*http.Response, error) { req, err := client.resumeCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -2730,7 +2643,7 @@ func (client *EnvironmentsClient) resumeCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2746,8 +2659,7 @@ func (client *EnvironmentsClient) resumeHandleResponse(resp *http.Response) (Env } // BeginSuspend - Description for Suspend an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend @@ -2788,8 +2700,7 @@ func (client *EnvironmentsClient) BeginSuspend(ctx context.Context, resourceGrou } // Suspend - Description for Suspend an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) suspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*http.Response, error) { req, err := client.suspendCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -2825,7 +2736,7 @@ func (client *EnvironmentsClient) suspendCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2842,7 +2753,7 @@ func (client *EnvironmentsClient) suspendHandleResponse(resp *http.Response) (En // TestUpgradeAvailableNotification - Send a test notification that an upgrade is available for this App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientTestUpgradeAvailableNotificationOptions contains the optional parameters for the EnvironmentsClient.TestUpgradeAvailableNotification @@ -2882,7 +2793,7 @@ func (client *EnvironmentsClient) testUpgradeAvailableNotificationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2890,7 +2801,7 @@ func (client *EnvironmentsClient) testUpgradeAvailableNotificationCreateRequest( // Update - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // hostingEnvironmentEnvelope - Configuration details of the App Service Environment. @@ -2930,7 +2841,7 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) @@ -2947,7 +2858,7 @@ func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (Env // UpdateAseCustomDNSSuffixConfiguration - Update Custom Dns Suffix configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration @@ -2987,7 +2898,7 @@ func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, customDNSSuffixConfiguration) @@ -3004,7 +2915,7 @@ func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationHandleRes // UpdateAseNetworkingConfiguration - Description for Update networking configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration @@ -3044,7 +2955,7 @@ func (client *EnvironmentsClient) updateAseNetworkingConfigurationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, aseNetworkingConfiguration) @@ -3061,7 +2972,7 @@ func (client *EnvironmentsClient) updateAseNetworkingConfigurationHandleResponse // UpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // multiRolePoolEnvelope - Properties of the multi-role pool. @@ -3102,7 +3013,7 @@ func (client *EnvironmentsClient) updateMultiRolePoolCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) @@ -3119,7 +3030,7 @@ func (client *EnvironmentsClient) updateMultiRolePoolHandleResponse(resp *http.R // UpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // workerPoolName - Name of the worker pool. @@ -3165,7 +3076,7 @@ func (client *EnvironmentsClient) updateWorkerPoolCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) @@ -3182,7 +3093,7 @@ func (client *EnvironmentsClient) updateWorkerPoolHandleResponse(resp *http.Resp // BeginUpgrade - Description for Initiate an upgrade of an App Service Environment if one is available. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service Environment. // options - EnvironmentsClientBeginUpgradeOptions contains the optional parameters for the EnvironmentsClient.BeginUpgrade @@ -3201,7 +3112,7 @@ func (client *EnvironmentsClient) BeginUpgrade(ctx context.Context, resourceGrou // Upgrade - Description for Initiate an upgrade of an App Service Environment if one is available. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *EnvironmentsClient) upgrade(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*http.Response, error) { req, err := client.upgradeCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -3237,7 +3148,7 @@ func (client *EnvironmentsClient) upgradeCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go b/sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go new file mode 100644 index 000000000000..e051ec3947f0 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go @@ -0,0 +1,120 @@ +//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. +// DO NOT EDIT. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GetUsagesInLocationClient contains the methods for the GetUsagesInLocation group. +// Don't use this type directly, use NewGetUsagesInLocationClient() instead. +type GetUsagesInLocationClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewGetUsagesInLocationClient creates a new instance of GetUsagesInLocationClient with the specified values. +// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewGetUsagesInLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GetUsagesInLocationClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &GetUsagesInLocationClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// NewListPager - List usages in cores for all skus used by a subscription in a given location, for a specific quota type. +// Generated from API version 2023-12-01 +// location - The name of the Azure region. +// options - GetUsagesInLocationClientListOptions contains the optional parameters for the GetUsagesInLocationClient.List +// method. +func (client *GetUsagesInLocationClient) NewListPager(location string, options *GetUsagesInLocationClientListOptions) *runtime.Pager[GetUsagesInLocationClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GetUsagesInLocationClientListResponse]{ + More: func(page GetUsagesInLocationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GetUsagesInLocationClientListResponse) (GetUsagesInLocationClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return GetUsagesInLocationClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *GetUsagesInLocationClient) listCreateRequest(ctx context.Context, location string, options *GetUsagesInLocationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GetUsagesInLocationClient) listHandleResponse(resp *http.Response) (GetUsagesInLocationClientListResponse, error) { + result := GetUsagesInLocationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/global_client.go b/sdk/resourcemanager/appservice/armappservice/global_client.go index 3731d1e5e7b0..b0c9786747ff 100644 --- a/sdk/resourcemanager/appservice/armappservice/global_client.go +++ b/sdk/resourcemanager/appservice/armappservice/global_client.go @@ -57,7 +57,7 @@ func NewGlobalClient(subscriptionID string, credential azcore.TokenCredential, o // GetDeletedWebApp - Description for Get deleted app for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // options - GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. func (client *GlobalClient) GetDeletedWebApp(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppOptions) (GlobalClientGetDeletedWebAppResponse, error) { @@ -91,7 +91,7 @@ func (client *GlobalClient) getDeletedWebAppCreateRequest(ctx context.Context, d return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,7 +108,7 @@ func (client *GlobalClient) getDeletedWebAppHandleResponse(resp *http.Response) // GetDeletedWebAppSnapshots - Description for Get all deleted apps for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // options - GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots // method. @@ -143,7 +143,7 @@ func (client *GlobalClient) getDeletedWebAppSnapshotsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -160,7 +160,7 @@ func (client *GlobalClient) getDeletedWebAppSnapshotsHandleResponse(resp *http.R // GetSubscriptionOperationWithAsyncResponse - Description for Gets an operation in a subscription and given region // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // location - Location name // operationID - Operation Id // options - GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse @@ -200,7 +200,7 @@ func (client *GlobalClient) getSubscriptionOperationWithAsyncResponseCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/global_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/global_client_example_test.go deleted file mode 100644 index 729703a8f2fb..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/global_client_example_test.go +++ /dev/null @@ -1,79 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetDeletedWebApp.json -func ExampleGlobalClient_GetDeletedWebApp() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewGlobalClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDeletedWebApp(ctx, - "9", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetDeletedWebAppSnapshots.json -func ExampleGlobalClient_GetDeletedWebAppSnapshots() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewGlobalClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDeletedWebAppSnapshots(ctx, - "9", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSubscriptionOperationWithAsyncResponse.json -func ExampleGlobalClient_GetSubscriptionOperationWithAsyncResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewGlobalClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.GetSubscriptionOperationWithAsyncResponse(ctx, - "West US", - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab5d5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/go.mod b/sdk/resourcemanager/appservice/armappservice/go.mod index c8878d02e014..4c2ee18dae8e 100644 --- a/sdk/resourcemanager/appservice/armappservice/go.mod +++ b/sdk/resourcemanager/appservice/armappservice/go.mod @@ -1,21 +1,13 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v3 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.1.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.5.1 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // 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/appservice/armappservice/go.sum b/sdk/resourcemanager/appservice/armappservice/go.sum index 8828b17b1853..3afb578030a5 100644 --- a/sdk/resourcemanager/appservice/armappservice/go.sum +++ b/sdk/resourcemanager/appservice/armappservice/go.sum @@ -1,33 +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.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= 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.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE= -github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= 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 v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -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/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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/appservice/armappservice/kubeenvironments_client.go b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go index 52631fcd09f7..1f8dd5899d2e 100644 --- a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go +++ b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go @@ -57,7 +57,7 @@ func NewKubeEnvironmentsClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Kubernetes Environment. // kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. @@ -77,7 +77,7 @@ func (client *KubeEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *KubeEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) if err != nil { @@ -113,7 +113,7 @@ func (client *KubeEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) @@ -121,7 +121,7 @@ func (client *KubeEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Description for Delete a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Kubernetes Environment. // options - KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete @@ -140,7 +140,7 @@ func (client *KubeEnvironmentsClient) BeginDelete(ctx context.Context, resourceG // Delete - Description for Delete a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *KubeEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -176,7 +176,7 @@ func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,7 +184,7 @@ func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, r // Get - Description for Get the properties of a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Kubernetes Environment. // options - KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. @@ -223,7 +223,7 @@ func (client *KubeEnvironmentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,8 +239,7 @@ func (client *KubeEnvironmentsClient) getHandleResponse(resp *http.Response) (Ku } // NewListByResourceGroupPager - Description for Get all the Kubernetes Environments in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.ListByResourceGroup // method. @@ -288,7 +287,7 @@ func (client *KubeEnvironmentsClient) listByResourceGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,8 +303,7 @@ func (client *KubeEnvironmentsClient) listByResourceGroupHandleResponse(resp *ht } // NewListBySubscriptionPager - Description for Get all Kubernetes Environments for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.ListBySubscription // method. func (client *KubeEnvironmentsClient) NewListBySubscriptionPager(options *KubeEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse] { @@ -348,7 +346,7 @@ func (client *KubeEnvironmentsClient) listBySubscriptionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -365,7 +363,7 @@ func (client *KubeEnvironmentsClient) listBySubscriptionHandleResponse(resp *htt // Update - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the Kubernetes Environment. // kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. @@ -405,7 +403,7 @@ func (client *KubeEnvironmentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go deleted file mode 100644 index 9cddefa7b781..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go +++ /dev/null @@ -1,172 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/KubeEnvironments_ListBySubscription.json -func ExampleKubeEnvironmentsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewKubeEnvironmentsClient("8efdecc5-919e-44eb-b179-915dca89ebf9", 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/KubeEnvironments_ListByResourceGroup.json -func ExampleKubeEnvironmentsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewKubeEnvironmentsClient("8efdecc5-919e-44eb-b179-915dca89ebf9", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("examplerg", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/KubeEnvironments_Get.json -func ExampleKubeEnvironmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewKubeEnvironmentsClient("8efdecc5-919e-44eb-b179-915dca89ebf9", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "examplerg", - "jlaw-demo1", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/KubeEnvironments_CreateOrUpdate.json -func ExampleKubeEnvironmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewKubeEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "examplerg", - "testkubeenv", - armappservice.KubeEnvironment{ - Location: to.Ptr("East US"), - Properties: &armappservice.KubeEnvironmentProperties{ - StaticIP: to.Ptr("1.2.3.4"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/KubeEnvironments_Delete.json -func ExampleKubeEnvironmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewKubeEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "examplerg", - "examplekenv", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/KubeEnvironments_Update.json -func ExampleKubeEnvironmentsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewKubeEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "examplerg", - "testkubeenv", - armappservice.KubeEnvironmentPatchResource{ - Properties: &armappservice.KubeEnvironmentPatchResourceProperties{ - StaticIP: to.Ptr("1.2.3.4"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/models.go b/sdk/resourcemanager/appservice/armappservice/models.go index d3a149b3450c..24c88a60d25b 100644 --- a/sdk/resourcemanager/appservice/armappservice/models.go +++ b/sdk/resourcemanager/appservice/armappservice/models.go @@ -478,10 +478,12 @@ type ApplicationStackResource struct { } type ArcConfiguration struct { - ArtifactStorageAccessMode *string `json:"artifactStorageAccessMode,omitempty"` - ArtifactStorageClassName *string `json:"artifactStorageClassName,omitempty"` - ArtifactStorageMountPath *string `json:"artifactStorageMountPath,omitempty"` - ArtifactStorageNodeName *string `json:"artifactStorageNodeName,omitempty"` + ArtifactStorageAccessMode *string `json:"artifactStorageAccessMode,omitempty"` + ArtifactStorageClassName *string `json:"artifactStorageClassName,omitempty"` + ArtifactStorageMountPath *string `json:"artifactStorageMountPath,omitempty"` + ArtifactStorageNodeName *string `json:"artifactStorageNodeName,omitempty"` + + // Property to select Azure Storage type. Available options: blobContainer. ArtifactsStorageType *StorageType `json:"artifactsStorageType,omitempty"` FrontEndServiceConfiguration *FrontEndConfiguration `json:"frontEndServiceConfiguration,omitempty"` KubeConfig *string `json:"kubeConfig,omitempty"` @@ -511,6 +513,54 @@ type ArmPlan struct { Version *string `json:"version,omitempty"` } +// AseRegion - ASE region. +type AseRegion struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // ASE region resource specific properties + Properties *AseRegionProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// AseRegionCollection - Collection of ASE regions. +type AseRegionCollection struct { + // REQUIRED; Collection of resources. + Value []*AseRegion `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + +// AseRegionProperties - ASE region resource specific properties +type AseRegionProperties struct { + // Available OSs in region. + AvailableOS []*string `json:"availableOS,omitempty"` + + // Available Skus in region. + AvailableSKU []*string `json:"availableSku,omitempty"` + + // READ-ONLY; Dedicated host enabled. + DedicatedHost *bool `json:"dedicatedHost,omitempty" azure:"ro"` + + // READ-ONLY; Display name for region. + DisplayName *string `json:"displayName,omitempty" azure:"ro"` + + // READ-ONLY; Is region standard. + Standard *bool `json:"standard,omitempty" azure:"ro"` + + // READ-ONLY; Zone redundant deployment enabled. + ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` +} + // AseV3NetworkingConfiguration - Full view of networking configuration for an ASE. type AseV3NetworkingConfiguration struct { // Kind of resource. @@ -758,6 +808,9 @@ type AzureStorageInfoValue struct { // Path to mount the storage within the site's runtime environment. MountPath *string `json:"mountPath,omitempty"` + // Mounting protocol to use for the storage account. + Protocol *AzureStorageProtocol `json:"protocol,omitempty"` + // Name of the file share (container name, for Blob storage). ShareName *string `json:"shareName,omitempty"` @@ -2288,6 +2341,30 @@ type DaprComponent struct { Version *string `json:"version,omitempty"` } +// DaprConfig - App Dapr configuration. +type DaprConfig struct { + // Dapr application identifier + AppID *string `json:"appId,omitempty"` + + // Tells Dapr which port your application is listening on + AppPort *int32 `json:"appPort,omitempty"` + + // Enables API logging for the Dapr sidecar + EnableAPILogging *bool `json:"enableApiLogging,omitempty"` + + // Boolean indicating if the Dapr side car is enabled + Enabled *bool `json:"enabled,omitempty"` + + // Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + HTTPMaxRequestSize *int32 `json:"httpMaxRequestSize,omitempty"` + + // Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + HTTPReadBufferSize *int32 `json:"httpReadBufferSize,omitempty"` + + // Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + LogLevel *DaprLogLevel `json:"logLevel,omitempty"` +} + // DaprMetadata - Container App Dapr component metadata. type DaprMetadata struct { // Metadata property name. @@ -2356,6 +2433,96 @@ type DatabaseBackupSetting struct { Name *string `json:"name,omitempty"` } +// DatabaseConnection - Static Site Database Connection resource. +type DatabaseConnection struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // DatabaseConnection resource specific properties + Properties *DatabaseConnectionProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// DatabaseConnectionCollection - Collection of static site database connections. +type DatabaseConnectionCollection struct { + // REQUIRED; Collection of resources. + Value []*DatabaseConnection `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + +// DatabaseConnectionOverview - Static Site Database Connection overview. +type DatabaseConnectionOverview struct { + // READ-ONLY; A list of configuration files associated with this database connection. + ConfigurationFiles []*StaticSiteDatabaseConnectionConfigurationFileOverview `json:"configurationFiles,omitempty" azure:"ro"` + + // READ-ONLY; If present, the identity is used in conjunction with connection string to connect to the database. Use of the + // system-assigned managed identity is indicated with the string 'SystemAssigned', while use + // of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + ConnectionIdentity *string `json:"connectionIdentity,omitempty" azure:"ro"` + + // READ-ONLY; If present, the name of this database connection resource. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The region of the database resource. + Region *string `json:"region,omitempty" azure:"ro"` + + // READ-ONLY; The resource id of the database. + ResourceID *string `json:"resourceId,omitempty" azure:"ro"` +} + +// DatabaseConnectionPatchRequest - Static Site Database Connection Request Properties resource when patching +type DatabaseConnectionPatchRequest struct { + // DatabaseConnectionPatchRequest resource specific properties + Properties *DatabaseConnectionPatchRequestProperties `json:"properties,omitempty"` +} + +// DatabaseConnectionPatchRequestProperties - DatabaseConnectionPatchRequest resource specific properties +type DatabaseConnectionPatchRequestProperties struct { + // If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned + // managed identity is indicated with the string 'SystemAssigned', while use + // of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + ConnectionIdentity *string `json:"connectionIdentity,omitempty"` + + // The connection string to use to connect to the database. + ConnectionString *string `json:"connectionString,omitempty"` + + // The region of the database resource. + Region *string `json:"region,omitempty"` + + // The resource id of the database. + ResourceID *string `json:"resourceId,omitempty"` +} + +// DatabaseConnectionProperties - DatabaseConnection resource specific properties +type DatabaseConnectionProperties struct { + // REQUIRED; The region of the database resource. + Region *string `json:"region,omitempty"` + + // REQUIRED; The resource id of the database. + ResourceID *string `json:"resourceId,omitempty"` + + // If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned + // managed identity is indicated with the string 'SystemAssigned', while use + // of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + ConnectionIdentity *string `json:"connectionIdentity,omitempty"` + + // The connection string to use to connect to the database. + ConnectionString *string `json:"connectionString,omitempty"` + + // READ-ONLY; A list of configuration files associated with this database connection. + ConfigurationFiles []*StaticSiteDatabaseConnectionConfigurationFileOverview `json:"configurationFiles,omitempty" azure:"ro"` +} + // DefaultAuthorizationPolicy - The configuration settings of the Azure Active Directory default authorization policy. type DefaultAuthorizationPolicy struct { // The configuration settings of the Azure Active Directory allowed applications. @@ -3577,6 +3744,14 @@ type EnvironmentVar struct { Value *string `json:"value,omitempty"` } +type EnvironmentVariable struct { + // REQUIRED; Environment variable name + Name *string `json:"name,omitempty"` + + // REQUIRED; Environment variable value + Value *string `json:"value,omitempty"` +} + // EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection // method. type EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { @@ -3725,12 +3900,6 @@ type EnvironmentsClientListAppServicePlansOptions struct { // placeholder for future optional parameters } -// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup -// method. -type EnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - // EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.ListCapacities method. type EnvironmentsClientListCapacitiesOptions struct { // placeholder for future optional parameters @@ -4071,6 +4240,18 @@ type FrontEndConfiguration struct { Kind *FrontEndServiceType `json:"kind,omitempty"` } +// FunctionAppConfig - Function app configuration. +type FunctionAppConfig struct { + // Function app deployment configuration. + Deployment *FunctionsDeployment `json:"deployment,omitempty"` + + // Function app runtime settings. + Runtime *FunctionsRuntime `json:"runtime,omitempty"` + + // Function app scale and concurrency settings. + ScaleAndConcurrency *FunctionsScaleAndConcurrency `json:"scaleAndConcurrency,omitempty"` +} + // FunctionAppMajorVersion - Function App stack major version. type FunctionAppMajorVersion struct { // READ-ONLY; Function App stack major version (display only). @@ -4272,6 +4453,87 @@ type FunctionSecrets struct { TriggerURL *string `json:"trigger_url,omitempty"` } +// FunctionsAlwaysReadyConfig - Sets the number of 'Always Ready' instances for a function group or a specific function. +type FunctionsAlwaysReadyConfig struct { + // Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information + // see https://aka.ms/flexconsumption/alwaysready. + InstanceCount *float32 `json:"instanceCount,omitempty"` + + // Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready. + Name *string `json:"name,omitempty"` +} + +// FunctionsDeployment - Configuration section for the function app deployment. +type FunctionsDeployment struct { + // Storage for deployed package used by the function app. + Storage *FunctionsDeploymentStorage `json:"storage,omitempty"` +} + +// FunctionsDeploymentStorage - Storage for deployed package used by the function app. +type FunctionsDeploymentStorage struct { + // Authentication method to access the storage account for deployment. + Authentication *FunctionsDeploymentStorageAuthentication `json:"authentication,omitempty"` + + // Property to select Azure Storage type. Available options: blobContainer. + Type *StorageType `json:"type,omitempty"` + + // Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://.blob.core.windows.net/. + Value *string `json:"value,omitempty"` +} + +// FunctionsDeploymentStorageAuthentication - Authentication method to access the storage account for deployment. +type FunctionsDeploymentStorageAuthentication struct { + // Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection + // string. Do not set a value for this property when using other + // authentication type. + StorageAccountConnectionStringName *string `json:"storageAccountConnectionStringName,omitempty"` + + // Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, + // UserAssignedIdentity, StorageAccountConnectionString. + Type *AuthenticationType `json:"type,omitempty"` + + // Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when + // using other authentication type. + UserAssignedIdentityResourceID *string `json:"userAssignedIdentityResourceId,omitempty"` +} + +// FunctionsRuntime - Function app runtime name and version. +type FunctionsRuntime struct { + // Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom + Name *RuntimeName `json:"name,omitempty"` + + // Function app runtime version. Example: 8 (for dotnet-isolated) + Version *string `json:"version,omitempty"` +} + +// FunctionsScaleAndConcurrency - Scale and concurrency settings for the function app. +type FunctionsScaleAndConcurrency struct { + // 'Always Ready' configuration for the function app. + AlwaysReady []*FunctionsAlwaysReadyConfig `json:"alwaysReady,omitempty"` + + // Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated + // proportionally. + InstanceMemoryMB *float32 `json:"instanceMemoryMB,omitempty"` + + // The maximum number of instances for the function app. + MaximumInstanceCount *float32 `json:"maximumInstanceCount,omitempty"` + + // Scale and concurrency settings for the function app triggers. + Triggers *FunctionsScaleAndConcurrencyTriggers `json:"triggers,omitempty"` +} + +// FunctionsScaleAndConcurrencyTriggers - Scale and concurrency settings for the function app triggers. +type FunctionsScaleAndConcurrencyTriggers struct { + // Scale and concurrency settings for the HTTP trigger. + HTTP *FunctionsScaleAndConcurrencyTriggersHTTP `json:"http,omitempty"` +} + +// FunctionsScaleAndConcurrencyTriggersHTTP - Scale and concurrency settings for the HTTP trigger. +type FunctionsScaleAndConcurrencyTriggersHTTP struct { + // The maximum number of concurrent HTTP trigger invocations per instance. + PerInstanceConcurrency *float32 `json:"perInstanceConcurrency,omitempty"` +} + // GeoRegion - Geographical region. type GeoRegion struct { // Kind of resource. @@ -4311,6 +4573,11 @@ type GeoRegionProperties struct { OrgDomain *string `json:"orgDomain,omitempty" azure:"ro"` } +// GetUsagesInLocationClientListOptions contains the optional parameters for the GetUsagesInLocationClient.List method. +type GetUsagesInLocationClientListOptions struct { + // placeholder for future optional parameters +} + // GitHub - The configuration settings of the GitHub provider. type GitHub struct { // false if the GitHub provider should not be enabled despite the set registration; otherwise, true. @@ -7466,6 +7733,15 @@ type ResourceCollection struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } +// ResourceConfig - Function app resource requirements. +type ResourceConfig struct { + // Required CPU in cores, e.g. 0.5 + CPU *float64 `json:"cpu,omitempty"` + + // Required memory, e.g. "1Gi" + Memory *string `json:"memory,omitempty"` +} + // ResourceHealthMetadata - Used for getting ResourceHealthCheck settings. type ResourceHealthMetadata struct { // Kind of resource. @@ -7614,6 +7890,11 @@ type ResourceNameAvailabilityRequest struct { // REQUIRED; Resource type used for verification. Type *CheckNameResourceTypes `json:"type,omitempty"` + // Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This + // must be of the form + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} + EnvironmentID *string `json:"environmentId,omitempty"` + // Is fully qualified domain name. IsFqdn *bool `json:"isFqdn,omitempty"` } @@ -8053,8 +8334,8 @@ type SiteAuthSettingsProperties struct { // form "key=value". AdditionalLoginParams []*string `json:"additionalLoginParams,omitempty"` - // Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the ClientID value - // is always considered an allowed audience, regardless of this setting. + // Allowed audience values to consider when validating JSON Web Tokens issued by Azure Active Directory. Note that the ClientID + // value is always considered an allowed audience, regardless of this setting. AllowedAudiences []*string `json:"allowedAudiences,omitempty"` // External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part @@ -8310,6 +8591,10 @@ type SiteConfig struct { // Document root. DocumentRoot *string `json:"documentRoot,omitempty"` + // Maximum number of workers that a site can scale out to. This setting only applies to apps in plans where ElasticScaleEnabled + // is true + ElasticWebAppScaleLimit *int32 `json:"elasticWebAppScaleLimit,omitempty"` + // This is work around for polymorphic types. Experiments *Experiments `json:"experiments,omitempty"` @@ -8340,6 +8625,9 @@ type SiteConfig struct { // IP security restrictions for main. IPSecurityRestrictions []*IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"` + // Default action for main access restriction if no rules are matched. + IPSecurityRestrictionsDefaultAction *DefaultAction `json:"ipSecurityRestrictionsDefaultAction,omitempty"` + // Java container. JavaContainer *string `json:"javaContainer,omitempty"` @@ -8373,6 +8661,12 @@ type SiteConfig struct { // Managed Service Identity Id ManagedServiceIdentityID *int32 `json:"managedServiceIdentityId,omitempty"` + // Application metadata. This property cannot be retrieved, since it may contain secrets. + Metadata []*NameValuePair `json:"metadata,omitempty"` + + // The minimum strength TLS cipher suite allowed for an application + MinTLSCipherSuite *TLSCipherSuites `json:"minTlsCipherSuite,omitempty"` + // MinTlsVersion: configures the minimum version of TLS required for SSL requests MinTLSVersion *SupportedTLSVersions `json:"minTlsVersion,omitempty"` @@ -8424,6 +8718,9 @@ type SiteConfig struct { // IP security restrictions for scm. ScmIPSecurityRestrictions []*IPSecurityRestriction `json:"scmIpSecurityRestrictions,omitempty"` + // Default action for scm access restriction if no rules are matched. + ScmIPSecurityRestrictionsDefaultAction *DefaultAction `json:"scmIpSecurityRestrictionsDefaultAction,omitempty"` + // IP security restrictions for scm to use main. ScmIPSecurityRestrictionsUseMain *bool `json:"scmIpSecurityRestrictionsUseMain,omitempty"` @@ -8550,6 +8847,92 @@ type SiteConfigurationSnapshotInfoProperties struct { Time *time.Time `json:"time,omitempty" azure:"ro"` } +// SiteContainer - Container of a site +type SiteContainer struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // SiteContainer resource specific properties + Properties *SiteContainerProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// SiteContainerCollection - Collection of site containers +type SiteContainerCollection struct { + // REQUIRED; Collection of resources. + Value []*SiteContainer `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + +// SiteContainerProperties - SiteContainer resource specific properties +type SiteContainerProperties struct { + // REQUIRED; Image Name + Image *string `json:"image,omitempty"` + + // REQUIRED; true if the container is the main site container; false otherwise. + IsMain *bool `json:"isMain,omitempty"` + + // Auth Type + AuthType *AuthType `json:"authType,omitempty"` + + // List of environment variables + EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"` + + // Password Secret + PasswordSecret *string `json:"passwordSecret,omitempty"` + + // StartUp Command + StartUpCommand *string `json:"startUpCommand,omitempty"` + + // Target Port + TargetPort *string `json:"targetPort,omitempty"` + + // UserManagedIdentity ClientId + UserManagedIdentityClientID *string `json:"userManagedIdentityClientId,omitempty"` + + // User Name + UserName *string `json:"userName,omitempty"` + + // List of volume mounts + VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` + + // READ-ONLY; Created Time + CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + + // READ-ONLY; Last Modified Time + LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` +} + +type SiteDNSConfig struct { + // Alternate DNS server to be used by apps. This property replicates the WEBSITEDNSALT_SERVER app setting. + DNSAltServer *string `json:"dnsAltServer,omitempty"` + + // Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + DNSMaxCacheTimeout *int32 `json:"dnsMaxCacheTimeout,omitempty"` + + // Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + DNSRetryAttemptCount *int32 `json:"dnsRetryAttemptCount,omitempty"` + + // Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + DNSRetryAttemptTimeout *int32 `json:"dnsRetryAttemptTimeout,omitempty"` + + // List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + DNSServers []*string `json:"dnsServers,omitempty"` + + // READ-ONLY; Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + DNSLegacySortOrder *bool `json:"dnsLegacySortOrder,omitempty" azure:"ro"` +} + // SiteExtensionInfo - Site Extension Information. type SiteExtensionInfo struct { // Kind of resource. @@ -8746,6 +9129,9 @@ type SitePatchResourceProperties struct { // Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty"` + // Property to configure various DNS related settings for a site. + DNSConfiguration *SiteDNSConfig `json:"dnsConfiguration,omitempty"` + // Maximum allowed daily memory-time quota (applicable on dynamic apps only). DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` @@ -8915,12 +9301,21 @@ type SiteProperties struct { // Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty"` + // Property to configure various DNS related settings for a site. + DNSConfiguration *SiteDNSConfig `json:"dnsConfiguration,omitempty"` + // Maximum allowed daily memory-time quota (applicable on dynamic apps only). DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` + // Dapr configuration of the app. + DaprConfig *DaprConfig `json:"daprConfig,omitempty"` + // true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). Enabled *bool `json:"enabled,omitempty"` + // Configuration specific of the Azure Function app. + FunctionAppConfig *FunctionAppConfig `json:"functionAppConfig,omitempty"` + // HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests HTTPSOnly *bool `json:"httpsOnly,omitempty"` @@ -8943,6 +9338,11 @@ type SiteProperties struct { // Identity to use for Key Vault Reference authentication. KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + // Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the + // form + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} + ManagedEnvironmentID *string `json:"managedEnvironmentId,omitempty"` + // Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` @@ -8952,6 +9352,9 @@ type SiteProperties struct { // true if reserved; otherwise, false. Reserved *bool `json:"reserved,omitempty"` + // Function app resource requirements. + ResourceConfig *ResourceConfig `json:"resourceConfig,omitempty"` + // true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` @@ -8969,6 +9372,9 @@ type SiteProperties struct { // /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` + // To enable Backup and Restore operations over virtual network + VnetBackupRestoreEnabled *bool `json:"vnetBackupRestoreEnabled,omitempty"` + // To enable accessing content over virtual network VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` @@ -8979,6 +9385,9 @@ type SiteProperties struct { // Routes applied. VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` + // Workload profile name for function app to execute on. + WorkloadProfileName *string `json:"workloadProfileName,omitempty"` + // READ-ONLY; Management information availability state for the app. AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty" azure:"ro"` @@ -9489,6 +9898,9 @@ type StaticSite struct { // READ-ONLY; The custom domains associated with this static site. CustomDomains []*string `json:"customDomains,omitempty" azure:"ro"` + // READ-ONLY; Database connections for the static site + DatabaseConnections []*DatabaseConnectionOverview `json:"databaseConnections,omitempty" azure:"ro"` + // READ-ONLY; The default autogenerated hostname for the static site. DefaultHostname *string `json:"defaultHostname,omitempty" azure:"ro"` @@ -9535,6 +9947,51 @@ type StaticSiteARMResource struct { Type *string `json:"type,omitempty" azure:"ro"` } +// StaticSiteBasicAuthPropertiesARMResource - Static site basic auth properties ARM resource. +type StaticSiteBasicAuthPropertiesARMResource struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // StaticSiteBasicAuthPropertiesARMResource resource specific properties + Properties *StaticSiteBasicAuthPropertiesARMResourceProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// StaticSiteBasicAuthPropertiesARMResourceProperties - StaticSiteBasicAuthPropertiesARMResource resource specific properties +type StaticSiteBasicAuthPropertiesARMResourceProperties struct { + // REQUIRED; State indicating if basic auth is enabled and for what environments it is active. + ApplicableEnvironmentsMode *string `json:"applicableEnvironmentsMode,omitempty"` + + // The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + Environments []*string `json:"environments,omitempty"` + + // The password for basic auth. + Password *string `json:"password,omitempty"` + + // Url to the secret in Key Vault. + SecretURL *string `json:"secretUrl,omitempty"` + + // READ-ONLY; State indicating if basic auth has a secret and what type it is. + SecretState *string `json:"secretState,omitempty" azure:"ro"` +} + +// StaticSiteBasicAuthPropertiesCollection - Collection of static site basic auth. +type StaticSiteBasicAuthPropertiesCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteBasicAuthPropertiesARMResource `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + // StaticSiteBuildARMResource - Static Site Build ARM resource. type StaticSiteBuildARMResource struct { // Kind of resource. @@ -9561,6 +10018,9 @@ type StaticSiteBuildARMResourceProperties struct { // READ-ONLY; When this build was created. CreatedTimeUTC *time.Time `json:"createdTimeUtc,omitempty" azure:"ro"` + // READ-ONLY; Database connections for the static site build + DatabaseConnections []*DatabaseConnectionOverview `json:"databaseConnections,omitempty" azure:"ro"` + // READ-ONLY; The hostname for a static site build. Hostname *string `json:"hostname,omitempty" azure:"ro"` @@ -9698,6 +10158,18 @@ type StaticSiteCustomDomainRequestPropertiesARMResourceProperties struct { ValidationMethod *string `json:"validationMethod,omitempty"` } +// StaticSiteDatabaseConnectionConfigurationFileOverview - A database connection configuration file +type StaticSiteDatabaseConnectionConfigurationFileOverview struct { + // READ-ONLY; The Base64 encoding of the file contents. + Contents *string `json:"contents,omitempty" azure:"ro"` + + // READ-ONLY; The name of the configuration file. + FileName *string `json:"fileName,omitempty" azure:"ro"` + + // READ-ONLY; The type of configuration file. + Type *string `json:"type,omitempty" azure:"ro"` +} + // StaticSiteFunctionOverviewARMResource - Static Site Function Overview ARM resource. type StaticSiteFunctionOverviewARMResource struct { // Kind of resource. @@ -10189,6 +10661,24 @@ type StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions str ResumeToken string } +// StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth +// method. +type StaticSitesClientCreateOrUpdateBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection +// method. +type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection +// method. +type StaticSitesClientCreateOrUpdateDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + // StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings // method. type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions struct { @@ -10219,6 +10709,18 @@ type StaticSitesClientCreateUserRolesInvitationLinkOptions struct { // placeholder for future optional parameters } +// StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection +// method. +type StaticSitesClientDeleteBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection +// method. +type StaticSitesClientDeleteDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + // StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser // method. type StaticSitesClientDeleteStaticSiteUserOptions struct { @@ -10237,6 +10739,59 @@ type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions struct // placeholder for future optional parameters } +// StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth method. +type StaticSitesClientGetBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection +// method. +type StaticSitesClientGetBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails +// method. +type StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnections +// method. +type StaticSitesClientGetBuildDatabaseConnectionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionsWithDetails +// method. +type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection +// method. +type StaticSitesClientGetDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails +// method. +type StaticSitesClientGetDatabaseConnectionWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnections +// method. +type StaticSitesClientGetDatabaseConnectionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionsWithDetails +// method. +type StaticSitesClientGetDatabaseConnectionsWithDetailsOptions struct { + // placeholder for future optional parameters +} + // StaticSitesClientGetLinkedBackendForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendForBuild // method. type StaticSitesClientGetLinkedBackendForBuildOptions struct { @@ -10331,6 +10886,11 @@ type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions struct { // placeholder for future optional parameters } +// StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.ListBasicAuth method. +type StaticSitesClientListBasicAuthOptions struct { + // placeholder for future optional parameters +} + // StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.List method. type StaticSitesClientListOptions struct { // placeholder for future optional parameters @@ -10420,6 +10980,18 @@ type StaticSitesClientUnlinkBackendOptions struct { IsCleaningAuthConfig *bool } +// StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection +// method. +type StaticSitesClientUpdateBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection +// method. +type StaticSitesClientUpdateDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + // StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite method. type StaticSitesClientUpdateStaticSiteOptions struct { // placeholder for future optional parameters @@ -11380,6 +11952,20 @@ type VnetValidationTestFailureProperties struct { TestName *string `json:"testName,omitempty"` } +type VolumeMount struct { + // REQUIRED; Target path on the container where volume is mounted on + ContainerMountPath *string `json:"containerMountPath,omitempty"` + + // REQUIRED; Sub path in the volume where volume is mounted from. + VolumeSubPath *string `json:"volumeSubPath,omitempty"` + + // Config Data to be mounted on the volume + Data *string `json:"data,omitempty"` + + // Boolean to specify if the mount is read only on the container + ReadOnly *bool `json:"readOnly,omitempty"` +} + // WebAppCollection - Collection of App Service apps. type WebAppCollection struct { // REQUIRED; Collection of resources. @@ -11941,6 +12527,18 @@ type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientCreateOrUpdateSiteContainerOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainer +// method. +type WebAppsClientCreateOrUpdateSiteContainerOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainerSlot +// method. +type WebAppsClientCreateOrUpdateSiteContainerSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck // method. type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { @@ -12154,6 +12752,17 @@ type WebAppsClientDeleteRelayServiceConnectionSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientDeleteSiteContainerOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainer method. +type WebAppsClientDeleteSiteContainerOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainerSlot +// method. +type WebAppsClientDeleteSiteContainerSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension method. type WebAppsClientDeleteSiteExtensionOptions struct { // placeholder for future optional parameters @@ -12219,6 +12828,20 @@ type WebAppsClientDeleteVnetConnectionSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts +// method. +type WebAppsClientDeployWorkflowArtifactsOptions struct { + // Application settings and files of the workflow. + WorkflowArtifacts *WorkflowArtifacts +} + +// WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot +// method. +type WebAppsClientDeployWorkflowArtifactsSlotOptions struct { + // Application settings and files of the workflow. + WorkflowArtifacts *WorkflowArtifacts +} + // WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. type WebAppsClientDiscoverBackupOptions struct { // placeholder for future optional parameters @@ -12522,6 +13145,12 @@ type WebAppsClientGetInstanceProcessSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot +// method. +type WebAppsClientGetInstanceWorkflowSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. type WebAppsClientGetMSDeployLogOptions struct { // placeholder for future optional parameters @@ -12753,6 +13382,16 @@ type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientGetSiteContainerOptions contains the optional parameters for the WebAppsClient.GetSiteContainer method. +type WebAppsClientGetSiteContainerOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.GetSiteContainerSlot method. +type WebAppsClientGetSiteContainerSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension method. type WebAppsClientGetSiteExtensionOptions struct { // placeholder for future optional parameters @@ -12870,6 +13509,11 @@ type WebAppsClientGetWebSiteContainerLogsSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. +type WebAppsClientGetWorkflowOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. type WebAppsClientIsCloneableOptions struct { // placeholder for future optional parameters @@ -13138,6 +13782,12 @@ type WebAppsClientListInstanceProcessesSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientListInstanceWorkflowsSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceWorkflowsSlot +// method. +type WebAppsClientListInstanceWorkflowsSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. type WebAppsClientListMetadataOptions struct { // placeholder for future optional parameters @@ -13276,6 +13926,17 @@ type WebAppsClientListSiteBackupsSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientListSiteContainersOptions contains the optional parameters for the WebAppsClient.ListSiteContainers method. +type WebAppsClientListSiteContainersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteContainersSlotOptions contains the optional parameters for the WebAppsClient.ListSiteContainersSlot +// method. +type WebAppsClientListSiteContainersSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.ListSiteExtensions method. type WebAppsClientListSiteExtensionsOptions struct { // placeholder for future optional parameters @@ -13431,6 +14092,23 @@ type WebAppsClientListWebJobsSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections +// method. +type WebAppsClientListWorkflowsConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot +// method. +type WebAppsClientListWorkflowsConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.ListWorkflows method. +type WebAppsClientListWorkflowsOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet method. type WebAppsClientPutPrivateAccessVnetOptions struct { // placeholder for future optional parameters @@ -13968,6 +14646,12 @@ type WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions struct { // placeholder for future optional parameters } +// WebSiteManagementClientListAseRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListAseRegions +// method. +type WebSiteManagementClientListAseRegionsOptions struct { + // placeholder for future optional parameters +} + // WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.ListBillingMeters // method. type WebSiteManagementClientListBillingMetersOptions struct { @@ -14153,12 +14837,75 @@ type Workflow struct { Type *string `json:"type,omitempty" azure:"ro"` } +// WorkflowArtifacts - The workflow filter. +type WorkflowArtifacts struct { + // Application settings of the workflow. + AppSettings interface{} `json:"appSettings,omitempty"` + + // Files of the app. + Files map[string]interface{} `json:"files,omitempty"` + + // Files of the app to delete. + FilesToDelete []*string `json:"filesToDelete,omitempty"` +} + +// WorkflowEnvelope - Workflow properties definition. +type WorkflowEnvelope struct { + // The resource kind. + Kind *string `json:"kind,omitempty"` + + // The resource location. + Location *string `json:"location,omitempty"` + + // Additional workflow properties. + Properties *WorkflowEnvelopeProperties `json:"properties,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowEnvelopeCollection - Collection of Kudu workflow information elements. +type WorkflowEnvelopeCollection struct { + // REQUIRED; Collection of resources. + Value []*WorkflowEnvelope `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + +// WorkflowEnvelopeProperties - Additional workflow properties. +type WorkflowEnvelopeProperties struct { + // Gets or sets the files. + Files map[string]interface{} `json:"files,omitempty"` + + // Gets or sets the state of the workflow. + FlowState *WorkflowState `json:"flowState,omitempty"` + + // Gets or sets workflow health. + Health *WorkflowHealth `json:"health,omitempty"` +} + // WorkflowFilter - The workflow filter. type WorkflowFilter struct { // The state of workflows. State *WorkflowState `json:"state,omitempty"` } +// WorkflowHealth - Represents the workflow health. +type WorkflowHealth struct { + // REQUIRED; Gets or sets the workflow health state. + State *WorkflowHealthState `json:"state,omitempty"` + + // Gets or sets the workflow error. + Error *ErrorEntity `json:"error,omitempty"` +} + // WorkflowListResult - The list of workflows. type WorkflowListResult struct { // The URL to get the next set of results. diff --git a/sdk/resourcemanager/appservice/armappservice/models_serde.go b/sdk/resourcemanager/appservice/armappservice/models_serde.go index 4c4a8958f8fa..b9b7d86fb68a 100644 --- a/sdk/resourcemanager/appservice/armappservice/models_serde.go +++ b/sdk/resourcemanager/appservice/armappservice/models_serde.go @@ -1318,6 +1318,127 @@ func (a *ArmPlan) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AseRegion. +func (a AseRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegion. +func (a *AseRegion) 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", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegionCollection. +func (a AseRegionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegionCollection. +func (a *AseRegionCollection) 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", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegionProperties. +func (a AseRegionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "availableOS", a.AvailableOS) + populate(objectMap, "availableSku", a.AvailableSKU) + populate(objectMap, "dedicatedHost", a.DedicatedHost) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "standard", a.Standard) + populate(objectMap, "zoneRedundant", a.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegionProperties. +func (a *AseRegionProperties) 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", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableOS": + err = unpopulate(val, "AvailableOS", &a.AvailableOS) + delete(rawMsg, key) + case "availableSku": + err = unpopulate(val, "AvailableSKU", &a.AvailableSKU) + delete(rawMsg, key) + case "dedicatedHost": + err = unpopulate(val, "DedicatedHost", &a.DedicatedHost) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "standard": + err = unpopulate(val, "Standard", &a.Standard) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &a.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AseV3NetworkingConfiguration. func (a AseV3NetworkingConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -1920,6 +2041,7 @@ func (a AzureStorageInfoValue) MarshalJSON() ([]byte, error) { populate(objectMap, "accessKey", a.AccessKey) populate(objectMap, "accountName", a.AccountName) populate(objectMap, "mountPath", a.MountPath) + populate(objectMap, "protocol", a.Protocol) populate(objectMap, "shareName", a.ShareName) populate(objectMap, "state", a.State) populate(objectMap, "type", a.Type) @@ -1944,6 +2066,9 @@ func (a *AzureStorageInfoValue) UnmarshalJSON(data []byte) error { case "mountPath": err = unpopulate(val, "MountPath", &a.MountPath) delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) case "shareName": err = unpopulate(val, "ShareName", &a.ShareName) delete(rawMsg, key) @@ -5262,6 +5387,57 @@ func (d *DaprComponent) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DaprConfig. +func (d DaprConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "enableApiLogging", d.EnableAPILogging) + populate(objectMap, "enabled", d.Enabled) + populate(objectMap, "httpMaxRequestSize", d.HTTPMaxRequestSize) + populate(objectMap, "httpReadBufferSize", d.HTTPReadBufferSize) + populate(objectMap, "logLevel", d.LogLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprConfig. +func (d *DaprConfig) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &d.AppID) + delete(rawMsg, key) + case "appPort": + err = unpopulate(val, "AppPort", &d.AppPort) + delete(rawMsg, key) + case "enableApiLogging": + err = unpopulate(val, "EnableAPILogging", &d.EnableAPILogging) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + case "httpMaxRequestSize": + err = unpopulate(val, "HTTPMaxRequestSize", &d.HTTPMaxRequestSize) + delete(rawMsg, key) + case "httpReadBufferSize": + err = unpopulate(val, "HTTPReadBufferSize", &d.HTTPReadBufferSize) + delete(rawMsg, key) + case "logLevel": + err = unpopulate(val, "LogLevel", &d.LogLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DaprMetadata. func (d DaprMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -5468,16 +5644,19 @@ func (d *DatabaseBackupSetting) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. -func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnection. +func (d DatabaseConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "allowedApplications", d.AllowedApplications) - populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAuthorizationPolicy. -func (d *DefaultAuthorizationPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnection. +func (d *DatabaseConnection) 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", d, err) @@ -5485,11 +5664,20 @@ func (d *DefaultAuthorizationPolicy) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "allowedApplications": - err = unpopulate(val, "AllowedApplications", &d.AllowedApplications) + case "id": + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) - case "allowedPrincipals": - err = unpopulate(val, "AllowedPrincipals", &d.AllowedPrincipals) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -5499,15 +5687,16 @@ func (d *DefaultAuthorizationPolicy) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse. -func (d DefaultErrorResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionCollection. +func (d DatabaseConnectionCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "error", d.Error) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse. -func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionCollection. +func (d *DatabaseConnectionCollection) 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", d, err) @@ -5515,8 +5704,11 @@ func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &d.Error) + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -5526,19 +5718,19 @@ func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError. -func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionOverview. +func (d DatabaseConnectionOverview) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "code", d.Code) - populate(objectMap, "details", d.Details) - populate(objectMap, "innererror", d.Innererror) - populate(objectMap, "message", d.Message) - populate(objectMap, "target", d.Target) + populate(objectMap, "configurationFiles", d.ConfigurationFiles) + populate(objectMap, "connectionIdentity", d.ConnectionIdentity) + populate(objectMap, "name", d.Name) + populate(objectMap, "region", d.Region) + populate(objectMap, "resourceId", d.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError. -func (d *DefaultErrorResponseError) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionOverview. +func (d *DatabaseConnectionOverview) 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", d, err) @@ -5546,20 +5738,20 @@ func (d *DefaultErrorResponseError) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &d.Code) + case "configurationFiles": + err = unpopulate(val, "ConfigurationFiles", &d.ConfigurationFiles) delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &d.Details) + case "connectionIdentity": + err = unpopulate(val, "ConnectionIdentity", &d.ConnectionIdentity) delete(rawMsg, key) - case "innererror": - err = unpopulate(val, "Innererror", &d.Innererror) + case "name": + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) + case "region": + err = unpopulate(val, "Region", &d.Region) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &d.Target) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) delete(rawMsg, key) } if err != nil { @@ -5569,17 +5761,15 @@ func (d *DefaultErrorResponseError) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseErrorDetailsItem. -func (d DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionPatchRequest. +func (d DatabaseConnectionPatchRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "code", d.Code) - populate(objectMap, "message", d.Message) - populate(objectMap, "target", d.Target) + populate(objectMap, "properties", d.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseErrorDetailsItem. -func (d *DefaultErrorResponseErrorDetailsItem) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionPatchRequest. +func (d *DatabaseConnectionPatchRequest) 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", d, err) @@ -5587,14 +5777,8 @@ func (d *DefaultErrorResponseErrorDetailsItem) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &d.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &d.Target) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) } if err != nil { @@ -5604,19 +5788,18 @@ func (d *DefaultErrorResponseErrorDetailsItem) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type DeletedAppRestoreRequest. -func (d DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionPatchRequestProperties. +func (d DatabaseConnectionPatchRequestProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) + populate(objectMap, "connectionIdentity", d.ConnectionIdentity) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "region", d.Region) + populate(objectMap, "resourceId", d.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequest. -func (d *DeletedAppRestoreRequest) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionPatchRequestProperties. +func (d *DatabaseConnectionPatchRequestProperties) 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", d, err) @@ -5624,20 +5807,17 @@ func (d *DeletedAppRestoreRequest) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &d.Kind) + case "connectionIdentity": + err = unpopulate(val, "ConnectionIdentity", &d.ConnectionIdentity) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) + case "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) + case "region": + err = unpopulate(val, "Region", &d.Region) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) delete(rawMsg, key) } if err != nil { @@ -5647,18 +5827,19 @@ func (d *DeletedAppRestoreRequest) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DeletedAppRestoreRequestProperties. -func (d DeletedAppRestoreRequestProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionProperties. +func (d DatabaseConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "deletedSiteId", d.DeletedSiteID) - populate(objectMap, "recoverConfiguration", d.RecoverConfiguration) - populate(objectMap, "snapshotTime", d.SnapshotTime) - populate(objectMap, "useDRSecondary", d.UseDRSecondary) + populate(objectMap, "configurationFiles", d.ConfigurationFiles) + populate(objectMap, "connectionIdentity", d.ConnectionIdentity) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "region", d.Region) + populate(objectMap, "resourceId", d.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequestProperties. -func (d *DeletedAppRestoreRequestProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionProperties. +func (d *DatabaseConnectionProperties) 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", d, err) @@ -5666,16 +5847,237 @@ func (d *DeletedAppRestoreRequestProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "deletedSiteId": - err = unpopulate(val, "DeletedSiteID", &d.DeletedSiteID) + case "configurationFiles": + err = unpopulate(val, "ConfigurationFiles", &d.ConfigurationFiles) delete(rawMsg, key) - case "recoverConfiguration": - err = unpopulate(val, "RecoverConfiguration", &d.RecoverConfiguration) + case "connectionIdentity": + err = unpopulate(val, "ConnectionIdentity", &d.ConnectionIdentity) delete(rawMsg, key) - case "snapshotTime": - err = unpopulate(val, "SnapshotTime", &d.SnapshotTime) + case "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) delete(rawMsg, key) - case "useDRSecondary": + case "region": + err = unpopulate(val, "Region", &d.Region) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. +func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedApplications", d.AllowedApplications) + populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAuthorizationPolicy. +func (d *DefaultAuthorizationPolicy) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedApplications": + err = unpopulate(val, "AllowedApplications", &d.AllowedApplications) + delete(rawMsg, key) + case "allowedPrincipals": + err = unpopulate(val, "AllowedPrincipals", &d.AllowedPrincipals) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse. +func (d DefaultErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", d.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse. +func (d *DefaultErrorResponse) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &d.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError. +func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", d.Code) + populate(objectMap, "details", d.Details) + populate(objectMap, "innererror", d.Innererror) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError. +func (d *DefaultErrorResponseError) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &d.Details) + delete(rawMsg, key) + case "innererror": + err = unpopulate(val, "Innererror", &d.Innererror) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", d.Code) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d *DefaultErrorResponseErrorDetailsItem) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedAppRestoreRequest. +func (d DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequest. +func (d *DeletedAppRestoreRequest) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedAppRestoreRequestProperties. +func (d DeletedAppRestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deletedSiteId", d.DeletedSiteID) + populate(objectMap, "recoverConfiguration", d.RecoverConfiguration) + populate(objectMap, "snapshotTime", d.SnapshotTime) + populate(objectMap, "useDRSecondary", d.UseDRSecondary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequestProperties. +func (d *DeletedAppRestoreRequestProperties) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletedSiteId": + err = unpopulate(val, "DeletedSiteID", &d.DeletedSiteID) + delete(rawMsg, key) + case "recoverConfiguration": + err = unpopulate(val, "RecoverConfiguration", &d.RecoverConfiguration) + delete(rawMsg, key) + case "snapshotTime": + err = unpopulate(val, "SnapshotTime", &d.SnapshotTime) + delete(rawMsg, key) + case "useDRSecondary": err = unpopulate(val, "UseDRSecondary", &d.UseDRSecondary) delete(rawMsg, key) } @@ -7735,6 +8137,37 @@ func (e *EnvironmentVar) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. +func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", e.Name) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariable. +func (e *EnvironmentVariable) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ErrorEntity. func (e ErrorEntity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -8372,6 +8805,41 @@ func (f *FrontEndConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FunctionAppConfig. +func (f FunctionAppConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deployment", f.Deployment) + populate(objectMap, "runtime", f.Runtime) + populate(objectMap, "scaleAndConcurrency", f.ScaleAndConcurrency) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppConfig. +func (f *FunctionAppConfig) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deployment": + err = unpopulate(val, "Deployment", &f.Deployment) + delete(rawMsg, key) + case "runtime": + err = unpopulate(val, "Runtime", &f.Runtime) + delete(rawMsg, key) + case "scaleAndConcurrency": + err = unpopulate(val, "ScaleAndConcurrency", &f.ScaleAndConcurrency) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type FunctionAppMajorVersion. func (f FunctionAppMajorVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -8849,6 +9317,258 @@ func (f *FunctionSecrets) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FunctionsAlwaysReadyConfig. +func (f FunctionsAlwaysReadyConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "instanceCount", f.InstanceCount) + populate(objectMap, "name", f.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsAlwaysReadyConfig. +func (f *FunctionsAlwaysReadyConfig) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceCount": + err = unpopulate(val, "InstanceCount", &f.InstanceCount) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsDeployment. +func (f FunctionsDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "storage", f.Storage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsDeployment. +func (f *FunctionsDeployment) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storage": + err = unpopulate(val, "Storage", &f.Storage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsDeploymentStorage. +func (f FunctionsDeploymentStorage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authentication", f.Authentication) + populate(objectMap, "type", f.Type) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsDeploymentStorage. +func (f *FunctionsDeploymentStorage) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authentication": + err = unpopulate(val, "Authentication", &f.Authentication) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsDeploymentStorageAuthentication. +func (f FunctionsDeploymentStorageAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "storageAccountConnectionStringName", f.StorageAccountConnectionStringName) + populate(objectMap, "type", f.Type) + populate(objectMap, "userAssignedIdentityResourceId", f.UserAssignedIdentityResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsDeploymentStorageAuthentication. +func (f *FunctionsDeploymentStorageAuthentication) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageAccountConnectionStringName": + err = unpopulate(val, "StorageAccountConnectionStringName", &f.StorageAccountConnectionStringName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + case "userAssignedIdentityResourceId": + err = unpopulate(val, "UserAssignedIdentityResourceID", &f.UserAssignedIdentityResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsRuntime. +func (f FunctionsRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", f.Name) + populate(objectMap, "version", f.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsRuntime. +func (f *FunctionsRuntime) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &f.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsScaleAndConcurrency. +func (f FunctionsScaleAndConcurrency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "alwaysReady", f.AlwaysReady) + populate(objectMap, "instanceMemoryMB", f.InstanceMemoryMB) + populate(objectMap, "maximumInstanceCount", f.MaximumInstanceCount) + populate(objectMap, "triggers", f.Triggers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsScaleAndConcurrency. +func (f *FunctionsScaleAndConcurrency) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alwaysReady": + err = unpopulate(val, "AlwaysReady", &f.AlwaysReady) + delete(rawMsg, key) + case "instanceMemoryMB": + err = unpopulate(val, "InstanceMemoryMB", &f.InstanceMemoryMB) + delete(rawMsg, key) + case "maximumInstanceCount": + err = unpopulate(val, "MaximumInstanceCount", &f.MaximumInstanceCount) + delete(rawMsg, key) + case "triggers": + err = unpopulate(val, "Triggers", &f.Triggers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsScaleAndConcurrencyTriggers. +func (f FunctionsScaleAndConcurrencyTriggers) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "http", f.HTTP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsScaleAndConcurrencyTriggers. +func (f *FunctionsScaleAndConcurrencyTriggers) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "http": + err = unpopulate(val, "HTTP", &f.HTTP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsScaleAndConcurrencyTriggersHTTP. +func (f FunctionsScaleAndConcurrencyTriggersHTTP) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "perInstanceConcurrency", f.PerInstanceConcurrency) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsScaleAndConcurrencyTriggersHTTP. +func (f *FunctionsScaleAndConcurrencyTriggersHTTP) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "perInstanceConcurrency": + err = unpopulate(val, "PerInstanceConcurrency", &f.PerInstanceConcurrency) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type GeoRegion. func (g GeoRegion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -15840,16 +16560,47 @@ func (r *Resource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceCollection. -func (r ResourceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceCollection. +func (r ResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollection. +func (r *ResourceCollection) 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", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceConfig. +func (r ResourceConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) + populate(objectMap, "cpu", r.CPU) + populate(objectMap, "memory", r.Memory) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollection. -func (r *ResourceCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConfig. +func (r *ResourceConfig) 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", r, err) @@ -15857,11 +16608,11 @@ func (r *ResourceCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + case "cpu": + err = unpopulate(val, "CPU", &r.CPU) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) + case "memory": + err = unpopulate(val, "Memory", &r.Memory) delete(rawMsg, key) } if err != nil { @@ -16162,6 +16913,7 @@ func (r *ResourceNameAvailability) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceNameAvailabilityRequest. func (r ResourceNameAvailabilityRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + populate(objectMap, "environmentId", r.EnvironmentID) populate(objectMap, "isFqdn", r.IsFqdn) populate(objectMap, "name", r.Name) populate(objectMap, "type", r.Type) @@ -16177,6 +16929,9 @@ func (r *ResourceNameAvailabilityRequest) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "environmentId": + err = unpopulate(val, "EnvironmentID", &r.EnvironmentID) + delete(rawMsg, key) case "isFqdn": err = unpopulate(val, "IsFqdn", &r.IsFqdn) delete(rawMsg, key) @@ -17602,6 +18357,7 @@ func (s SiteConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "defaultDocuments", s.DefaultDocuments) populate(objectMap, "detailedErrorLoggingEnabled", s.DetailedErrorLoggingEnabled) populate(objectMap, "documentRoot", s.DocumentRoot) + populate(objectMap, "elasticWebAppScaleLimit", s.ElasticWebAppScaleLimit) populate(objectMap, "experiments", s.Experiments) populate(objectMap, "ftpsState", s.FtpsState) populate(objectMap, "functionAppScaleLimit", s.FunctionAppScaleLimit) @@ -17611,6 +18367,7 @@ func (s SiteConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "healthCheckPath", s.HealthCheckPath) populate(objectMap, "http20Enabled", s.Http20Enabled) populate(objectMap, "ipSecurityRestrictions", s.IPSecurityRestrictions) + populate(objectMap, "ipSecurityRestrictionsDefaultAction", s.IPSecurityRestrictionsDefaultAction) populate(objectMap, "javaContainer", s.JavaContainer) populate(objectMap, "javaContainerVersion", s.JavaContainerVersion) populate(objectMap, "javaVersion", s.JavaVersion) @@ -17623,6 +18380,8 @@ func (s SiteConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "machineKey", s.MachineKey) populate(objectMap, "managedPipelineMode", s.ManagedPipelineMode) populate(objectMap, "managedServiceIdentityId", s.ManagedServiceIdentityID) + populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "minTlsCipherSuite", s.MinTLSCipherSuite) populate(objectMap, "minTlsVersion", s.MinTLSVersion) populate(objectMap, "minimumElasticInstanceCount", s.MinimumElasticInstanceCount) populate(objectMap, "netFrameworkVersion", s.NetFrameworkVersion) @@ -17640,6 +18399,7 @@ func (s SiteConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "requestTracingEnabled", s.RequestTracingEnabled) populateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) populate(objectMap, "scmIpSecurityRestrictions", s.ScmIPSecurityRestrictions) + populate(objectMap, "scmIpSecurityRestrictionsDefaultAction", s.ScmIPSecurityRestrictionsDefaultAction) populate(objectMap, "scmIpSecurityRestrictionsUseMain", s.ScmIPSecurityRestrictionsUseMain) populate(objectMap, "scmMinTlsVersion", s.ScmMinTLSVersion) populate(objectMap, "scmType", s.ScmType) @@ -17713,6 +18473,9 @@ func (s *SiteConfig) UnmarshalJSON(data []byte) error { case "documentRoot": err = unpopulate(val, "DocumentRoot", &s.DocumentRoot) delete(rawMsg, key) + case "elasticWebAppScaleLimit": + err = unpopulate(val, "ElasticWebAppScaleLimit", &s.ElasticWebAppScaleLimit) + delete(rawMsg, key) case "experiments": err = unpopulate(val, "Experiments", &s.Experiments) delete(rawMsg, key) @@ -17740,6 +18503,9 @@ func (s *SiteConfig) UnmarshalJSON(data []byte) error { case "ipSecurityRestrictions": err = unpopulate(val, "IPSecurityRestrictions", &s.IPSecurityRestrictions) delete(rawMsg, key) + case "ipSecurityRestrictionsDefaultAction": + err = unpopulate(val, "IPSecurityRestrictionsDefaultAction", &s.IPSecurityRestrictionsDefaultAction) + delete(rawMsg, key) case "javaContainer": err = unpopulate(val, "JavaContainer", &s.JavaContainer) delete(rawMsg, key) @@ -17776,6 +18542,12 @@ func (s *SiteConfig) UnmarshalJSON(data []byte) error { case "managedServiceIdentityId": err = unpopulate(val, "ManagedServiceIdentityID", &s.ManagedServiceIdentityID) delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &s.Metadata) + delete(rawMsg, key) + case "minTlsCipherSuite": + err = unpopulate(val, "MinTLSCipherSuite", &s.MinTLSCipherSuite) + delete(rawMsg, key) case "minTlsVersion": err = unpopulate(val, "MinTLSVersion", &s.MinTLSVersion) delete(rawMsg, key) @@ -17827,6 +18599,9 @@ func (s *SiteConfig) UnmarshalJSON(data []byte) error { case "scmIpSecurityRestrictions": err = unpopulate(val, "ScmIPSecurityRestrictions", &s.ScmIPSecurityRestrictions) delete(rawMsg, key) + case "scmIpSecurityRestrictionsDefaultAction": + err = unpopulate(val, "ScmIPSecurityRestrictionsDefaultAction", &s.ScmIPSecurityRestrictionsDefaultAction) + delete(rawMsg, key) case "scmIpSecurityRestrictionsUseMain": err = unpopulate(val, "ScmIPSecurityRestrictionsUseMain", &s.ScmIPSecurityRestrictionsUseMain) delete(rawMsg, key) @@ -18092,6 +18867,198 @@ func (s *SiteConfigurationSnapshotInfoProperties) UnmarshalJSON(data []byte) err return nil } +// MarshalJSON implements the json.Marshaller interface for type SiteContainer. +func (s SiteContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteContainer. +func (s *SiteContainer) 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 "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + 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 SiteContainerCollection. +func (s SiteContainerCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteContainerCollection. +func (s *SiteContainerCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + 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 SiteContainerProperties. +func (s SiteContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authType", s.AuthType) + populateTimeRFC3339(objectMap, "createdTime", s.CreatedTime) + populate(objectMap, "environmentVariables", s.EnvironmentVariables) + populate(objectMap, "image", s.Image) + populate(objectMap, "isMain", s.IsMain) + populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populate(objectMap, "passwordSecret", s.PasswordSecret) + populate(objectMap, "startUpCommand", s.StartUpCommand) + populate(objectMap, "targetPort", s.TargetPort) + populate(objectMap, "userManagedIdentityClientId", s.UserManagedIdentityClientID) + populate(objectMap, "userName", s.UserName) + populate(objectMap, "volumeMounts", s.VolumeMounts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteContainerProperties. +func (s *SiteContainerProperties) 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 "authType": + err = unpopulate(val, "AuthType", &s.AuthType) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &s.CreatedTime) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &s.EnvironmentVariables) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &s.Image) + delete(rawMsg, key) + case "isMain": + err = unpopulate(val, "IsMain", &s.IsMain) + delete(rawMsg, key) + case "lastModifiedTime": + err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + delete(rawMsg, key) + case "passwordSecret": + err = unpopulate(val, "PasswordSecret", &s.PasswordSecret) + delete(rawMsg, key) + case "startUpCommand": + err = unpopulate(val, "StartUpCommand", &s.StartUpCommand) + delete(rawMsg, key) + case "targetPort": + err = unpopulate(val, "TargetPort", &s.TargetPort) + delete(rawMsg, key) + case "userManagedIdentityClientId": + err = unpopulate(val, "UserManagedIdentityClientID", &s.UserManagedIdentityClientID) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &s.UserName) + delete(rawMsg, key) + case "volumeMounts": + err = unpopulate(val, "VolumeMounts", &s.VolumeMounts) + 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 SiteDNSConfig. +func (s SiteDNSConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dnsAltServer", s.DNSAltServer) + populate(objectMap, "dnsLegacySortOrder", s.DNSLegacySortOrder) + populate(objectMap, "dnsMaxCacheTimeout", s.DNSMaxCacheTimeout) + populate(objectMap, "dnsRetryAttemptCount", s.DNSRetryAttemptCount) + populate(objectMap, "dnsRetryAttemptTimeout", s.DNSRetryAttemptTimeout) + populate(objectMap, "dnsServers", s.DNSServers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteDNSConfig. +func (s *SiteDNSConfig) 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 "dnsAltServer": + err = unpopulate(val, "DNSAltServer", &s.DNSAltServer) + delete(rawMsg, key) + case "dnsLegacySortOrder": + err = unpopulate(val, "DNSLegacySortOrder", &s.DNSLegacySortOrder) + delete(rawMsg, key) + case "dnsMaxCacheTimeout": + err = unpopulate(val, "DNSMaxCacheTimeout", &s.DNSMaxCacheTimeout) + delete(rawMsg, key) + case "dnsRetryAttemptCount": + err = unpopulate(val, "DNSRetryAttemptCount", &s.DNSRetryAttemptCount) + delete(rawMsg, key) + case "dnsRetryAttemptTimeout": + err = unpopulate(val, "DNSRetryAttemptTimeout", &s.DNSRetryAttemptTimeout) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &s.DNSServers) + 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 SiteExtensionInfo. func (s SiteExtensionInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -18483,6 +19450,7 @@ func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "cloningInfo", s.CloningInfo) populate(objectMap, "containerSize", s.ContainerSize) populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) + populate(objectMap, "dnsConfiguration", s.DNSConfiguration) populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) populate(objectMap, "defaultHostName", s.DefaultHostName) populate(objectMap, "enabled", s.Enabled) @@ -18552,6 +19520,9 @@ func (s *SitePatchResourceProperties) UnmarshalJSON(data []byte) error { case "customDomainVerificationId": err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) delete(rawMsg, key) + case "dnsConfiguration": + err = unpopulate(val, "DNSConfiguration", &s.DNSConfiguration) + delete(rawMsg, key) case "dailyMemoryTimeQuota": err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) delete(rawMsg, key) @@ -18752,10 +19723,13 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "cloningInfo", s.CloningInfo) populate(objectMap, "containerSize", s.ContainerSize) populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) + populate(objectMap, "dnsConfiguration", s.DNSConfiguration) populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) + populate(objectMap, "daprConfig", s.DaprConfig) populate(objectMap, "defaultHostName", s.DefaultHostName) populate(objectMap, "enabled", s.Enabled) populate(objectMap, "enabledHostNames", s.EnabledHostNames) + populate(objectMap, "functionAppConfig", s.FunctionAppConfig) populate(objectMap, "httpsOnly", s.HTTPSOnly) populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) populate(objectMap, "hostNames", s.HostNames) @@ -18767,6 +19741,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isXenon", s.IsXenon) populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populate(objectMap, "managedEnvironmentId", s.ManagedEnvironmentID) populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) @@ -18774,6 +19749,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "redundancyMode", s.RedundancyMode) populate(objectMap, "repositorySiteName", s.RepositorySiteName) populate(objectMap, "reserved", s.Reserved) + populate(objectMap, "resourceConfig", s.ResourceConfig) populate(objectMap, "resourceGroup", s.ResourceGroup) populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) populate(objectMap, "serverFarmId", s.ServerFarmID) @@ -18786,9 +19762,11 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) populate(objectMap, "usageState", s.UsageState) populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) + populate(objectMap, "vnetBackupRestoreEnabled", s.VnetBackupRestoreEnabled) populate(objectMap, "vnetContentShareEnabled", s.VnetContentShareEnabled) populate(objectMap, "vnetImagePullEnabled", s.VnetImagePullEnabled) populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) + populate(objectMap, "workloadProfileName", s.WorkloadProfileName) return json.Marshal(objectMap) } @@ -18825,9 +19803,15 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "customDomainVerificationId": err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) delete(rawMsg, key) + case "dnsConfiguration": + err = unpopulate(val, "DNSConfiguration", &s.DNSConfiguration) + delete(rawMsg, key) case "dailyMemoryTimeQuota": err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) delete(rawMsg, key) + case "daprConfig": + err = unpopulate(val, "DaprConfig", &s.DaprConfig) + delete(rawMsg, key) case "defaultHostName": err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) delete(rawMsg, key) @@ -18837,6 +19821,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "enabledHostNames": err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) delete(rawMsg, key) + case "functionAppConfig": + err = unpopulate(val, "FunctionAppConfig", &s.FunctionAppConfig) + delete(rawMsg, key) case "httpsOnly": err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) delete(rawMsg, key) @@ -18870,6 +19857,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "lastModifiedTimeUtc": err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) delete(rawMsg, key) + case "managedEnvironmentId": + err = unpopulate(val, "ManagedEnvironmentID", &s.ManagedEnvironmentID) + delete(rawMsg, key) case "maxNumberOfWorkers": err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) delete(rawMsg, key) @@ -18891,6 +19881,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "reserved": err = unpopulate(val, "Reserved", &s.Reserved) delete(rawMsg, key) + case "resourceConfig": + err = unpopulate(val, "ResourceConfig", &s.ResourceConfig) + delete(rawMsg, key) case "resourceGroup": err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) delete(rawMsg, key) @@ -18927,6 +19920,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "virtualNetworkSubnetId": err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) delete(rawMsg, key) + case "vnetBackupRestoreEnabled": + err = unpopulate(val, "VnetBackupRestoreEnabled", &s.VnetBackupRestoreEnabled) + delete(rawMsg, key) case "vnetContentShareEnabled": err = unpopulate(val, "VnetContentShareEnabled", &s.VnetContentShareEnabled) delete(rawMsg, key) @@ -18936,6 +19932,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "vnetRouteAllEnabled": err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) delete(rawMsg, key) + case "workloadProfileName": + err = unpopulate(val, "WorkloadProfileName", &s.WorkloadProfileName) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -19967,6 +20966,7 @@ func (s StaticSite) MarshalJSON() ([]byte, error) { populate(objectMap, "buildProperties", s.BuildProperties) populate(objectMap, "contentDistributionEndpoint", s.ContentDistributionEndpoint) populate(objectMap, "customDomains", s.CustomDomains) + populate(objectMap, "databaseConnections", s.DatabaseConnections) populate(objectMap, "defaultHostname", s.DefaultHostname) populate(objectMap, "enterpriseGradeCdnStatus", s.EnterpriseGradeCdnStatus) populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) @@ -20006,6 +21006,9 @@ func (s *StaticSite) UnmarshalJSON(data []byte) error { case "customDomains": err = unpopulate(val, "CustomDomains", &s.CustomDomains) delete(rawMsg, key) + case "databaseConnections": + err = unpopulate(val, "DatabaseConnections", &s.DatabaseConnections) + delete(rawMsg, key) case "defaultHostname": err = unpopulate(val, "DefaultHostname", &s.DefaultHostname) delete(rawMsg, key) @@ -20050,23 +21053,121 @@ func (s *StaticSite) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type StaticSiteARMResource. -func (s StaticSiteARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type StaticSiteARMResource. +func (s StaticSiteARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteARMResource. +func (s *StaticSiteARMResource) 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 "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + 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 StaticSiteBasicAuthPropertiesARMResource. +func (s StaticSiteBasicAuthPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBasicAuthPropertiesARMResource. +func (s *StaticSiteBasicAuthPropertiesARMResource) 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 "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + 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 StaticSiteBasicAuthPropertiesARMResourceProperties. +func (s StaticSiteBasicAuthPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) + populate(objectMap, "applicableEnvironmentsMode", s.ApplicableEnvironmentsMode) + populate(objectMap, "environments", s.Environments) + populate(objectMap, "password", s.Password) + populate(objectMap, "secretState", s.SecretState) + populate(objectMap, "secretUrl", s.SecretURL) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteARMResource. -func (s *StaticSiteARMResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBasicAuthPropertiesARMResourceProperties. +func (s *StaticSiteBasicAuthPropertiesARMResourceProperties) 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) @@ -20074,32 +21175,51 @@ func (s *StaticSiteARMResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &s.Kind) + case "applicableEnvironmentsMode": + err = unpopulate(val, "ApplicableEnvironmentsMode", &s.ApplicableEnvironmentsMode) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) + case "environments": + err = unpopulate(val, "Environments", &s.Environments) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) + case "password": + err = unpopulate(val, "Password", &s.Password) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) + case "secretState": + err = unpopulate(val, "SecretState", &s.SecretState) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &s.SKU) + case "secretUrl": + err = unpopulate(val, "SecretURL", &s.SecretURL) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBasicAuthPropertiesCollection. +func (s StaticSiteBasicAuthPropertiesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBasicAuthPropertiesCollection. +func (s *StaticSiteBasicAuthPropertiesCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) + case "value": + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -20157,6 +21277,7 @@ func (s StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "buildId", s.BuildID) populateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) + populate(objectMap, "databaseConnections", s.DatabaseConnections) populate(objectMap, "hostname", s.Hostname) populateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) populate(objectMap, "linkedBackends", s.LinkedBackends) @@ -20182,6 +21303,9 @@ func (s *StaticSiteBuildARMResourceProperties) UnmarshalJSON(data []byte) error case "createdTimeUtc": err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) delete(rawMsg, key) + case "databaseConnections": + err = unpopulate(val, "DatabaseConnections", &s.DatabaseConnections) + delete(rawMsg, key) case "hostname": err = unpopulate(val, "Hostname", &s.Hostname) delete(rawMsg, key) @@ -20515,6 +21639,41 @@ func (s *StaticSiteCustomDomainRequestPropertiesARMResourceProperties) Unmarshal return nil } +// MarshalJSON implements the json.Marshaller interface for type StaticSiteDatabaseConnectionConfigurationFileOverview. +func (s StaticSiteDatabaseConnectionConfigurationFileOverview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "contents", s.Contents) + populate(objectMap, "fileName", s.FileName) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteDatabaseConnectionConfigurationFileOverview. +func (s *StaticSiteDatabaseConnectionConfigurationFileOverview) 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 "contents": + err = unpopulate(val, "Contents", &s.Contents) + delete(rawMsg, key) + case "fileName": + err = unpopulate(val, "FileName", &s.FileName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + 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 StaticSiteFunctionOverviewARMResource. func (s StaticSiteFunctionOverviewARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -23869,6 +25028,45 @@ func (v *VnetValidationTestFailureProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type VolumeMount. +func (v VolumeMount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerMountPath", v.ContainerMountPath) + populate(objectMap, "data", v.Data) + populate(objectMap, "readOnly", v.ReadOnly) + populate(objectMap, "volumeSubPath", v.VolumeSubPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeMount. +func (v *VolumeMount) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerMountPath": + err = unpopulate(val, "ContainerMountPath", &v.ContainerMountPath) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &v.Data) + delete(rawMsg, key) + case "readOnly": + err = unpopulate(val, "ReadOnly", &v.ReadOnly) + delete(rawMsg, key) + case "volumeSubPath": + err = unpopulate(val, "VolumeSubPath", &v.VolumeSubPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WebAppCollection. func (w WebAppCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -24662,6 +25860,154 @@ func (w *Workflow) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkflowArtifacts. +func (w WorkflowArtifacts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appSettings", &w.AppSettings) + populate(objectMap, "files", w.Files) + populate(objectMap, "filesToDelete", w.FilesToDelete) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowArtifacts. +func (w *WorkflowArtifacts) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettings": + err = unpopulate(val, "AppSettings", &w.AppSettings) + delete(rawMsg, key) + case "files": + err = unpopulate(val, "Files", &w.Files) + delete(rawMsg, key) + case "filesToDelete": + err = unpopulate(val, "FilesToDelete", &w.FilesToDelete) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowEnvelope. +func (w WorkflowEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowEnvelope. +func (w *WorkflowEnvelope) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowEnvelopeCollection. +func (w WorkflowEnvelopeCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowEnvelopeCollection. +func (w *WorkflowEnvelopeCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowEnvelopeProperties. +func (w WorkflowEnvelopeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "files", w.Files) + populate(objectMap, "flowState", w.FlowState) + populate(objectMap, "health", w.Health) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowEnvelopeProperties. +func (w *WorkflowEnvelopeProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "files": + err = unpopulate(val, "Files", &w.Files) + delete(rawMsg, key) + case "flowState": + err = unpopulate(val, "FlowState", &w.FlowState) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &w.Health) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkflowFilter. func (w WorkflowFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -24689,6 +26035,37 @@ func (w *WorkflowFilter) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkflowHealth. +func (w WorkflowHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", w.Error) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowHealth. +func (w *WorkflowHealth) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkflowListResult. func (w WorkflowListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) diff --git a/sdk/resourcemanager/appservice/armappservice/plans_client.go b/sdk/resourcemanager/appservice/armappservice/plans_client.go index b95b8e8a8375..94a552ddc9b7 100644 --- a/sdk/resourcemanager/appservice/armappservice/plans_client.go +++ b/sdk/resourcemanager/appservice/armappservice/plans_client.go @@ -58,7 +58,7 @@ func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreateOrUpdate - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // appServicePlan - Details of the App Service plan. @@ -78,7 +78,7 @@ func (client *PlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // CreateOrUpdate - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *PlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) if err != nil { @@ -114,7 +114,7 @@ func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appServicePlan) @@ -122,7 +122,7 @@ func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, reso // CreateOrUpdateVnetRoute - Description for Create or update a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -173,7 +173,7 @@ func (client *PlansClient) createOrUpdateVnetRouteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, route) @@ -190,7 +190,7 @@ func (client *PlansClient) createOrUpdateVnetRouteHandleResponse(resp *http.Resp // Delete - Description for Delete an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. @@ -229,7 +229,7 @@ func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,7 +237,7 @@ func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGrou // DeleteHybridConnection - Description for Delete a Hybrid Connection in use in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // namespaceName - Name of the Service Bus namespace. @@ -287,7 +287,7 @@ func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,7 +295,7 @@ func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Conte // DeleteVnetRoute - Description for Delete a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -344,7 +344,7 @@ func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -352,7 +352,7 @@ func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, res // Get - Description for Get an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. @@ -391,7 +391,7 @@ func (client *PlansClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,7 +408,7 @@ func (client *PlansClient) getHandleResponse(resp *http.Response) (PlansClientGe // GetHybridConnection - Description for Retrieve a Hybrid Connection in use in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // namespaceName - Name of the Service Bus namespace. @@ -458,7 +458,7 @@ func (client *PlansClient) getHybridConnectionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -475,7 +475,7 @@ func (client *PlansClient) getHybridConnectionHandleResponse(resp *http.Response // GetHybridConnectionPlanLimit - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit @@ -515,7 +515,7 @@ func (client *PlansClient) getHybridConnectionPlanLimitCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -532,7 +532,7 @@ func (client *PlansClient) getHybridConnectionPlanLimitHandleResponse(resp *http // GetRouteForVnet - Description for Get a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -581,7 +581,7 @@ func (client *PlansClient) getRouteForVnetCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -598,7 +598,7 @@ func (client *PlansClient) getRouteForVnetHandleResponse(resp *http.Response) (P // GetServerFarmSKUs - Description for Gets all selectable SKUs for a given App Service Plan // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of App Service Plan // options - PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. @@ -637,7 +637,7 @@ func (client *PlansClient) getServerFarmSKUsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -654,7 +654,7 @@ func (client *PlansClient) getServerFarmSKUsHandleResponse(resp *http.Response) // GetVnetFromServerFarm - Description for Get a Virtual Network associated with an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -699,7 +699,7 @@ func (client *PlansClient) getVnetFromServerFarmCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -716,7 +716,7 @@ func (client *PlansClient) getVnetFromServerFarmHandleResponse(resp *http.Respon // GetVnetGateway - Description for Get a Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -765,7 +765,7 @@ func (client *PlansClient) getVnetGatewayCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -781,8 +781,7 @@ func (client *PlansClient) getVnetGatewayHandleResponse(resp *http.Response) (Pl } // NewListPager - Description for Get all App Service plans for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - PlansClientListOptions contains the optional parameters for the PlansClient.List method. func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtime.Pager[PlansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PlansClientListResponse]{ @@ -827,7 +826,7 @@ func (client *PlansClient) listCreateRequest(ctx context.Context, options *Plans if options != nil && options.Detailed != nil { reqQP.Set("detailed", strconv.FormatBool(*options.Detailed)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -843,8 +842,7 @@ func (client *PlansClient) listHandleResponse(resp *http.Response) (PlansClientL } // NewListByResourceGroupPager - Description for Get all App Service plans in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.ListByResourceGroup // method. @@ -892,7 +890,7 @@ func (client *PlansClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -909,7 +907,7 @@ func (client *PlansClient) listByResourceGroupHandleResponse(resp *http.Response // ListCapabilities - Description for List all capabilities of an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. @@ -948,7 +946,7 @@ func (client *PlansClient) listCapabilitiesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -965,7 +963,7 @@ func (client *PlansClient) listCapabilitiesHandleResponse(resp *http.Response) ( // ListHybridConnectionKeys - Description for Get the send key name and value of a Hybrid Connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // namespaceName - The name of the Service Bus namespace. @@ -1015,7 +1013,7 @@ func (client *PlansClient) listHybridConnectionKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1031,8 +1029,7 @@ func (client *PlansClient) listHybridConnectionKeysHandleResponse(resp *http.Res } // NewListHybridConnectionsPager - Description for Retrieve all Hybrid Connections in use in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.ListHybridConnections @@ -1085,7 +1082,7 @@ func (client *PlansClient) listHybridConnectionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1102,7 +1099,7 @@ func (client *PlansClient) listHybridConnectionsHandleResponse(resp *http.Respon // ListRoutesForVnet - Description for Get all routes that are associated with a Virtual Network in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -1146,7 +1143,7 @@ func (client *PlansClient) listRoutesForVnetCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1162,8 +1159,7 @@ func (client *PlansClient) listRoutesForVnetHandleResponse(resp *http.Response) } // NewListUsagesPager - Description for Gets server farm usage information -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of App Service Plan // options - PlansClientListUsagesOptions contains the optional parameters for the PlansClient.ListUsages method. @@ -1215,7 +1211,7 @@ func (client *PlansClient) listUsagesCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -1237,7 +1233,7 @@ func (client *PlansClient) listUsagesHandleResponse(resp *http.Response) (PlansC // ListVnets - Description for Get all Virtual Networks associated with an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. @@ -1276,7 +1272,7 @@ func (client *PlansClient) listVnetsCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1292,8 +1288,7 @@ func (client *PlansClient) listVnetsHandleResponse(resp *http.Response) (PlansCl } // NewListWebAppsPager - Description for Get all apps associated with an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.ListWebApps method. @@ -1345,7 +1340,7 @@ func (client *PlansClient) listWebAppsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } @@ -1372,8 +1367,7 @@ func (client *PlansClient) listWebAppsHandleResponse(resp *http.Response) (Plans } // NewListWebAppsByHybridConnectionPager - Description for Get all apps that use a Hybrid Connection in an App Service Plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // namespaceName - Name of the Hybrid Connection namespace. @@ -1436,7 +1430,7 @@ func (client *PlansClient) listWebAppsByHybridConnectionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1453,7 +1447,7 @@ func (client *PlansClient) listWebAppsByHybridConnectionHandleResponse(resp *htt // RebootWorker - Description for Reboot a worker machine in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // workerName - Name of worker machine, which typically starts with RD. @@ -1497,7 +1491,7 @@ func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1505,7 +1499,7 @@ func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resour // RestartWebApps - Description for Restart all apps in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // options - PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. @@ -1547,7 +1541,7 @@ func (client *PlansClient) restartWebAppsCreateRequest(ctx context.Context, reso if options != nil && options.SoftRestart != nil { reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1555,7 +1549,7 @@ func (client *PlansClient) restartWebAppsCreateRequest(ctx context.Context, reso // Update - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // appServicePlan - Details of the App Service plan. @@ -1595,7 +1589,7 @@ func (client *PlansClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appServicePlan) @@ -1612,7 +1606,7 @@ func (client *PlansClient) updateHandleResponse(resp *http.Response) (PlansClien // UpdateVnetGateway - Description for Update a Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -1662,7 +1656,7 @@ func (client *PlansClient) updateVnetGatewayCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -1679,7 +1673,7 @@ func (client *PlansClient) updateVnetGatewayHandleResponse(resp *http.Response) // UpdateVnetRoute - Description for Create or update a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the App Service plan. // vnetName - Name of the Virtual Network. @@ -1729,7 +1723,7 @@ func (client *PlansClient) updateVnetRouteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, route) diff --git a/sdk/resourcemanager/appservice/armappservice/provider_client.go b/sdk/resourcemanager/appservice/armappservice/provider_client.go index 39ef53d7e04e..a22b5b12a2f7 100644 --- a/sdk/resourcemanager/appservice/armappservice/provider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/provider_client.go @@ -56,8 +56,7 @@ func NewProviderClient(subscriptionID string, credential azcore.TokenCredential, } // NewGetAvailableStacksPager - Description for Get available application frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.GetAvailableStacks // method. func (client *ProviderClient) NewGetAvailableStacksPager(options *ProviderClientGetAvailableStacksOptions) *runtime.Pager[ProviderClientGetAvailableStacksResponse] { @@ -99,7 +98,7 @@ func (client *ProviderClient) getAvailableStacksCreateRequest(ctx context.Contex if options != nil && options.OSTypeSelected != nil { reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,8 +114,7 @@ func (client *ProviderClient) getAvailableStacksHandleResponse(resp *http.Respon } // NewGetAvailableStacksOnPremPager - Description for Get available application frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.GetAvailableStacksOnPrem // method. func (client *ProviderClient) NewGetAvailableStacksOnPremPager(options *ProviderClientGetAvailableStacksOnPremOptions) *runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse] { @@ -162,7 +160,7 @@ func (client *ProviderClient) getAvailableStacksOnPremCreateRequest(ctx context. if options != nil && options.OSTypeSelected != nil { reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,8 +176,7 @@ func (client *ProviderClient) getAvailableStacksOnPremHandleResponse(resp *http. } // NewGetFunctionAppStacksPager - Description for Get available Function app frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacks // method. func (client *ProviderClient) NewGetFunctionAppStacksPager(options *ProviderClientGetFunctionAppStacksOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksResponse] { @@ -221,7 +218,7 @@ func (client *ProviderClient) getFunctionAppStacksCreateRequest(ctx context.Cont if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,8 +235,7 @@ func (client *ProviderClient) getFunctionAppStacksHandleResponse(resp *http.Resp // NewGetFunctionAppStacksForLocationPager - Description for Get available Function app frameworks and their versions for // location -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // location - Function App stack location. // options - ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacksForLocation // method. @@ -286,7 +282,7 @@ func (client *ProviderClient) getFunctionAppStacksForLocationCreateRequest(ctx c if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,8 +298,7 @@ func (client *ProviderClient) getFunctionAppStacksForLocationHandleResponse(resp } // NewGetWebAppStacksPager - Description for Get available Web app frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.GetWebAppStacks // method. func (client *ProviderClient) NewGetWebAppStacksPager(options *ProviderClientGetWebAppStacksOptions) *runtime.Pager[ProviderClientGetWebAppStacksResponse] { @@ -345,7 +340,7 @@ func (client *ProviderClient) getWebAppStacksCreateRequest(ctx context.Context, if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -361,8 +356,7 @@ func (client *ProviderClient) getWebAppStacksHandleResponse(resp *http.Response) } // NewGetWebAppStacksForLocationPager - Description for Get available Web app frameworks and their versions for location -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // location - Web App stack location. // options - ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetWebAppStacksForLocation // method. @@ -409,7 +403,7 @@ func (client *ProviderClient) getWebAppStacksForLocationCreateRequest(ctx contex if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -426,8 +420,7 @@ func (client *ProviderClient) getWebAppStacksForLocationHandleResponse(resp *htt // NewListOperationsPager - Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes // resource metric definitions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.ListOperations method. func (client *ProviderClient) NewListOperationsPager(options *ProviderClientListOperationsOptions) *runtime.Pager[ProviderClientListOperationsResponse] { return runtime.NewPager(runtime.PagingHandler[ProviderClientListOperationsResponse]{ @@ -465,7 +458,7 @@ func (client *ProviderClient) listOperationsCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go deleted file mode 100644 index e5c58d2c5508..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/provider_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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetFunctionAppStacks.json -func ExampleProviderClient_NewGetFunctionAppStacksPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetFunctionAppStacksPager(&armappservice.ProviderClientGetFunctionAppStacksOptions{StackOsType: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetFunctionAppStacksForLocation.json -func ExampleProviderClient_NewGetFunctionAppStacksForLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetFunctionAppStacksForLocationPager("westus", - &armappservice.ProviderClientGetFunctionAppStacksForLocationOptions{StackOsType: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebAppStacksForLocation.json -func ExampleProviderClient_NewGetWebAppStacksForLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetWebAppStacksForLocationPager("westus", - &armappservice.ProviderClientGetWebAppStacksForLocationOptions{StackOsType: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListOperations.json -func ExampleProviderClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebAppStacks.json -func ExampleProviderClient_NewGetWebAppStacksPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetWebAppStacksPager(&armappservice.ProviderClientGetWebAppStacksOptions{StackOsType: 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/appservice/armappservice/recommendations_client.go b/sdk/resourcemanager/appservice/armappservice/recommendations_client.go index 38438c57b16b..f1817dcb1d0f 100644 --- a/sdk/resourcemanager/appservice/armappservice/recommendations_client.go +++ b/sdk/resourcemanager/appservice/armappservice/recommendations_client.go @@ -58,7 +58,7 @@ func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCred // DisableAllForHostingEnvironment - Description for Disable all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // environmentName - Name of the app. // options - RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment @@ -99,7 +99,7 @@ func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateReques } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,7 +107,7 @@ func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateReques // DisableAllForWebApp - Description for Disable all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Name of the app. // options - RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp @@ -147,7 +147,7 @@ func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -155,7 +155,7 @@ func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx contex // DisableRecommendationForHostingEnvironment - Description for Disables the specific rule for a web site permanently. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // environmentName - Site name // name - Rule name @@ -201,7 +201,7 @@ func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentC } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +209,7 @@ func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentC // DisableRecommendationForSite - Description for Disables the specific rule for a web site permanently. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site name // name - Rule name @@ -254,7 +254,7 @@ func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(c // DisableRecommendationForSubscription - Description for Disables the specified rule so it will not apply to a subscription // in the future. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // name - Rule name // options - RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription // method. @@ -298,7 +298,7 @@ func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateR // GetRuleDetailsByHostingEnvironment - Description for Get a recommendation rule for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // hostingEnvironmentName - Name of the hosting environment. // name - Name of the recommendation. @@ -357,7 +357,7 @@ func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentCreateReq if options != nil && options.RecommendationID != nil { reqQP.Set("recommendationId", *options.RecommendationID) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -374,7 +374,7 @@ func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentHandleRes // GetRuleDetailsByWebApp - Description for Get a recommendation rule for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Name of the app. // name - Name of the recommendation. @@ -425,7 +425,7 @@ func (client *RecommendationsClient) getRuleDetailsByWebAppCreateRequest(ctx con if options != nil && options.RecommendationID != nil { reqQP.Set("recommendationId", *options.RecommendationID) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -441,8 +441,7 @@ func (client *RecommendationsClient) getRuleDetailsByWebAppHandleResponse(resp * } // NewListPager - Description for List all recommendations for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.List method. func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListResponse]{ @@ -487,7 +486,7 @@ func (client *RecommendationsClient) listCreateRequest(ctx context.Context, opti if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -509,8 +508,7 @@ func (client *RecommendationsClient) listHandleResponse(resp *http.Response) (Re // NewListHistoryForHostingEnvironmentPager - Description for Get past recommendations for an app, optionally specified by // the time range. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // hostingEnvironmentName - Name of the hosting environment. // options - RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ListHistoryForHostingEnvironment @@ -566,7 +564,7 @@ func (client *RecommendationsClient) listHistoryForHostingEnvironmentCreateReque if options != nil && options.ExpiredOnly != nil { reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -587,8 +585,7 @@ func (client *RecommendationsClient) listHistoryForHostingEnvironmentHandleRespo } // NewListHistoryForWebAppPager - Description for Get past recommendations for an app, optionally specified by the time range. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Name of the app. // options - RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.ListHistoryForWebApp @@ -644,7 +641,7 @@ func (client *RecommendationsClient) listHistoryForWebAppCreateRequest(ctx conte if options != nil && options.ExpiredOnly != nil { reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -665,8 +662,7 @@ func (client *RecommendationsClient) listHistoryForWebAppHandleResponse(resp *ht } // NewListRecommendedRulesForHostingEnvironmentPager - Description for Get all recommendations for a hosting environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // hostingEnvironmentName - Name of the app. // options - RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the @@ -722,7 +718,7 @@ func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentCr if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -743,8 +739,7 @@ func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentHa } // NewListRecommendedRulesForWebAppPager - Description for Get all recommendations for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Name of the app. // options - RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.ListRecommendedRulesForWebApp @@ -800,7 +795,7 @@ func (client *RecommendationsClient) listRecommendedRulesForWebAppCreateRequest( if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -822,7 +817,7 @@ func (client *RecommendationsClient) listRecommendedRulesForWebAppHandleResponse // ResetAllFilters - Description for Reset all recommendation opt-out settings for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters // method. func (client *RecommendationsClient) ResetAllFilters(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (RecommendationsClientResetAllFiltersResponse, error) { @@ -852,7 +847,7 @@ func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -860,7 +855,7 @@ func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Co // ResetAllFiltersForHostingEnvironment - Description for Reset all recommendation opt-out settings for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // environmentName - Name of the app. // options - RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment @@ -901,7 +896,7 @@ func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateR } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -909,7 +904,7 @@ func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateR // ResetAllFiltersForWebApp - Description for Reset all recommendation opt-out settings for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Name of the app. // options - RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp @@ -949,7 +944,7 @@ func (client *RecommendationsClient) resetAllFiltersForWebAppCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go index 8b1c1753cd55..7630e7d75f8a 100644 --- a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go +++ b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go @@ -57,7 +57,7 @@ func NewResourceHealthMetadataClient(subscriptionID string, credential azcore.To // GetBySite - Description for Gets the category of ResourceHealthMetadata to use for the given site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app // options - ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite @@ -97,7 +97,7 @@ func (client *ResourceHealthMetadataClient) getBySiteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ func (client *ResourceHealthMetadataClient) getBySiteHandleResponse(resp *http.R // GetBySiteSlot - Description for Gets the category of ResourceHealthMetadata to use for the given site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app // slot - Name of web app slot. If not specified then will default to production slot. @@ -159,7 +159,7 @@ func (client *ResourceHealthMetadataClient) getBySiteSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -175,8 +175,7 @@ func (client *ResourceHealthMetadataClient) getBySiteSlotHandleResponse(resp *ht } // NewListPager - Description for List all ResourceHealthMetadata for all sites in the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.List // method. func (client *ResourceHealthMetadataClient) NewListPager(options *ResourceHealthMetadataClientListOptions) *runtime.Pager[ResourceHealthMetadataClientListResponse] { @@ -219,7 +218,7 @@ func (client *ResourceHealthMetadataClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,8 +235,7 @@ func (client *ResourceHealthMetadataClient) listHandleResponse(resp *http.Respon // NewListByResourceGroupPager - Description for List all ResourceHealthMetadata for all sites in the resource group in the // subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.ListByResourceGroup // method. @@ -285,7 +283,7 @@ func (client *ResourceHealthMetadataClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -301,8 +299,7 @@ func (client *ResourceHealthMetadataClient) listByResourceGroupHandleResponse(re } // NewListBySitePager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.ListBySite @@ -355,7 +352,7 @@ func (client *ResourceHealthMetadataClient) listBySiteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,8 +368,7 @@ func (client *ResourceHealthMetadataClient) listBySiteHandleResponse(resp *http. } // NewListBySiteSlotPager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -430,7 +426,7 @@ func (client *ResourceHealthMetadataClient) listBySiteSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go deleted file mode 100644 index 8dfef2125aa9..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go +++ /dev/null @@ -1,164 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListResourceHealthMetadataBySubscription.json -func ExampleResourceHealthMetadataClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListResourceHealthMetadataByResourceGroup.json -func ExampleResourceHealthMetadataClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("Default-Web-NorthCentralUS", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_NewListBySitePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySitePager("Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_GetBySite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBySite(ctx, - "Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_NewListBySiteSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySiteSlotPager("Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_GetBySiteSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBySiteSlot(ctx, - "Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/response_types.go b/sdk/resourcemanager/appservice/armappservice/response_types.go index 7f36f56a1a6e..64e29f3a2a76 100644 --- a/sdk/resourcemanager/appservice/armappservice/response_types.go +++ b/sdk/resourcemanager/appservice/armappservice/response_types.go @@ -540,11 +540,6 @@ type EnvironmentsClientListAppServicePlansResponse struct { PlanCollection } -// EnvironmentsClientListByResourceGroupResponse contains the response from method EnvironmentsClient.ListByResourceGroup. -type EnvironmentsClientListByResourceGroupResponse struct { - EnvironmentCollection -} - // EnvironmentsClientListCapacitiesResponse contains the response from method EnvironmentsClient.ListCapacities. type EnvironmentsClientListCapacitiesResponse struct { StampCapacityCollection @@ -677,6 +672,11 @@ type EnvironmentsClientUpgradeResponse struct { // placeholder for future response values } +// GetUsagesInLocationClientListResponse contains the response from method GetUsagesInLocationClient.List. +type GetUsagesInLocationClientListResponse struct { + CsmUsageQuotaCollection +} + // GlobalClientGetDeletedWebAppResponse contains the response from method GlobalClient.GetDeletedWebApp. type GlobalClientGetDeletedWebAppResponse struct { DeletedSite @@ -1008,6 +1008,21 @@ type StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse struct { RemotePrivateEndpointConnectionARMResource } +// StaticSitesClientCreateOrUpdateBasicAuthResponse contains the response from method StaticSitesClient.CreateOrUpdateBasicAuth. +type StaticSitesClientCreateOrUpdateBasicAuthResponse struct { + StaticSiteBasicAuthPropertiesARMResource +} + +// StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.CreateOrUpdateBuildDatabaseConnection. +type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse struct { + DatabaseConnection +} + +// StaticSitesClientCreateOrUpdateDatabaseConnectionResponse contains the response from method StaticSitesClient.CreateOrUpdateDatabaseConnection. +type StaticSitesClientCreateOrUpdateDatabaseConnectionResponse struct { + DatabaseConnection +} + // StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteAppSettings. type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse struct { StringDictionary @@ -1053,6 +1068,16 @@ type StaticSitesClientCreateZipDeploymentForStaticSiteResponse struct { // placeholder for future response values } +// StaticSitesClientDeleteBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.DeleteBuildDatabaseConnection. +type StaticSitesClientDeleteBuildDatabaseConnectionResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeleteDatabaseConnectionResponse contains the response from method StaticSitesClient.DeleteDatabaseConnection. +type StaticSitesClientDeleteDatabaseConnectionResponse struct { + // placeholder for future response values +} + // StaticSitesClientDeletePrivateEndpointConnectionResponse contains the response from method StaticSitesClient.DeletePrivateEndpointConnection. type StaticSitesClientDeletePrivateEndpointConnectionResponse struct { // Anything @@ -1099,6 +1124,51 @@ type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse struct // placeholder for future response values } +// StaticSitesClientGetBasicAuthResponse contains the response from method StaticSitesClient.GetBasicAuth. +type StaticSitesClientGetBasicAuthResponse struct { + StaticSiteBasicAuthPropertiesARMResource +} + +// StaticSitesClientGetBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnection. +type StaticSitesClientGetBuildDatabaseConnectionResponse struct { + DatabaseConnection +} + +// StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnectionWithDetails. +type StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse struct { + DatabaseConnection +} + +// StaticSitesClientGetBuildDatabaseConnectionsResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnections. +type StaticSitesClientGetBuildDatabaseConnectionsResponse struct { + DatabaseConnectionCollection +} + +// StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnectionsWithDetails. +type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse struct { + DatabaseConnectionCollection +} + +// StaticSitesClientGetDatabaseConnectionResponse contains the response from method StaticSitesClient.GetDatabaseConnection. +type StaticSitesClientGetDatabaseConnectionResponse struct { + DatabaseConnection +} + +// StaticSitesClientGetDatabaseConnectionWithDetailsResponse contains the response from method StaticSitesClient.GetDatabaseConnectionWithDetails. +type StaticSitesClientGetDatabaseConnectionWithDetailsResponse struct { + DatabaseConnection +} + +// StaticSitesClientGetDatabaseConnectionsResponse contains the response from method StaticSitesClient.GetDatabaseConnections. +type StaticSitesClientGetDatabaseConnectionsResponse struct { + DatabaseConnectionCollection +} + +// StaticSitesClientGetDatabaseConnectionsWithDetailsResponse contains the response from method StaticSitesClient.GetDatabaseConnectionsWithDetails. +type StaticSitesClientGetDatabaseConnectionsWithDetailsResponse struct { + DatabaseConnectionCollection +} + // StaticSitesClientGetLinkedBackendForBuildResponse contains the response from method StaticSitesClient.GetLinkedBackendForBuild. type StaticSitesClientGetLinkedBackendForBuildResponse struct { StaticSiteLinkedBackendARMResource @@ -1189,6 +1259,11 @@ type StaticSitesClientLinkBackendToBuildResponse struct { StaticSiteLinkedBackendARMResource } +// StaticSitesClientListBasicAuthResponse contains the response from method StaticSitesClient.ListBasicAuth. +type StaticSitesClientListBasicAuthResponse struct { + StaticSiteBasicAuthPropertiesCollection +} + // StaticSitesClientListResponse contains the response from method StaticSitesClient.List. type StaticSitesClientListResponse struct { StaticSiteCollection @@ -1274,6 +1349,16 @@ type StaticSitesClientUnlinkBackendResponse struct { // placeholder for future response values } +// StaticSitesClientUpdateBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.UpdateBuildDatabaseConnection. +type StaticSitesClientUpdateBuildDatabaseConnectionResponse struct { + DatabaseConnection +} + +// StaticSitesClientUpdateDatabaseConnectionResponse contains the response from method StaticSitesClient.UpdateDatabaseConnection. +type StaticSitesClientUpdateDatabaseConnectionResponse struct { + DatabaseConnection +} + // StaticSitesClientUpdateStaticSiteResponse contains the response from method StaticSitesClient.UpdateStaticSite. type StaticSitesClientUpdateStaticSiteResponse struct { StaticSiteARMResource @@ -1495,6 +1580,16 @@ type WebAppsClientCreateOrUpdateResponse struct { Site } +// WebAppsClientCreateOrUpdateSiteContainerResponse contains the response from method WebAppsClient.CreateOrUpdateSiteContainer. +type WebAppsClientCreateOrUpdateSiteContainerResponse struct { + SiteContainer +} + +// WebAppsClientCreateOrUpdateSiteContainerSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSiteContainerSlot. +type WebAppsClientCreateOrUpdateSiteContainerSlotResponse struct { + SiteContainer +} + // WebAppsClientCreateOrUpdateSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSlot. type WebAppsClientCreateOrUpdateSlotResponse struct { Site @@ -1717,6 +1812,16 @@ type WebAppsClientDeleteResponse struct { // placeholder for future response values } +// WebAppsClientDeleteSiteContainerResponse contains the response from method WebAppsClient.DeleteSiteContainer. +type WebAppsClientDeleteSiteContainerResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSiteContainerSlotResponse contains the response from method WebAppsClient.DeleteSiteContainerSlot. +type WebAppsClientDeleteSiteContainerSlotResponse struct { + // placeholder for future response values +} + // WebAppsClientDeleteSiteExtensionResponse contains the response from method WebAppsClient.DeleteSiteExtension. type WebAppsClientDeleteSiteExtensionResponse struct { // placeholder for future response values @@ -1772,6 +1877,16 @@ type WebAppsClientDeleteVnetConnectionSlotResponse struct { // placeholder for future response values } +// WebAppsClientDeployWorkflowArtifactsResponse contains the response from method WebAppsClient.DeployWorkflowArtifacts. +type WebAppsClientDeployWorkflowArtifactsResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeployWorkflowArtifactsSlotResponse contains the response from method WebAppsClient.DeployWorkflowArtifactsSlot. +type WebAppsClientDeployWorkflowArtifactsSlotResponse struct { + // placeholder for future response values +} + // WebAppsClientDiscoverBackupResponse contains the response from method WebAppsClient.DiscoverBackup. type WebAppsClientDiscoverBackupResponse struct { RestoreRequest @@ -2046,6 +2161,11 @@ type WebAppsClientGetInstanceProcessSlotResponse struct { ProcessInfo } +// WebAppsClientGetInstanceWorkflowSlotResponse contains the response from method WebAppsClient.GetInstanceWorkflowSlot. +type WebAppsClientGetInstanceWorkflowSlotResponse struct { + WorkflowEnvelope +} + // WebAppsClientGetMSDeployLogResponse contains the response from method WebAppsClient.GetMSDeployLog. type WebAppsClientGetMSDeployLogResponse struct { MSDeployLog @@ -2272,6 +2392,16 @@ type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse struct { APIKVReferenceCollection } +// WebAppsClientGetSiteContainerResponse contains the response from method WebAppsClient.GetSiteContainer. +type WebAppsClientGetSiteContainerResponse struct { + SiteContainer +} + +// WebAppsClientGetSiteContainerSlotResponse contains the response from method WebAppsClient.GetSiteContainerSlot. +type WebAppsClientGetSiteContainerSlotResponse struct { + SiteContainer +} + // WebAppsClientGetSiteExtensionResponse contains the response from method WebAppsClient.GetSiteExtension. type WebAppsClientGetSiteExtensionResponse struct { SiteExtensionInfo @@ -2384,6 +2514,11 @@ type WebAppsClientGetWebSiteContainerLogsSlotResponse struct { Body io.ReadCloser } +// WebAppsClientGetWorkflowResponse contains the response from method WebAppsClient.GetWorkflow. +type WebAppsClientGetWorkflowResponse struct { + WorkflowEnvelope +} + // WebAppsClientInstallSiteExtensionResponse contains the response from method WebAppsClient.InstallSiteExtension. type WebAppsClientInstallSiteExtensionResponse struct { SiteExtensionInfo @@ -2629,6 +2764,11 @@ type WebAppsClientListInstanceProcessesSlotResponse struct { ProcessInfoCollection } +// WebAppsClientListInstanceWorkflowsSlotResponse contains the response from method WebAppsClient.ListInstanceWorkflowsSlot. +type WebAppsClientListInstanceWorkflowsSlotResponse struct { + WorkflowEnvelopeCollection +} + // WebAppsClientListMetadataResponse contains the response from method WebAppsClient.ListMetadata. type WebAppsClientListMetadataResponse struct { StringDictionary @@ -2761,6 +2901,16 @@ type WebAppsClientListSiteBackupsSlotResponse struct { BackupItemCollection } +// WebAppsClientListSiteContainersResponse contains the response from method WebAppsClient.ListSiteContainers. +type WebAppsClientListSiteContainersResponse struct { + SiteContainerCollection +} + +// WebAppsClientListSiteContainersSlotResponse contains the response from method WebAppsClient.ListSiteContainersSlot. +type WebAppsClientListSiteContainersSlotResponse struct { + SiteContainerCollection +} + // WebAppsClientListSiteExtensionsResponse contains the response from method WebAppsClient.ListSiteExtensions. type WebAppsClientListSiteExtensionsResponse struct { SiteExtensionInfoCollection @@ -2898,6 +3048,21 @@ type WebAppsClientListWebJobsSlotResponse struct { WebJobCollection } +// WebAppsClientListWorkflowsConnectionsResponse contains the response from method WebAppsClient.ListWorkflowsConnections. +type WebAppsClientListWorkflowsConnectionsResponse struct { + WorkflowEnvelope +} + +// WebAppsClientListWorkflowsConnectionsSlotResponse contains the response from method WebAppsClient.ListWorkflowsConnectionsSlot. +type WebAppsClientListWorkflowsConnectionsSlotResponse struct { + WorkflowEnvelope +} + +// WebAppsClientListWorkflowsResponse contains the response from method WebAppsClient.ListWorkflows. +type WebAppsClientListWorkflowsResponse struct { + WorkflowEnvelopeCollection +} + // WebAppsClientMigrateMySQLResponse contains the response from method WebAppsClient.MigrateMySQL. type WebAppsClientMigrateMySQLResponse struct { Operation @@ -3387,6 +3552,11 @@ type WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse struct { DeploymentLocations } +// WebSiteManagementClientListAseRegionsResponse contains the response from method WebSiteManagementClient.ListAseRegions. +type WebSiteManagementClientListAseRegionsResponse struct { + AseRegionCollection +} + // WebSiteManagementClientListBillingMetersResponse contains the response from method WebSiteManagementClient.ListBillingMeters. type WebSiteManagementClientListBillingMetersResponse struct { BillingMeterCollection diff --git a/sdk/resourcemanager/appservice/armappservice/staticsites_client.go b/sdk/resourcemanager/appservice/armappservice/staticsites_client.go index d1d19b32f4b6..2979b83da3d0 100644 --- a/sdk/resourcemanager/appservice/armappservice/staticsites_client.go +++ b/sdk/resourcemanager/appservice/armappservice/staticsites_client.go @@ -58,14 +58,14 @@ func NewStaticSitesClient(subscriptionID string, credential azcore.TokenCredenti // BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // privateEndpointConnectionName - Name of the private endpoint connection. // privateEndpointWrapper - Request body. // options - StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the // StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection method. -func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error) { +func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { @@ -79,8 +79,8 @@ func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(c // ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { +// Generated from API version 2023-12-01 +func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { return nil, err @@ -96,7 +96,7 @@ func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx co } // approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. -func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { +func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -119,16 +119,210 @@ func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) } +// CreateOrUpdateBasicAuth - Description for Adds or updates basic auth for a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site. +// basicAuthName - name of the basic auth entry. +// basicAuthEnvelope - A JSON representation of the basic auth properties. +// options - StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth +// method. +func (client *StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource, options *StaticSitesClientCreateOrUpdateBasicAuthOptions) (StaticSitesClientCreateOrUpdateBasicAuthResponse, error) { + req, err := client.createOrUpdateBasicAuthCreateRequest(ctx, resourceGroupName, name, basicAuthName, basicAuthEnvelope, options) + if err != nil { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, runtime.NewResponseError(resp) + } + return client.createOrUpdateBasicAuthHandleResponse(resp) +} + +// createOrUpdateBasicAuthCreateRequest creates the CreateOrUpdateBasicAuth request. +func (client *StaticSitesClient) createOrUpdateBasicAuthCreateRequest(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource, options *StaticSitesClientCreateOrUpdateBasicAuthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if basicAuthName == "" { + return nil, errors.New("parameter basicAuthName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{basicAuthName}", url.PathEscape(string(basicAuthName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, basicAuthEnvelope) +} + +// createOrUpdateBasicAuthHandleResponse handles the CreateOrUpdateBasicAuth response. +func (client *StaticSitesClient) createOrUpdateBasicAuthHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateBasicAuthResponse, error) { + result := StaticSitesClientCreateOrUpdateBasicAuthResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBasicAuthPropertiesARMResource); err != nil { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + return result, nil +} + +// CreateOrUpdateBuildDatabaseConnection - Description for Create or update a database connection for a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// databaseConnectionName - Name of the database connection. +// databaseConnectionRequestEnvelope - A JSON representation of the database connection request properties +// options - StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection +// method. +func (client *StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse, error) { + req, err := client.createOrUpdateBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.createOrUpdateBuildDatabaseConnectionHandleResponse(resp) +} + +// createOrUpdateBuildDatabaseConnectionCreateRequest creates the CreateOrUpdateBuildDatabaseConnection request. +func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) +} + +// createOrUpdateBuildDatabaseConnectionHandleResponse handles the CreateOrUpdateBuildDatabaseConnection response. +func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse, error) { + result := StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + return result, nil +} + +// CreateOrUpdateDatabaseConnection - Description for Create or update a database connection for a static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// databaseConnectionName - Name of the database connection. +// databaseConnectionRequestEnvelope - A JSON representation of the database connection request properties +// options - StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection +// method. +func (client *StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateDatabaseConnectionResponse, error) { + req, err := client.createOrUpdateDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.createOrUpdateDatabaseConnectionHandleResponse(resp) +} + +// createOrUpdateDatabaseConnectionCreateRequest creates the CreateOrUpdateDatabaseConnection request. +func (client *StaticSitesClient) createOrUpdateDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) +} + +// createOrUpdateDatabaseConnectionHandleResponse handles the CreateOrUpdateDatabaseConnection response. +func (client *StaticSitesClient) createOrUpdateDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateDatabaseConnectionResponse, error) { + result := StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + return result, nil +} + // BeginCreateOrUpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an // existing static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site to create or update. // staticSiteEnvelope - A JSON representation of the staticsite properties. See example. @@ -149,7 +343,7 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSite(ctx context.Conte // CreateOrUpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an existing // static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) createOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*http.Response, error) { req, err := client.createOrUpdateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) if err != nil { @@ -185,7 +379,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) @@ -193,7 +387,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCreateRequest(ctx conte // CreateOrUpdateStaticSiteAppSettings - Description for Creates or updates the app settings of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // appSettings - The dictionary containing the static site app settings to update. @@ -234,7 +428,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -251,7 +445,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsHandleRespon // CreateOrUpdateStaticSiteBuildAppSettings - Description for Creates or updates the app settings of a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -297,7 +491,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -315,7 +509,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsHandleR // CreateOrUpdateStaticSiteBuildFunctionAppSettings - Description for Creates or updates the function app settings of a static // site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -361,7 +555,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSetting return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -379,7 +573,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSetting // BeginCreateOrUpdateStaticSiteCustomDomain - Description for Creates a new static site custom domain in an existing resource // group and static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // domainName - The custom domain to create. @@ -402,7 +596,7 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSiteCustomDomain(ctx c // CreateOrUpdateStaticSiteCustomDomain - Description for Creates a new static site custom domain in an existing resource // group and static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*http.Response, error) { req, err := client.createOrUpdateStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) if err != nil { @@ -442,7 +636,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomainCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) @@ -451,7 +645,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomainCreateReque // CreateOrUpdateStaticSiteFunctionAppSettings - Description for Creates or updates the function app settings of a static // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // appSettings - The dictionary containing the static site function app settings to update. @@ -492,7 +686,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -509,7 +703,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsHand // CreateUserRolesInvitationLink - Description for Creates an invitation link for a user with the role // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink @@ -549,7 +743,7 @@ func (client *StaticSitesClient) createUserRolesInvitationLinkCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserRolesInvitationEnvelope) @@ -566,7 +760,7 @@ func (client *StaticSitesClient) createUserRolesInvitationLinkHandleResponse(res // BeginCreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // staticSiteZipDeploymentEnvelope - A JSON representation of the StaticSiteZipDeployment properties. See example. @@ -586,7 +780,7 @@ func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSite(ctx conte // CreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) createZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*http.Response, error) { req, err := client.createZipDeploymentForStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) if err != nil { @@ -622,7 +816,7 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) @@ -631,7 +825,7 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteCreateRequest(c // BeginCreateZipDeploymentForStaticSiteBuild - Description for Deploys zipped content to a specific environment of a static // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - Name of the environment. @@ -652,7 +846,7 @@ func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSiteBuild(ctx // CreateZipDeploymentForStaticSiteBuild - Description for Deploys zipped content to a specific environment of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*http.Response, error) { req, err := client.createZipDeploymentForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) if err != nil { @@ -692,15 +886,126 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuildCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) } +// DeleteBuildDatabaseConnection - Delete a database connection for a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// databaseConnectionName - Name of the database connection. +// options - StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection +// method. +func (client *StaticSitesClient) DeleteBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientDeleteBuildDatabaseConnectionOptions) (StaticSitesClientDeleteBuildDatabaseConnectionResponse, error) { + req, err := client.deleteBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) + if err != nil { + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, nil +} + +// deleteBuildDatabaseConnectionCreateRequest creates the DeleteBuildDatabaseConnection request. +func (client *StaticSitesClient) deleteBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientDeleteBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteDatabaseConnection - Delete a database connection for a static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// databaseConnectionName - Name of the database connection. +// options - StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection +// method. +func (client *StaticSitesClient) DeleteDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientDeleteDatabaseConnectionOptions) (StaticSitesClientDeleteDatabaseConnectionResponse, error) { + req, err := client.deleteDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) + if err != nil { + return StaticSitesClientDeleteDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientDeleteDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return StaticSitesClientDeleteDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return StaticSitesClientDeleteDatabaseConnectionResponse{}, nil +} + +// deleteDatabaseConnectionCreateRequest creates the DeleteDatabaseConnection request. +func (client *StaticSitesClient) deleteDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientDeleteDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -720,7 +1025,7 @@ func (client *StaticSitesClient) BeginDeletePrivateEndpointConnection(ctx contex // DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { @@ -760,7 +1065,7 @@ func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -768,7 +1073,7 @@ func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ct // BeginDeleteStaticSite - Description for Deletes a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site to delete. // options - StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite @@ -787,7 +1092,7 @@ func (client *StaticSitesClient) BeginDeleteStaticSite(ctx context.Context, reso // DeleteStaticSite - Description for Deletes a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) deleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*http.Response, error) { req, err := client.deleteStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -823,7 +1128,7 @@ func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -831,7 +1136,7 @@ func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Conte // BeginDeleteStaticSiteBuild - Description for Deletes a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -851,7 +1156,7 @@ func (client *StaticSitesClient) BeginDeleteStaticSiteBuild(ctx context.Context, // DeleteStaticSiteBuild - Description for Deletes a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) deleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*http.Response, error) { req, err := client.deleteStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) if err != nil { @@ -891,7 +1196,7 @@ func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -899,7 +1204,7 @@ func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context. // BeginDeleteStaticSiteCustomDomain - Description for Deletes a custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // domainName - The custom domain to delete. @@ -919,7 +1224,7 @@ func (client *StaticSitesClient) BeginDeleteStaticSiteCustomDomain(ctx context.C // DeleteStaticSiteCustomDomain - Description for Deletes a custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) deleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*http.Response, error) { req, err := client.deleteStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) if err != nil { @@ -959,7 +1264,7 @@ func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -967,7 +1272,7 @@ func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx c // DeleteStaticSiteUser - Description for Deletes the user entry from the static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the staticsite. // authprovider - The auth provider for this user. @@ -1017,7 +1322,7 @@ func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1025,7 +1330,7 @@ func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.C // BeginDetachStaticSite - Description for Detaches a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site to detach. // options - StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite @@ -1044,7 +1349,7 @@ func (client *StaticSitesClient) BeginDetachStaticSite(ctx context.Context, reso // DetachStaticSite - Description for Detaches a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) detachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*http.Response, error) { req, err := client.detachStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -1080,38 +1385,629 @@ func (client *StaticSitesClient) detachStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DetachUserProvidedFunctionAppFromStaticSite - Description for Detach the user provided function app from the static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site. +// functionAppName - Name of the function app registered with the static site. +// options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the +// StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite method. +func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse, error) { + req, err := client.detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, runtime.NewResponseError(resp) + } + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, nil +} + +// detachUserProvidedFunctionAppFromStaticSiteCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSite request. +func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DetachUserProvidedFunctionAppFromStaticSiteBuild - Description for Detach the user provided function app from the static +// site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site. +// environmentName - The stage site identifier. +// functionAppName - Name of the function app registered with the static site build. +// options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for +// the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild method. +func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error) { + req, err := client.detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, runtime.NewResponseError(resp) + } + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, nil +} + +// detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSiteBuild request. +func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetBasicAuth - Description for Gets the basic auth properties for a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site. +// basicAuthName - name of the basic auth entry. +// options - StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth +// method. +func (client *StaticSitesClient) GetBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, options *StaticSitesClientGetBasicAuthOptions) (StaticSitesClientGetBasicAuthResponse, error) { + req, err := client.getBasicAuthCreateRequest(ctx, resourceGroupName, name, basicAuthName, options) + if err != nil { + return StaticSitesClientGetBasicAuthResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetBasicAuthResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetBasicAuthResponse{}, runtime.NewResponseError(resp) + } + return client.getBasicAuthHandleResponse(resp) +} + +// getBasicAuthCreateRequest creates the GetBasicAuth request. +func (client *StaticSitesClient) getBasicAuthCreateRequest(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, options *StaticSitesClientGetBasicAuthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if basicAuthName == "" { + return nil, errors.New("parameter basicAuthName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{basicAuthName}", url.PathEscape(string(basicAuthName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBasicAuthHandleResponse handles the GetBasicAuth response. +func (client *StaticSitesClient) getBasicAuthHandleResponse(resp *http.Response) (StaticSitesClientGetBasicAuthResponse, error) { + result := StaticSitesClientGetBasicAuthResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBasicAuthPropertiesARMResource); err != nil { + return StaticSitesClientGetBasicAuthResponse{}, err + } + return result, nil +} + +// GetBuildDatabaseConnection - Returns overview of a database connection for a static site build by name +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// databaseConnectionName - Name of the database connection. +// options - StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection +// method. +func (client *StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionOptions) (StaticSitesClientGetBuildDatabaseConnectionResponse, error) { + req, err := client.getBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.getBuildDatabaseConnectionHandleResponse(resp) +} + +// getBuildDatabaseConnectionCreateRequest creates the GetBuildDatabaseConnection request. +func (client *StaticSitesClient) getBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionHandleResponse handles the GetBuildDatabaseConnection response. +func (client *StaticSitesClient) getBuildDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + return result, nil +} + +// GetBuildDatabaseConnectionWithDetails - Returns details of a database connection for a static site build by name +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// databaseConnectionName - Name of the database connection. +// options - StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails +// method. +func (client *StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse, error) { + req, err := client.getBuildDatabaseConnectionWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, runtime.NewResponseError(resp) + } + return client.getBuildDatabaseConnectionWithDetailsHandleResponse(resp) +} + +// getBuildDatabaseConnectionWithDetailsCreateRequest creates the GetBuildDatabaseConnectionWithDetails request. +func (client *StaticSitesClient) getBuildDatabaseConnectionWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionWithDetailsHandleResponse handles the GetBuildDatabaseConnectionWithDetails response. +func (client *StaticSitesClient) getBuildDatabaseConnectionWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + return result, nil +} + +// NewGetBuildDatabaseConnectionsPager - Returns overviews of database connections for a static site build +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// options - StaticSitesClientGetBuildDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnections +// method. +func (client *StaticSitesClient) NewGetBuildDatabaseConnectionsPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsOptions) *runtime.Pager[StaticSitesClientGetBuildDatabaseConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetBuildDatabaseConnectionsResponse]{ + More: func(page StaticSitesClientGetBuildDatabaseConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetBuildDatabaseConnectionsResponse) (StaticSitesClientGetBuildDatabaseConnectionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.getBuildDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, runtime.NewResponseError(resp) + } + return client.getBuildDatabaseConnectionsHandleResponse(resp) + }, + }) +} + +// getBuildDatabaseConnectionsCreateRequest creates the GetBuildDatabaseConnections request. +func (client *StaticSitesClient) getBuildDatabaseConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionsHandleResponse handles the GetBuildDatabaseConnections response. +func (client *StaticSitesClient) getBuildDatabaseConnectionsHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionsResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err + } + return result, nil +} + +// NewGetBuildDatabaseConnectionsWithDetailsPager - Returns details of database connections for a static site build +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// options - StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionsWithDetails +// method. +func (client *StaticSitesClient) NewGetBuildDatabaseConnectionsWithDetailsPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions) *runtime.Pager[StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse]{ + More: func(page StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse) (StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.getBuildDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, runtime.NewResponseError(resp) + } + return client.getBuildDatabaseConnectionsWithDetailsHandleResponse(resp) + }, + }) +} + +// getBuildDatabaseConnectionsWithDetailsCreateRequest creates the GetBuildDatabaseConnectionsWithDetails request. +func (client *StaticSitesClient) getBuildDatabaseConnectionsWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionsWithDetailsHandleResponse handles the GetBuildDatabaseConnectionsWithDetails response. +func (client *StaticSitesClient) getBuildDatabaseConnectionsWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err + } + return result, nil +} + +// GetDatabaseConnection - Returns overview of a database connection for a static site by name +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// databaseConnectionName - Name of the database connection. +// options - StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection +// method. +func (client *StaticSitesClient) GetDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionOptions) (StaticSitesClientGetDatabaseConnectionResponse, error) { + req, err := client.getDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.getDatabaseConnectionHandleResponse(resp) +} + +// getDatabaseConnectionCreateRequest creates the GetDatabaseConnection request. +func (client *StaticSitesClient) getDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDatabaseConnectionHandleResponse handles the GetDatabaseConnection response. +func (client *StaticSitesClient) getDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionResponse, error) { + result := StaticSitesClientGetDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + return result, nil +} + +// GetDatabaseConnectionWithDetails - Returns details of a database connection for a static site by name +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// databaseConnectionName - Name of the database connection. +// options - StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails +// method. +func (client *StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetDatabaseConnectionWithDetailsResponse, error) { + req, err := client.getDatabaseConnectionWithDetailsCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, runtime.NewResponseError(resp) + } + return client.getDatabaseConnectionWithDetailsHandleResponse(resp) +} + +// getDatabaseConnectionWithDetailsCreateRequest creates the GetDatabaseConnectionWithDetails request. +func (client *StaticSitesClient) getDatabaseConnectionWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DetachUserProvidedFunctionAppFromStaticSite - Description for Detach the user provided function app from the static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// functionAppName - Name of the function app registered with the static site. -// options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the -// StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite method. -func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse, error) { - req, err := client.detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err +// getDatabaseConnectionWithDetailsHandleResponse handles the GetDatabaseConnectionWithDetails response. +func (client *StaticSitesClient) getDatabaseConnectionWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionWithDetailsResponse, error) { + result := StaticSitesClientGetDatabaseConnectionWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, runtime.NewResponseError(resp) - } - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, nil + return result, nil } -// detachUserProvidedFunctionAppFromStaticSiteCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSite request. -func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" +// NewGetDatabaseConnectionsPager - Returns overviews of database connections for a static site +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// options - StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnections +// method. +func (client *StaticSitesClient) NewGetDatabaseConnectionsPager(resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsOptions) *runtime.Pager[StaticSitesClientGetDatabaseConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetDatabaseConnectionsResponse]{ + More: func(page StaticSitesClientGetDatabaseConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetDatabaseConnectionsResponse) (StaticSitesClientGetDatabaseConnectionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.getDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return StaticSitesClientGetDatabaseConnectionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetDatabaseConnectionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetDatabaseConnectionsResponse{}, runtime.NewResponseError(resp) + } + return client.getDatabaseConnectionsHandleResponse(resp) + }, + }) +} + +// getDatabaseConnectionsCreateRequest creates the GetDatabaseConnections request. +func (client *StaticSitesClient) getDatabaseConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") } @@ -1120,53 +2016,67 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCrea return nil, errors.New("parameter name cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + 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", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DetachUserProvidedFunctionAppFromStaticSiteBuild - Description for Detach the user provided function app from the static -// site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// functionAppName - Name of the function app registered with the static site build. -// options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for -// the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild method. -func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error) { - req, err := client.detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, runtime.NewResponseError(resp) +// getDatabaseConnectionsHandleResponse handles the GetDatabaseConnections response. +func (client *StaticSitesClient) getDatabaseConnectionsHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionsResponse, error) { + result := StaticSitesClientGetDatabaseConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetDatabaseConnectionsResponse{}, err } - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, nil + return result, nil } -// detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSiteBuild request. -func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" +// NewGetDatabaseConnectionsWithDetailsPager - Returns details of database connections for a static site +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// options - StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionsWithDetails +// method. +func (client *StaticSitesClient) NewGetDatabaseConnectionsWithDetailsPager(resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsWithDetailsOptions) *runtime.Pager[StaticSitesClientGetDatabaseConnectionsWithDetailsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetDatabaseConnectionsWithDetailsResponse]{ + More: func(page StaticSitesClientGetDatabaseConnectionsWithDetailsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetDatabaseConnectionsWithDetailsResponse) (StaticSitesClientGetDatabaseConnectionsWithDetailsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.getDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, runtime.NewResponseError(resp) + } + return client.getDatabaseConnectionsWithDetailsHandleResponse(resp) + }, + }) +} + +// getDatabaseConnectionsWithDetailsCreateRequest creates the GetDatabaseConnectionsWithDetails request. +func (client *StaticSitesClient) getDatabaseConnectionsWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") } @@ -1175,32 +2085,33 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuil return nil, errors.New("parameter name cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } +// getDatabaseConnectionsWithDetailsHandleResponse handles the GetDatabaseConnectionsWithDetails response. +func (client *StaticSitesClient) getDatabaseConnectionsWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionsWithDetailsResponse, error) { + result := StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err + } + return result, nil +} + // GetLinkedBackend - Returns the details of a linked backend linked to a static site by name // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // linkedBackendName - Name of the linked backend that should be retrieved @@ -1245,7 +2156,7 @@ func (client *StaticSitesClient) getLinkedBackendCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1262,7 +2173,7 @@ func (client *StaticSitesClient) getLinkedBackendHandleResponse(resp *http.Respo // GetLinkedBackendForBuild - Returns the details of a linked backend linked to a static site build by name // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // environmentName - The stage site identifier @@ -1312,7 +2223,7 @@ func (client *StaticSitesClient) getLinkedBackendForBuildCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1328,8 +2239,7 @@ func (client *StaticSitesClient) getLinkedBackendForBuildHandleResponse(resp *ht } // NewGetLinkedBackendsPager - Returns details of all backends linked to a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // options - StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackends @@ -1382,7 +2292,7 @@ func (client *StaticSitesClient) getLinkedBackendsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1398,8 +2308,7 @@ func (client *StaticSitesClient) getLinkedBackendsHandleResponse(resp *http.Resp } // NewGetLinkedBackendsForBuildPager - Returns details of all backends linked to a static site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // environmentName - The stage site identifier @@ -1457,7 +2366,7 @@ func (client *StaticSitesClient) getLinkedBackendsForBuildCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1474,7 +2383,7 @@ func (client *StaticSitesClient) getLinkedBackendsForBuildHandleResponse(resp *h // GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -1519,7 +2428,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1536,8 +2445,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionHandleResponse(resp // NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with // a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnectionList @@ -1590,7 +2498,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionListCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1607,7 +2515,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionListHandleResponse( // GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources @@ -1647,7 +2555,7 @@ func (client *StaticSitesClient) getPrivateLinkResourcesCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1664,7 +2572,7 @@ func (client *StaticSitesClient) getPrivateLinkResourcesHandleResponse(resp *htt // GetStaticSite - Description for Gets the details of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite @@ -1704,7 +2612,7 @@ func (client *StaticSitesClient) getStaticSiteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1721,7 +2629,7 @@ func (client *StaticSitesClient) getStaticSiteHandleResponse(resp *http.Response // GetStaticSiteBuild - Description for Gets the details of a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -1766,7 +2674,7 @@ func (client *StaticSitesClient) getStaticSiteBuildCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1782,8 +2690,7 @@ func (client *StaticSitesClient) getStaticSiteBuildHandleResponse(resp *http.Res } // NewGetStaticSiteBuildsPager - Description for Gets all static site builds for a particular static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuilds @@ -1836,7 +2743,7 @@ func (client *StaticSitesClient) getStaticSiteBuildsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1853,7 +2760,7 @@ func (client *StaticSitesClient) getStaticSiteBuildsHandleResponse(resp *http.Re // GetStaticSiteCustomDomain - Description for Gets an existing custom domain for a particular static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site resource to search in. // domainName - The custom domain name. @@ -1898,7 +2805,7 @@ func (client *StaticSitesClient) getStaticSiteCustomDomainCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1914,8 +2821,7 @@ func (client *StaticSitesClient) getStaticSiteCustomDomainHandleResponse(resp *h } // NewGetStaticSitesByResourceGroupPager - Description for Gets all static sites in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.GetStaticSitesByResourceGroup // method. @@ -1963,7 +2869,7 @@ func (client *StaticSitesClient) getStaticSitesByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1981,7 +2887,7 @@ func (client *StaticSitesClient) getStaticSitesByResourceGroupHandleResponse(res // GetUserProvidedFunctionAppForStaticSite - Description for Gets the details of the user provided function app registered // with a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // functionAppName - Name of the function app registered with the static site. @@ -2026,7 +2932,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2044,7 +2950,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteHandleRe // GetUserProvidedFunctionAppForStaticSiteBuild - Description for Gets the details of the user provided function app registered // with a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2094,7 +3000,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2111,8 +3017,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildHan // NewGetUserProvidedFunctionAppsForStaticSitePager - Description for Gets the details of the user provided function apps // registered with a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite @@ -2165,7 +3070,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2182,8 +3087,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteHandleR // NewGetUserProvidedFunctionAppsForStaticSiteBuildPager - Description for Gets the details of the user provided function // apps registered with a static site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2241,7 +3145,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2258,7 +3162,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildHa // BeginLinkBackend - Link backend to a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // linkedBackendName - Name of the backend to link to the static site @@ -2279,7 +3183,7 @@ func (client *StaticSitesClient) BeginLinkBackend(ctx context.Context, resourceG // LinkBackend - Link backend to a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) linkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*http.Response, error) { req, err := client.linkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { @@ -2319,7 +3223,7 @@ func (client *StaticSitesClient) linkBackendCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) @@ -2327,7 +3231,7 @@ func (client *StaticSitesClient) linkBackendCreateRequest(ctx context.Context, r // BeginLinkBackendToBuild - Link backend to a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // environmentName - The stage site identifier @@ -2349,7 +3253,7 @@ func (client *StaticSitesClient) BeginLinkBackendToBuild(ctx context.Context, re // LinkBackendToBuild - Link backend to a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) linkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*http.Response, error) { req, err := client.linkBackendToBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { @@ -2393,15 +3297,14 @@ func (client *StaticSitesClient) linkBackendToBuildCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) } // NewListPager - Description for Get all Static Sites for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.List method. func (client *StaticSitesClient) NewListPager(options *StaticSitesClientListOptions) *runtime.Pager[StaticSitesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListResponse]{ @@ -2443,7 +3346,7 @@ func (client *StaticSitesClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2458,9 +3361,78 @@ func (client *StaticSitesClient) listHandleResponse(resp *http.Response) (Static return result, nil } +// NewListBasicAuthPager - Description for Gets the basic auth properties for a static site as a collection. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site. +// options - StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.ListBasicAuth +// method. +func (client *StaticSitesClient) NewListBasicAuthPager(resourceGroupName string, name string, options *StaticSitesClientListBasicAuthOptions) *runtime.Pager[StaticSitesClientListBasicAuthResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListBasicAuthResponse]{ + More: func(page StaticSitesClientListBasicAuthResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListBasicAuthResponse) (StaticSitesClientListBasicAuthResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listBasicAuthCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return StaticSitesClientListBasicAuthResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientListBasicAuthResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientListBasicAuthResponse{}, runtime.NewResponseError(resp) + } + return client.listBasicAuthHandleResponse(resp) + }, + }) +} + +// listBasicAuthCreateRequest creates the ListBasicAuth request. +func (client *StaticSitesClient) listBasicAuthCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListBasicAuthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBasicAuthHandleResponse handles the ListBasicAuth response. +func (client *StaticSitesClient) listBasicAuthHandleResponse(resp *http.Response) (StaticSitesClientListBasicAuthResponse, error) { + result := StaticSitesClientListBasicAuthResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBasicAuthPropertiesCollection); err != nil { + return StaticSitesClientListBasicAuthResponse{}, err + } + return result, nil +} + // ListStaticSiteAppSettings - Description for Gets the application settings of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings @@ -2500,7 +3472,7 @@ func (client *StaticSitesClient) listStaticSiteAppSettingsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2517,7 +3489,7 @@ func (client *StaticSitesClient) listStaticSiteAppSettingsHandleResponse(resp *h // ListStaticSiteBuildAppSettings - Description for Gets the application settings of a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2562,7 +3534,7 @@ func (client *StaticSitesClient) listStaticSiteBuildAppSettingsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2579,7 +3551,7 @@ func (client *StaticSitesClient) listStaticSiteBuildAppSettingsHandleResponse(re // ListStaticSiteBuildFunctionAppSettings - Description for Gets the application settings of a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2624,7 +3596,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2640,8 +3612,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsHandleRes } // NewListStaticSiteBuildFunctionsPager - Description for Gets the functions of a particular static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2699,7 +3670,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2716,7 +3687,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionsHandleResponse(resp // ListStaticSiteConfiguredRoles - Description for Lists the roles configured for the static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles @@ -2756,7 +3727,7 @@ func (client *StaticSitesClient) listStaticSiteConfiguredRolesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2772,8 +3743,7 @@ func (client *StaticSitesClient) listStaticSiteConfiguredRolesHandleResponse(res } // NewListStaticSiteCustomDomainsPager - Description for Gets all static site custom domains for a particular static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site resource to search in. // options - StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteCustomDomains @@ -2826,7 +3796,7 @@ func (client *StaticSitesClient) listStaticSiteCustomDomainsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2843,7 +3813,7 @@ func (client *StaticSitesClient) listStaticSiteCustomDomainsHandleResponse(resp // ListStaticSiteFunctionAppSettings - Description for Gets the application settings of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings @@ -2883,7 +3853,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2899,8 +3869,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsHandleResponse } // NewListStaticSiteFunctionsPager - Description for Gets the functions of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctions @@ -2953,7 +3922,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2970,7 +3939,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionsHandleResponse(resp *htt // ListStaticSiteSecrets - Description for Lists the secrets for an existing static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets @@ -3010,7 +3979,7 @@ func (client *StaticSitesClient) listStaticSiteSecretsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3026,8 +3995,7 @@ func (client *StaticSitesClient) listStaticSiteSecretsHandleResponse(resp *http. } // NewListStaticSiteUsersPager - Description for Gets the list of users of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // authprovider - The auth provider for the users. @@ -3085,7 +4053,7 @@ func (client *StaticSitesClient) listStaticSiteUsersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3102,7 +4070,7 @@ func (client *StaticSitesClient) listStaticSiteUsersHandleResponse(resp *http.Re // PreviewWorkflow - Description for Generates a preview workflow file for the static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // location - Location where you plan to create the static site. // staticSitesWorkflowPreviewRequest - A JSON representation of the StaticSitesWorkflowPreviewRequest properties. See example. // options - StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow @@ -3138,7 +4106,7 @@ func (client *StaticSitesClient) previewWorkflowCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSitesWorkflowPreviewRequest) @@ -3156,7 +4124,7 @@ func (client *StaticSitesClient) previewWorkflowHandleResponse(resp *http.Respon // BeginRegisterUserProvidedFunctionAppWithStaticSite - Description for Register a user provided function app with a static // site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // functionAppName - Name of the function app to register with the static site. @@ -3177,7 +4145,7 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS // RegisterUserProvidedFunctionAppWithStaticSite - Description for Register a user provided function app with a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*http.Response, error) { req, err := client.registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) if err != nil { @@ -3220,7 +4188,7 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteCr if options != nil && options.IsForced != nil { reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) @@ -3229,7 +4197,7 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteCr // BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild - Description for Register a user provided function app with a // static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -3252,7 +4220,7 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS // RegisterUserProvidedFunctionAppWithStaticSiteBuild - Description for Register a user provided function app with a static // site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*http.Response, error) { req, err := client.registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) if err != nil { @@ -3299,7 +4267,7 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBu if options != nil && options.IsForced != nil { reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) @@ -3307,7 +4275,7 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBu // ResetStaticSiteAPIKey - Description for Resets the api key for an existing static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // options - StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey @@ -3347,7 +4315,7 @@ func (client *StaticSitesClient) resetStaticSiteAPIKeyCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resetPropertiesEnvelope) @@ -3355,7 +4323,7 @@ func (client *StaticSitesClient) resetStaticSiteAPIKeyCreateRequest(ctx context. // UnlinkBackend - Unlink a backend from a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // linkedBackendName - Name of the backend linked to the static site @@ -3403,7 +4371,7 @@ func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, if options != nil && options.IsCleaningAuthConfig != nil { reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3411,7 +4379,7 @@ func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, // UnlinkBackendFromBuild - Unlink a backend from a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // environmentName - The stage site identifier @@ -3464,16 +4432,147 @@ func (client *StaticSitesClient) unlinkBackendFromBuildCreateRequest(ctx context if options != nil && options.IsCleaningAuthConfig != nil { reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } +// UpdateBuildDatabaseConnection - Description for Create or update a database connection for a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier. +// databaseConnectionName - Name of the database connection. +// databaseConnectionRequestEnvelope - A JSON representation of the database connection request properties +// options - StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection +// method. +func (client *StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateBuildDatabaseConnectionOptions) (StaticSitesClientUpdateBuildDatabaseConnectionResponse, error) { + req, err := client.updateBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.updateBuildDatabaseConnectionHandleResponse(resp) +} + +// updateBuildDatabaseConnectionCreateRequest creates the UpdateBuildDatabaseConnection request. +func (client *StaticSitesClient) updateBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) +} + +// updateBuildDatabaseConnectionHandleResponse handles the UpdateBuildDatabaseConnection response. +func (client *StaticSitesClient) updateBuildDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientUpdateBuildDatabaseConnectionResponse, error) { + result := StaticSitesClientUpdateBuildDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + return result, nil +} + +// UpdateDatabaseConnection - Description for Create or update a database connection for a static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// databaseConnectionName - Name of the database connection. +// databaseConnectionRequestEnvelope - A JSON representation of the database connection request properties +// options - StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection +// method. +func (client *StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateDatabaseConnectionOptions) (StaticSitesClientUpdateDatabaseConnectionResponse, error) { + req, err := client.updateDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.updateDatabaseConnectionHandleResponse(resp) +} + +// updateDatabaseConnectionCreateRequest creates the UpdateDatabaseConnection request. +func (client *StaticSitesClient) updateDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) +} + +// updateDatabaseConnectionHandleResponse handles the UpdateDatabaseConnection response. +func (client *StaticSitesClient) updateDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientUpdateDatabaseConnectionResponse, error) { + result := StaticSitesClientUpdateDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + return result, nil +} + // UpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an existing static // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site to create or update. // staticSiteEnvelope - A JSON representation of the staticsite properties. See example. @@ -3514,7 +4613,7 @@ func (client *StaticSitesClient) updateStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) @@ -3531,7 +4630,7 @@ func (client *StaticSitesClient) updateStaticSiteHandleResponse(resp *http.Respo // UpdateStaticSiteUser - Description for Updates a user entry with the listed roles // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // authprovider - The auth provider for this user. @@ -3582,7 +4681,7 @@ func (client *StaticSitesClient) updateStaticSiteUserCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserEnvelope) @@ -3599,7 +4698,7 @@ func (client *StaticSitesClient) updateStaticSiteUserHandleResponse(resp *http.R // BeginValidateBackend - Validates that a backend can be linked to a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // linkedBackendName - Name of the linked backend that should be retrieved @@ -3620,7 +4719,7 @@ func (client *StaticSitesClient) BeginValidateBackend(ctx context.Context, resou // ValidateBackend - Validates that a backend can be linked to a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) validateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*http.Response, error) { req, err := client.validateBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { @@ -3660,7 +4759,7 @@ func (client *StaticSitesClient) validateBackendCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) @@ -3668,7 +4767,7 @@ func (client *StaticSitesClient) validateBackendCreateRequest(ctx context.Contex // BeginValidateBackendForBuild - Validates that a backend can be linked to a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site // environmentName - The stage site identifier @@ -3690,7 +4789,7 @@ func (client *StaticSitesClient) BeginValidateBackendForBuild(ctx context.Contex // ValidateBackendForBuild - Validates that a backend can be linked to a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) validateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*http.Response, error) { req, err := client.validateBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { @@ -3734,7 +4833,7 @@ func (client *StaticSitesClient) validateBackendForBuildCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) @@ -3743,7 +4842,7 @@ func (client *StaticSitesClient) validateBackendForBuildCreateRequest(ctx contex // BeginValidateCustomDomainCanBeAddedToStaticSite - Description for Validates a particular custom domain can be added to // a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // domainName - The custom domain to validate. @@ -3766,7 +4865,7 @@ func (client *StaticSitesClient) BeginValidateCustomDomainCanBeAddedToStaticSite // ValidateCustomDomainCanBeAddedToStaticSite - Description for Validates a particular custom domain can be added to a static // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*http.Response, error) { req, err := client.validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) if err != nil { @@ -3806,7 +4905,7 @@ func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSiteCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go deleted file mode 100644 index a77ade3585ca..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go +++ /dev/null @@ -1,1537 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GenerateStaticSiteWorkflowPreview.json -func ExampleStaticSitesClient_PreviewWorkflow() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.PreviewWorkflow(ctx, - "West US 2", - armappservice.StaticSitesWorkflowPreviewRequest{ - Properties: &armappservice.StaticSitesWorkflowPreviewRequestProperties{ - Branch: to.Ptr("master"), - BuildProperties: &armappservice.StaticSiteBuildProperties{ - APILocation: to.Ptr("api"), - AppArtifactLocation: to.Ptr("build"), - AppLocation: to.Ptr("app"), - }, - RepositoryURL: to.Ptr("https://github.com/username/RepoName"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetAllStaticSites.json -func ExampleStaticSitesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetStaticSites.json -func ExampleStaticSitesClient_NewGetStaticSitesByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetStaticSitesByResourceGroupPager("rg", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetStaticSite.json -func ExampleStaticSitesClient_GetStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStaticSite(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateStaticSite.json -func ExampleStaticSitesClient_BeginCreateOrUpdateStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdateStaticSite(ctx, - "rg", - "testStaticSite0", - armappservice.StaticSiteARMResource{ - Location: to.Ptr("West US 2"), - Properties: &armappservice.StaticSite{ - Branch: to.Ptr("master"), - BuildProperties: &armappservice.StaticSiteBuildProperties{ - APILocation: to.Ptr("api"), - AppArtifactLocation: to.Ptr("build"), - AppLocation: to.Ptr("app"), - }, - RepositoryToken: to.Ptr("repoToken123"), - RepositoryURL: to.Ptr("https://github.com/username/RepoName"), - }, - SKU: &armappservice.SKUDescription{ - Name: to.Ptr("Basic"), - Tier: to.Ptr("Basic"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteStaticSite.json -func ExampleStaticSitesClient_BeginDeleteStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeleteStaticSite(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/PatchStaticSite.json -func ExampleStaticSitesClient_UpdateStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateStaticSite(ctx, - "rg", - "testStaticSite0", - armappservice.StaticSitePatchResource{ - Properties: &armappservice.StaticSite{}, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteUsers.json -func ExampleStaticSitesClient_NewListStaticSiteUsersPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteUsersPager("rg", - "testStaticSite0", - "all", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteStaticSiteUser.json -func ExampleStaticSitesClient_DeleteStaticSiteUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DeleteStaticSiteUser(ctx, - "rg", - "testStaticSite0", - "aad", - "1234", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UpdateStaticSiteUser.json -func ExampleStaticSitesClient_UpdateStaticSiteUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateStaticSiteUser(ctx, - "rg", - "testStaticSite0", - "aad", - "1234", - armappservice.StaticSiteUserARMResource{ - Properties: &armappservice.StaticSiteUserARMResourceProperties{ - Roles: to.Ptr("contributor"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetStaticSiteBuilds.json -func ExampleStaticSitesClient_NewGetStaticSiteBuildsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetStaticSiteBuildsPager("rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetStaticSiteBuild.json -func ExampleStaticSitesClient_GetStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "12", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteStaticSiteBuild.json -func ExampleStaticSitesClient_BeginDeleteStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeleteStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "12", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteBuildAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateStaticSiteBuildAppSettings(ctx, - "rg", - "testStaticSite0", - "12", - armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteBuildFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx, - "rg", - "testStaticSite0", - "12", - armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteBuildFunctions.json -func ExampleStaticSitesClient_NewListStaticSiteBuildFunctionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteBuildFunctionsPager("rg", - "testStaticSite0", - "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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteBuildAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteBuildAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteBuildAppSettings(ctx, - "rg", - "testStaticSite0", - "12", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteBuildFunctionAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteBuildFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteBuildFunctionAppSettings(ctx, - "rg", - "testStaticSite0", - "12", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json -func ExampleStaticSitesClient_NewGetUserProvidedFunctionAppsForStaticSiteBuildPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager("rg", - "testStaticSite0", - "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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json -func ExampleStaticSitesClient_GetUserProvidedFunctionAppForStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetUserProvidedFunctionAppForStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "default", - "testFunctionApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json -func ExampleStaticSitesClient_BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "default", - "testFunctionApp", - armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - FunctionAppRegion: to.Ptr("West US 2"), - FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - }, - }, - &armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions{IsForced: to.Ptr(true)}) - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json -func ExampleStaticSitesClient_DetachUserProvidedFunctionAppFromStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "12", - "testFunctionApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StaticSiteBuildZipDeploy.json -func ExampleStaticSitesClient_BeginCreateZipDeploymentForStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateZipDeploymentForStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "12", - armappservice.StaticSiteZipDeploymentARMResource{ - Properties: &armappservice.StaticSiteZipDeployment{ - APIZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip"), - AppZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip"), - DeploymentTitle: to.Ptr("Update index.html"), - FunctionLanguage: to.Ptr("testFunctionLanguage"), - Provider: to.Ptr("testProvider"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateStaticSiteAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateStaticSiteAppSettings(ctx, - "rg", - "testStaticSite0", - armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdateStaticSiteFunctionAppSettings(ctx, - "rg", - "testStaticSite0", - armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateUserRolesInvitationLink.json -func ExampleStaticSitesClient_CreateUserRolesInvitationLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateUserRolesInvitationLink(ctx, - "rg", - "testStaticSite0", - armappservice.StaticSiteUserInvitationRequestResource{ - Properties: &armappservice.StaticSiteUserInvitationRequestResourceProperties{ - Domain: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - NumHoursToExpiration: to.Ptr[int32](1), - Provider: to.Ptr("aad"), - Roles: to.Ptr("admin,contributor"), - UserDetails: to.Ptr("username"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetStaticSiteCustomDomains.json -func ExampleStaticSitesClient_NewListStaticSiteCustomDomainsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteCustomDomainsPager("rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetStaticSiteCustomDomain.json -func ExampleStaticSitesClient_GetStaticSiteCustomDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStaticSiteCustomDomain(ctx, - "rg", - "testStaticSite0", - "custom.domain.net", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/CreateOrUpdateStaticSiteCustomDomain.json -func ExampleStaticSitesClient_BeginCreateOrUpdateStaticSiteCustomDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdateStaticSiteCustomDomain(ctx, - "rg", - "testStaticSite0", - "custom.domain.net", - armappservice.StaticSiteCustomDomainRequestPropertiesARMResource{ - Properties: &armappservice.StaticSiteCustomDomainRequestPropertiesARMResourceProperties{}, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteStaticSiteCustomDomain.json -func ExampleStaticSitesClient_BeginDeleteStaticSiteCustomDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeleteStaticSiteCustomDomain(ctx, - "rg", - "testStaticSite0", - "custom.domain.net", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ValidateStaticSiteCustomDomain.json -func ExampleStaticSitesClient_BeginValidateCustomDomainCanBeAddedToStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidateCustomDomainCanBeAddedToStaticSite(ctx, - "rg", - "testStaticSite0", - "custom.domain.net", - armappservice.StaticSiteCustomDomainRequestPropertiesARMResource{ - Properties: &armappservice.StaticSiteCustomDomainRequestPropertiesARMResourceProperties{}, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DetachStaticSite.json -func ExampleStaticSitesClient_BeginDetachStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDetachStaticSite(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteFunctions.json -func ExampleStaticSitesClient_NewListStaticSiteFunctionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteFunctionsPager("rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteAppSettings(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteConfiguredRoles.json -func ExampleStaticSitesClient_ListStaticSiteConfiguredRoles() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteConfiguredRoles(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteFunctionAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteFunctionAppSettings(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListStaticSiteSecrets.json -func ExampleStaticSitesClient_ListStaticSiteSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteSecrets(ctx, - "rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateEndpointConnectionList.json -func ExampleStaticSitesClient_NewGetPrivateEndpointConnectionListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetPrivateEndpointConnectionListPager("rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateEndpointConnection.json -func ExampleStaticSitesClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ApproveRejectSitePrivateEndpointConnection.json -func ExampleStaticSitesClient_BeginApproveOrRejectPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginApproveOrRejectPrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteSitePrivateEndpointConnection.json -func ExampleStaticSitesClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeletePrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateLinkResources.json -func ExampleStaticSitesClient_GetPrivateLinkResources() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResources(ctx, - "rg", - "testSite", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetUserProvidedFunctionAppsForStaticSite.json -func ExampleStaticSitesClient_NewGetUserProvidedFunctionAppsForStaticSitePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetUserProvidedFunctionAppsForStaticSitePager("rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetUserProvidedFunctionAppForStaticSite.json -func ExampleStaticSitesClient_GetUserProvidedFunctionAppForStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetUserProvidedFunctionAppForStaticSite(ctx, - "rg", - "testStaticSite0", - "testFunctionApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json -func ExampleStaticSitesClient_BeginRegisterUserProvidedFunctionAppWithStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRegisterUserProvidedFunctionAppWithStaticSite(ctx, - "rg", - "testStaticSite0", - "testFunctionApp", - armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - FunctionAppRegion: to.Ptr("West US 2"), - FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - }, - }, - &armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions{IsForced: to.Ptr(true)}) - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json -func ExampleStaticSitesClient_DetachUserProvidedFunctionAppFromStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DetachUserProvidedFunctionAppFromStaticSite(ctx, - "rg", - "testStaticSite0", - "testFunctionApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StaticSiteZipDeploy.json -func ExampleStaticSitesClient_BeginCreateZipDeploymentForStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateZipDeploymentForStaticSite(ctx, - "rg", - "testStaticSite0", - armappservice.StaticSiteZipDeploymentARMResource{ - Properties: &armappservice.StaticSiteZipDeployment{ - APIZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip"), - AppZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip"), - DeploymentTitle: to.Ptr("Update index.html"), - FunctionLanguage: to.Ptr("testFunctionLanguage"), - Provider: to.Ptr("testProvider"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ValidateLinkedBackendForStaticSite.json -func ExampleStaticSitesClient_BeginValidateBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidateBackend(ctx, - "rg", - "testStaticSite0", - "testBackend", - armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 2"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ValidateLinkedBackendForStaticSiteBuild.json -func ExampleStaticSitesClient_BeginValidateBackendForBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidateBackendForBuild(ctx, - "rg", - "testStaticSite0", - "default", - "testBackend", - armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 2"), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetLinkedBackendsForStaticSite.json -func ExampleStaticSitesClient_NewGetLinkedBackendsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetLinkedBackendsPager("rg", - "testStaticSite0", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetLinkedBackendsForStaticSiteBuild.json -func ExampleStaticSitesClient_NewGetLinkedBackendsForBuildPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetLinkedBackendsForBuildPager("rg", - "testStaticSite0", - "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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetLinkedBackendForStaticSite.json -func ExampleStaticSitesClient_GetLinkedBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetLinkedBackend(ctx, - "rg", - "testStaticSite0", - "testBackend", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/LinkBackendToStaticSite.json -func ExampleStaticSitesClient_BeginLinkBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginLinkBackend(ctx, - "rg", - "testStaticSite0", - "testBackend", - armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UnlinkBackendFromStaticSite.json -func ExampleStaticSitesClient_UnlinkBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.UnlinkBackend(ctx, - "rg", - "testStaticSite0", - "testBackend", - &armappservice.StaticSitesClientUnlinkBackendOptions{IsCleaningAuthConfig: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetLinkedBackendForStaticSiteBuild.json -func ExampleStaticSitesClient_GetLinkedBackendForBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetLinkedBackendForBuild(ctx, - "rg", - "testStaticSite0", - "default", - "testBackend", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/LinkBackendToStaticSiteBuild.json -func ExampleStaticSitesClient_BeginLinkBackendToBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginLinkBackendToBuild(ctx, - "rg", - "testStaticSite0", - "default", - "testBackend", - armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UnlinkBackendFromStaticSiteBuild.json -func ExampleStaticSitesClient_UnlinkBackendFromBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.UnlinkBackendFromBuild(ctx, - "rg", - "testStaticSite0", - "12", - "testBackend", - &armappservice.StaticSitesClientUnlinkBackendFromBuildOptions{IsCleaningAuthConfig: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go index bf1403e19693..4448e511bbaa 100644 --- a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go +++ b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go @@ -57,7 +57,7 @@ func NewTopLevelDomainsClient(subscriptionID string, credential azcore.TokenCred // Get - Description for Get details of a top-level domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // name - Name of the top-level domain. // options - TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. func (client *TopLevelDomainsClient) Get(ctx context.Context, name string, options *TopLevelDomainsClientGetOptions) (TopLevelDomainsClientGetResponse, error) { @@ -91,7 +91,7 @@ func (client *TopLevelDomainsClient) getCreateRequest(ctx context.Context, name return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,8 +107,7 @@ func (client *TopLevelDomainsClient) getHandleResponse(resp *http.Response) (Top } // NewListPager - Description for Get all top-level domains supported for registration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.List method. func (client *TopLevelDomainsClient) NewListPager(options *TopLevelDomainsClientListOptions) *runtime.Pager[TopLevelDomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[TopLevelDomainsClientListResponse]{ @@ -150,7 +149,7 @@ func (client *TopLevelDomainsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,8 +165,7 @@ func (client *TopLevelDomainsClient) listHandleResponse(resp *http.Response) (To } // NewListAgreementsPager - Description for Gets all legal agreements that user needs to accept before purchasing a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // name - Name of the top-level domain. // agreementOption - Domain agreement options. // options - TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.ListAgreements @@ -216,7 +214,7 @@ func (client *TopLevelDomainsClient) listAgreementsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, agreementOption) diff --git a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go deleted file mode 100644 index 29da2be5956f..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go +++ /dev/null @@ -1,92 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListTopLevelDomains.json -func ExampleTopLevelDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewTopLevelDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", 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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/GetTopLevelDomain.json -func ExampleTopLevelDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewTopLevelDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "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/web/resource-manager/Microsoft.DomainRegistration/stable/2022-03-01/examples/ListTopLevelDomainAgreements.json -func ExampleTopLevelDomainsClient_NewListAgreementsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewTopLevelDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAgreementsPager("in", - armappservice.TopLevelDomainAgreementOption{ - ForTransfer: to.Ptr(false), - IncludePrivacy: to.Ptr(true), - }, - 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/appservice/armappservice/webapps_client.go b/sdk/resourcemanager/appservice/armappservice/webapps_client.go index b9b52d85ad25..53348401508e 100644 --- a/sdk/resourcemanager/appservice/armappservice/webapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/webapps_client.go @@ -58,7 +58,7 @@ func NewWebAppsClient(subscriptionID string, credential azcore.TokenCredential, // AddPremierAddOn - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -103,7 +103,7 @@ func (client *WebAppsClient) addPremierAddOnCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -120,7 +120,7 @@ func (client *WebAppsClient) addPremierAddOnHandleResponse(resp *http.Response) // AddPremierAddOnSlot - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -172,7 +172,7 @@ func (client *WebAppsClient) addPremierAddOnSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -189,7 +189,7 @@ func (client *WebAppsClient) addPremierAddOnSlotHandleResponse(resp *http.Respon // AnalyzeCustomHostname - Description for Analyze a custom hostname. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname @@ -232,7 +232,7 @@ func (client *WebAppsClient) analyzeCustomHostnameCreateRequest(ctx context.Cont if options != nil && options.HostName != nil { reqQP.Set("hostName", *options.HostName) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *WebAppsClient) analyzeCustomHostnameHandleResponse(resp *http.Resp // AnalyzeCustomHostnameSlot - Description for Analyze a custom hostname. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -297,7 +297,7 @@ func (client *WebAppsClient) analyzeCustomHostnameSlotCreateRequest(ctx context. if options != nil && options.HostName != nil { reqQP.Set("hostName", *options.HostName) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,7 +315,7 @@ func (client *WebAppsClient) analyzeCustomHostnameSlotHandleResponse(resp *http. // ApplySlotConfigToProduction - Description for Applies the configuration settings from the target slot onto the current // slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slotSwapEntity - JSON object that contains the target slot name. See example. @@ -356,7 +356,7 @@ func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -364,7 +364,7 @@ func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx contex // ApplySlotConfigurationSlot - Description for Applies the configuration settings from the target slot onto the current slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @@ -410,7 +410,7 @@ func (client *WebAppsClient) applySlotConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -418,12 +418,12 @@ func (client *WebAppsClient) applySlotConfigurationSlotCreateRequest(ctx context // BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection // method. -func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { +func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { @@ -437,8 +437,8 @@ func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx c // ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { +// Generated from API version 2023-12-01 +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { return nil, err @@ -454,7 +454,7 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx contex } // approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -477,7 +477,7 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) @@ -485,12 +485,12 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateReque // BeginApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the // WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot method. -func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error) { +func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.approveOrRejectPrivateEndpointConnectionSlot(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) if err != nil { @@ -504,8 +504,8 @@ func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(c // ApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*http.Response, error) { +// Generated from API version 2023-12-01 +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) if err != nil { return nil, err @@ -521,7 +521,7 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx co } // approveOrRejectPrivateEndpointConnectionSlotCreateRequest creates the ApproveOrRejectPrivateEndpointConnectionSlot request. -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*policy.Request, error) { +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -548,7 +548,7 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) @@ -556,7 +556,7 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateR // Backup - Description for Creates a backup of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // request - Backup configuration. You can use the JSON response from the POST action as input here. @@ -596,7 +596,7 @@ func (client *WebAppsClient) backupCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -613,7 +613,7 @@ func (client *WebAppsClient) backupHandleResponse(resp *http.Response) (WebAppsC // BackupSlot - Description for Creates a backup of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. @@ -658,7 +658,7 @@ func (client *WebAppsClient) backupSlotCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -675,7 +675,7 @@ func (client *WebAppsClient) backupSlotHandleResponse(resp *http.Response) (WebA // CreateDeployment - Description for Create a deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - ID of an existing deployment. @@ -721,7 +721,7 @@ func (client *WebAppsClient) createDeploymentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deployment) @@ -738,7 +738,7 @@ func (client *WebAppsClient) createDeploymentHandleResponse(resp *http.Response) // CreateDeploymentSlot - Description for Create a deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - ID of an existing deployment. @@ -789,7 +789,7 @@ func (client *WebAppsClient) createDeploymentSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deployment) @@ -806,7 +806,7 @@ func (client *WebAppsClient) createDeploymentSlotHandleResponse(resp *http.Respo // BeginCreateFunction - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -827,7 +827,7 @@ func (client *WebAppsClient) BeginCreateFunction(ctx context.Context, resourceGr // CreateFunction - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*http.Response, error) { req, err := client.createFunctionCreateRequest(ctx, resourceGroupName, name, functionName, functionEnvelope, options) if err != nil { @@ -867,7 +867,7 @@ func (client *WebAppsClient) createFunctionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, functionEnvelope) @@ -875,7 +875,7 @@ func (client *WebAppsClient) createFunctionCreateRequest(ctx context.Context, re // BeginCreateInstanceFunctionSlot - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -897,7 +897,7 @@ func (client *WebAppsClient) BeginCreateInstanceFunctionSlot(ctx context.Context // CreateInstanceFunctionSlot - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*http.Response, error) { req, err := client.createInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) if err != nil { @@ -941,7 +941,7 @@ func (client *WebAppsClient) createInstanceFunctionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, functionEnvelope) @@ -949,7 +949,7 @@ func (client *WebAppsClient) createInstanceFunctionSlotCreateRequest(ctx context // BeginCreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // instanceID - ID of web app instance. @@ -970,7 +970,7 @@ func (client *WebAppsClient) BeginCreateInstanceMSDeployOperation(ctx context.Co // CreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*http.Response, error) { req, err := client.createInstanceMSDeployOperationCreateRequest(ctx, resourceGroupName, name, instanceID, msDeploy, options) if err != nil { @@ -1010,7 +1010,7 @@ func (client *WebAppsClient) createInstanceMSDeployOperationCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) @@ -1018,7 +1018,7 @@ func (client *WebAppsClient) createInstanceMSDeployOperationCreateRequest(ctx co // BeginCreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -1040,7 +1040,7 @@ func (client *WebAppsClient) BeginCreateInstanceMSDeployOperationSlot(ctx contex // CreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*http.Response, error) { req, err := client.createInstanceMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) if err != nil { @@ -1084,7 +1084,7 @@ func (client *WebAppsClient) createInstanceMSDeployOperationSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) @@ -1092,7 +1092,7 @@ func (client *WebAppsClient) createInstanceMSDeployOperationSlotCreateRequest(ct // BeginCreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // msDeploy - Details of MSDeploy operation @@ -1112,7 +1112,7 @@ func (client *WebAppsClient) BeginCreateMSDeployOperation(ctx context.Context, r // CreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*http.Response, error) { req, err := client.createMSDeployOperationCreateRequest(ctx, resourceGroupName, name, msDeploy, options) if err != nil { @@ -1148,7 +1148,7 @@ func (client *WebAppsClient) createMSDeployOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) @@ -1156,7 +1156,7 @@ func (client *WebAppsClient) createMSDeployOperationCreateRequest(ctx context.Co // BeginCreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -1177,7 +1177,7 @@ func (client *WebAppsClient) BeginCreateMSDeployOperationSlot(ctx context.Contex // CreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*http.Response, error) { req, err := client.createMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, msDeploy, options) if err != nil { @@ -1217,7 +1217,7 @@ func (client *WebAppsClient) createMSDeployOperationSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) @@ -1225,7 +1225,7 @@ func (client *WebAppsClient) createMSDeployOperationSlotCreateRequest(ctx contex // CreateOneDeployOperation - Description for Invoke the OneDeploy publish web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation @@ -1265,7 +1265,7 @@ func (client *WebAppsClient) createOneDeployOperationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1283,7 +1283,7 @@ func (client *WebAppsClient) createOneDeployOperationHandleResponse(resp *http.R // BeginCreateOrUpdate - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an // existing app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // siteEnvelope - A JSON representation of the app properties. See example. @@ -1304,7 +1304,7 @@ func (client *WebAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // CreateOrUpdate - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing // app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) if err != nil { @@ -1340,7 +1340,7 @@ func (client *WebAppsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) @@ -1348,7 +1348,7 @@ func (client *WebAppsClient) createOrUpdateCreateRequest(ctx context.Context, re // CreateOrUpdateConfiguration - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // siteConfig - JSON representation of a SiteConfig object. See example. @@ -1389,7 +1389,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -1406,7 +1406,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationHandleResponse(resp *htt // CreateOrUpdateConfigurationSlot - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @@ -1452,7 +1452,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -1470,7 +1470,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotHandleResponse(resp // CreateOrUpdateDomainOwnershipIdentifier - Description for Creates a domain ownership identifier for web app, or updates // an existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -1516,7 +1516,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -1534,7 +1534,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierHandleRespon // CreateOrUpdateDomainOwnershipIdentifierSlot - Description for Creates a domain ownership identifier for web app, or updates // an existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -1585,7 +1585,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -1602,7 +1602,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotHandleRe // CreateOrUpdateFunctionSecret - Description for Add or update a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -1653,7 +1653,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -1670,7 +1670,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretHandleResponse(resp *ht // CreateOrUpdateFunctionSecretSlot - Description for Add or update a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -1726,7 +1726,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -1743,7 +1743,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotHandleResponse(resp // CreateOrUpdateHostNameBinding - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -1789,7 +1789,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostNameBinding) @@ -1806,7 +1806,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingHandleResponse(resp *h // CreateOrUpdateHostNameBindingSlot - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -1857,7 +1857,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostNameBinding) @@ -1874,7 +1874,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotHandleResponse(res // CreateOrUpdateHostSecret - Description for Add or update a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -1925,7 +1925,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -1942,7 +1942,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretHandleResponse(resp *http.R // CreateOrUpdateHostSecretSlot - Description for Add or update a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -1998,7 +1998,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -2015,7 +2015,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotHandleResponse(resp *ht // CreateOrUpdateHybridConnection - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -2066,7 +2066,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2083,7 +2083,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionHandleResponse(resp * // CreateOrUpdateHybridConnectionSlot - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -2139,7 +2139,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2156,7 +2156,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotHandleResponse(re // CreateOrUpdatePublicCertificate - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -2202,7 +2202,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, publicCertificate) @@ -2219,7 +2219,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateHandleResponse(resp // CreateOrUpdatePublicCertificateSlot - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -2270,7 +2270,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, publicCertificate) @@ -2288,7 +2288,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotHandleResponse(r // CreateOrUpdateRelayServiceConnection - Description for Creates a new hybrid connection configuration (PUT), or updates // an existing one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -2334,7 +2334,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2352,7 +2352,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionHandleResponse( // CreateOrUpdateRelayServiceConnectionSlot - Description for Creates a new hybrid connection configuration (PUT), or updates // an existing one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -2404,7 +2404,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2419,10 +2419,141 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotHandleRespo return result, nil } +// CreateOrUpdateSiteContainer - Creates or Updates a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// containerName - Site Container Name +// request - Container Entity +// options - WebAppsClientCreateOrUpdateSiteContainerOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainer +// method. +func (client *WebAppsClient) CreateOrUpdateSiteContainer(ctx context.Context, resourceGroupName string, name string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerOptions) (WebAppsClientCreateOrUpdateSiteContainerResponse, error) { + req, err := client.createOrUpdateSiteContainerCreateRequest(ctx, resourceGroupName, name, containerName, request, options) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, runtime.NewResponseError(resp) + } + return client.createOrUpdateSiteContainerHandleResponse(resp) +} + +// createOrUpdateSiteContainerCreateRequest creates the CreateOrUpdateSiteContainer request. +func (client *WebAppsClient) createOrUpdateSiteContainerCreateRequest(ctx context.Context, resourceGroupName string, name string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, request) +} + +// createOrUpdateSiteContainerHandleResponse handles the CreateOrUpdateSiteContainer response. +func (client *WebAppsClient) createOrUpdateSiteContainerHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSiteContainerResponse, error) { + result := WebAppsClientCreateOrUpdateSiteContainerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + return result, nil +} + +// CreateOrUpdateSiteContainerSlot - Creates or Updates a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// slot - Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. +// containerName - Site Container Name +// request - Container Entity +// options - WebAppsClientCreateOrUpdateSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainerSlot +// method. +func (client *WebAppsClient) CreateOrUpdateSiteContainerSlot(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerSlotOptions) (WebAppsClientCreateOrUpdateSiteContainerSlotResponse, error) { + req, err := client.createOrUpdateSiteContainerSlotCreateRequest(ctx, resourceGroupName, name, slot, containerName, request, options) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, runtime.NewResponseError(resp) + } + return client.createOrUpdateSiteContainerSlotHandleResponse(resp) +} + +// createOrUpdateSiteContainerSlotCreateRequest creates the CreateOrUpdateSiteContainerSlot request. +func (client *WebAppsClient) createOrUpdateSiteContainerSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, request) +} + +// createOrUpdateSiteContainerSlotHandleResponse handles the CreateOrUpdateSiteContainerSlot response. +func (client *WebAppsClient) createOrUpdateSiteContainerSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSiteContainerSlotResponse, error) { + result := WebAppsClientCreateOrUpdateSiteContainerSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + return result, nil +} + // BeginCreateOrUpdateSlot - Description for Creates a new web, mobile, or API app in an existing resource group, or updates // an existing app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production @@ -2445,7 +2576,7 @@ func (client *WebAppsClient) BeginCreateOrUpdateSlot(ctx context.Context, resour // CreateOrUpdateSlot - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an // existing app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*http.Response, error) { req, err := client.createOrUpdateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) if err != nil { @@ -2485,7 +2616,7 @@ func (client *WebAppsClient) createOrUpdateSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) @@ -2493,7 +2624,7 @@ func (client *WebAppsClient) createOrUpdateSlotCreateRequest(ctx context.Context // BeginCreateOrUpdateSourceControl - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // siteSourceControl - JSON representation of a SiteSourceControl object. See example. @@ -2513,7 +2644,7 @@ func (client *WebAppsClient) BeginCreateOrUpdateSourceControl(ctx context.Contex // CreateOrUpdateSourceControl - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*http.Response, error) { req, err := client.createOrUpdateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) if err != nil { @@ -2549,7 +2680,7 @@ func (client *WebAppsClient) createOrUpdateSourceControlCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) @@ -2557,7 +2688,7 @@ func (client *WebAppsClient) createOrUpdateSourceControlCreateRequest(ctx contex // BeginCreateOrUpdateSourceControlSlot - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for @@ -2579,7 +2710,7 @@ func (client *WebAppsClient) BeginCreateOrUpdateSourceControlSlot(ctx context.Co // CreateOrUpdateSourceControlSlot - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) createOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*http.Response, error) { req, err := client.createOrUpdateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) if err != nil { @@ -2619,7 +2750,7 @@ func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) @@ -2630,7 +2761,7 @@ func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx co // already been // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // connectionEnvelope - Properties of the Virtual Network connection. See example. @@ -2671,7 +2802,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2691,7 +2822,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec // already been // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production @@ -2738,7 +2869,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2756,7 +2887,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec // CreateOrUpdateVnetConnection - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the // connection properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -2802,7 +2933,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2820,7 +2951,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionHandleResponse(resp *ht // CreateOrUpdateVnetConnectionGateway - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it // (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -2871,7 +3002,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2889,7 +3020,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayHandleResponse(r // CreateOrUpdateVnetConnectionGatewaySlot - Description for Adds a gateway to a connected Virtual Network (PUT) or updates // it (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -2946,7 +3077,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2964,7 +3095,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotHandleRespon // CreateOrUpdateVnetConnectionSlot - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates // the connection properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -3016,7 +3147,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -3033,7 +3164,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionSlotHandleResponse(resp // Delete - Description for Deletes a web, mobile, or API app, or one of the deployment slots. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app to delete. // options - WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. @@ -3078,7 +3209,7 @@ func (client *WebAppsClient) deleteCreateRequest(ctx context.Context, resourceGr if options != nil && options.DeleteEmptyServerFarm != nil { reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3086,7 +3217,7 @@ func (client *WebAppsClient) deleteCreateRequest(ctx context.Context, resourceGr // DeleteBackup - Description for Deletes a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -3130,7 +3261,7 @@ func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3138,7 +3269,7 @@ func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, reso // DeleteBackupConfiguration - Description for Deletes the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration @@ -3178,7 +3309,7 @@ func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3186,7 +3317,7 @@ func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context. // DeleteBackupConfigurationSlot - Description for Deletes the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production @@ -3232,7 +3363,7 @@ func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3240,7 +3371,7 @@ func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx cont // DeleteBackupSlot - Description for Deletes a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -3290,7 +3421,7 @@ func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3298,7 +3429,7 @@ func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, // DeleteContinuousWebJob - Description for Delete a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -3343,7 +3474,7 @@ func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3351,7 +3482,7 @@ func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Con // DeleteContinuousWebJobSlot - Description for Delete a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -3401,7 +3532,7 @@ func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3409,7 +3540,7 @@ func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context // DeleteDeployment - Description for Delete a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -3454,7 +3585,7 @@ func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3462,7 +3593,7 @@ func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, // DeleteDeploymentSlot - Description for Delete a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -3512,7 +3643,7 @@ func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3520,7 +3651,7 @@ func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Conte // DeleteDomainOwnershipIdentifier - Description for Deletes a domain ownership identifier for a web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -3565,7 +3696,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3573,7 +3704,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx co // DeleteDomainOwnershipIdentifierSlot - Description for Deletes a domain ownership identifier for a web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -3623,7 +3754,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3631,7 +3762,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ct // DeleteFunction - Description for Delete a function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -3675,7 +3806,7 @@ func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3683,7 +3814,7 @@ func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, re // DeleteFunctionSecret - Description for Delete a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -3733,7 +3864,7 @@ func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3741,7 +3872,7 @@ func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Conte // DeleteFunctionSecretSlot - Description for Delete a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -3796,7 +3927,7 @@ func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3804,7 +3935,7 @@ func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.C // DeleteHostNameBinding - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -3849,7 +3980,7 @@ func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3857,7 +3988,7 @@ func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Cont // DeleteHostNameBindingSlot - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @@ -3907,7 +4038,7 @@ func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3915,7 +4046,7 @@ func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context. // DeleteHostSecret - Description for Delete a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -3965,7 +4096,7 @@ func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3973,7 +4104,7 @@ func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, // DeleteHostSecretSlot - Description for Delete a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -4028,7 +4159,7 @@ func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4036,7 +4167,7 @@ func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Conte // DeleteHybridConnection - Description for Removes a Hybrid Connection from this site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -4086,7 +4217,7 @@ func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4094,7 +4225,7 @@ func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Con // DeleteHybridConnectionSlot - Description for Removes a Hybrid Connection from this site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -4149,7 +4280,7 @@ func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4157,7 +4288,7 @@ func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context // DeleteInstanceFunctionSlot - Description for Delete a function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -4207,7 +4338,7 @@ func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4216,7 +4347,7 @@ func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context // DeleteInstanceProcess - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific // scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4267,7 +4398,7 @@ func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4276,7 +4407,7 @@ func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Cont // DeleteInstanceProcessSlot - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific // scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4332,7 +4463,7 @@ func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4340,7 +4471,7 @@ func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context. // DeletePremierAddOn - Description for Delete a premier add-on from an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -4385,7 +4516,7 @@ func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4393,7 +4524,7 @@ func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context // DeletePremierAddOnSlot - Description for Delete a premier add-on from an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -4444,7 +4575,7 @@ func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4452,7 +4583,7 @@ func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Con // BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection @@ -4471,7 +4602,7 @@ func (client *WebAppsClient) BeginDeletePrivateEndpointConnection(ctx context.Co // DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { @@ -4511,7 +4642,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4519,7 +4650,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx co // BeginDeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot @@ -4538,7 +4669,7 @@ func (client *WebAppsClient) BeginDeletePrivateEndpointConnectionSlot(ctx contex // DeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) deletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) if err != nil { @@ -4582,7 +4713,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4591,7 +4722,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ct // DeleteProcess - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out // instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4635,7 +4766,7 @@ func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4644,7 +4775,7 @@ func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, res // DeleteProcessSlot - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out // instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4694,7 +4825,7 @@ func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4702,7 +4833,7 @@ func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, // DeletePublicCertificate - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -4747,7 +4878,7 @@ func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4755,7 +4886,7 @@ func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Co // DeletePublicCertificateSlot - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @@ -4805,7 +4936,7 @@ func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4813,7 +4944,7 @@ func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx contex // DeleteRelayServiceConnection - Description for Deletes a relay service connection by its name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -4858,7 +4989,7 @@ func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4866,7 +4997,7 @@ func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx conte // DeleteRelayServiceConnectionSlot - Description for Deletes a relay service connection by its name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -4917,7 +5048,118 @@ func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSiteContainer - Deletes a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// containerName - Site Container Name +// options - WebAppsClientDeleteSiteContainerOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainer +// method. +func (client *WebAppsClient) DeleteSiteContainer(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientDeleteSiteContainerOptions) (WebAppsClientDeleteSiteContainerResponse, error) { + req, err := client.deleteSiteContainerCreateRequest(ctx, resourceGroupName, name, containerName, options) + if err != nil { + return WebAppsClientDeleteSiteContainerResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientDeleteSiteContainerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return WebAppsClientDeleteSiteContainerResponse{}, runtime.NewResponseError(resp) + } + return WebAppsClientDeleteSiteContainerResponse{}, nil +} + +// deleteSiteContainerCreateRequest creates the DeleteSiteContainer request. +func (client *WebAppsClient) deleteSiteContainerCreateRequest(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientDeleteSiteContainerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSiteContainerSlot - Deletes a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// slot - Name of the deployment slot. If a slot is not specified, the API will delete the container for the production slot. +// containerName - Site Container Name +// options - WebAppsClientDeleteSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainerSlot +// method. +func (client *WebAppsClient) DeleteSiteContainerSlot(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientDeleteSiteContainerSlotOptions) (WebAppsClientDeleteSiteContainerSlotResponse, error) { + req, err := client.deleteSiteContainerSlotCreateRequest(ctx, resourceGroupName, name, slot, containerName, options) + if err != nil { + return WebAppsClientDeleteSiteContainerSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientDeleteSiteContainerSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return WebAppsClientDeleteSiteContainerSlotResponse{}, runtime.NewResponseError(resp) + } + return WebAppsClientDeleteSiteContainerSlotResponse{}, nil +} + +// deleteSiteContainerSlotCreateRequest creates the DeleteSiteContainerSlot request. +func (client *WebAppsClient) deleteSiteContainerSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientDeleteSiteContainerSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4925,7 +5167,7 @@ func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx c // DeleteSiteExtension - Description for Remove a site extension from a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -4970,7 +5212,7 @@ func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4978,7 +5220,7 @@ func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Contex // DeleteSiteExtensionSlot - Description for Remove a site extension from a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -5028,7 +5270,7 @@ func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5036,7 +5278,7 @@ func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Co // DeleteSlot - Description for Deletes a web, mobile, or API app, or one of the deployment slots. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app to delete. // slot - Name of the deployment slot to delete. By default, the API deletes the production slot. @@ -5086,7 +5328,7 @@ func (client *WebAppsClient) deleteSlotCreateRequest(ctx context.Context, resour if options != nil && options.DeleteEmptyServerFarm != nil { reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5094,7 +5336,7 @@ func (client *WebAppsClient) deleteSlotCreateRequest(ctx context.Context, resour // DeleteSourceControl - Description for Deletes the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl @@ -5137,7 +5379,7 @@ func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Contex if options != nil && options.AdditionalFlags != nil { reqQP.Set("additionalFlags", *options.AdditionalFlags) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5145,7 +5387,7 @@ func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Contex // DeleteSourceControlSlot - Description for Deletes the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for @@ -5194,7 +5436,7 @@ func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Co if options != nil && options.AdditionalFlags != nil { reqQP.Set("additionalFlags", *options.AdditionalFlags) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5202,7 +5444,7 @@ func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Co // DeleteSwiftVirtualNetwork - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork @@ -5242,7 +5484,7 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5250,7 +5492,7 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context. // DeleteSwiftVirtualNetworkSlot - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. @@ -5295,7 +5537,7 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5303,7 +5545,7 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx cont // DeleteTriggeredWebJob - Description for Delete a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -5348,7 +5590,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5356,7 +5598,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Cont // DeleteTriggeredWebJobSlot - Description for Delete a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -5406,7 +5648,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5414,7 +5656,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context. // DeleteVnetConnection - Description for Deletes a connection from an app (or deployment slot to a named virtual network. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -5459,7 +5701,7 @@ func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5467,7 +5709,7 @@ func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Conte // DeleteVnetConnectionSlot - Description for Deletes a connection from an app (or deployment slot to a named virtual network. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -5517,16 +5759,123 @@ func (client *WebAppsClient) deleteVnetConnectionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeployWorkflowArtifacts - Description for Creates the artifacts for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// options - WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts +// method. +func (client *WebAppsClient) DeployWorkflowArtifacts(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeployWorkflowArtifactsOptions) (WebAppsClientDeployWorkflowArtifactsResponse, error) { + req, err := client.deployWorkflowArtifactsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientDeployWorkflowArtifactsResponse{}, runtime.NewResponseError(resp) + } + return WebAppsClientDeployWorkflowArtifactsResponse{}, nil +} + +// deployWorkflowArtifactsCreateRequest creates the DeployWorkflowArtifacts request. +func (client *WebAppsClient) deployWorkflowArtifactsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeployWorkflowArtifactsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.WorkflowArtifacts != nil { + return req, runtime.MarshalAsJSON(req, *options.WorkflowArtifacts) + } + return req, nil +} + +// DeployWorkflowArtifactsSlot - Description for Creates the artifacts for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// slot - Name of the deployment slot. +// options - WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot +// method. +func (client *WebAppsClient) DeployWorkflowArtifactsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeployWorkflowArtifactsSlotOptions) (WebAppsClientDeployWorkflowArtifactsSlotResponse, error) { + req, err := client.deployWorkflowArtifactsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, runtime.NewResponseError(resp) + } + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, nil +} + +// deployWorkflowArtifactsSlotCreateRequest creates the DeployWorkflowArtifactsSlot request. +func (client *WebAppsClient) deployWorkflowArtifactsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeployWorkflowArtifactsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.WorkflowArtifacts != nil { + return req, runtime.MarshalAsJSON(req, *options.WorkflowArtifacts) + } return req, nil } // DiscoverBackup - Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use // this to get information about the databases stored in a backup. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // request - A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. @@ -5566,7 +5915,7 @@ func (client *WebAppsClient) discoverBackupCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -5584,7 +5933,7 @@ func (client *WebAppsClient) discoverBackupHandleResponse(resp *http.Response) ( // DiscoverBackupSlot - Description for Discovers an existing app backup that can be restored from a blob in Azure storage. // Use this to get information about the databases stored in a backup. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. @@ -5630,7 +5979,7 @@ func (client *WebAppsClient) discoverBackupSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -5648,7 +5997,7 @@ func (client *WebAppsClient) discoverBackupSlotHandleResponse(resp *http.Respons // GenerateNewSitePublishingPassword - Description for Generates a new publishing password for an app (or deployment slot, // if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword @@ -5688,7 +6037,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5697,7 +6046,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx // GenerateNewSitePublishingPasswordSlot - Description for Generates a new publishing password for an app (or deployment slot, // if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production @@ -5743,7 +6092,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5751,7 +6100,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest( // Get - Description for Gets the details of a web, mobile, or API app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. @@ -5790,7 +6139,7 @@ func (client *WebAppsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5807,7 +6156,7 @@ func (client *WebAppsClient) getHandleResponse(resp *http.Response) (WebAppsClie // GetAppSettingKeyVaultReference - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // appSettingKey - App Setting key name. @@ -5852,7 +6201,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5869,7 +6218,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceHandleResponse(resp * // GetAppSettingKeyVaultReferenceSlot - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // appSettingKey - App Setting key name. @@ -5918,7 +6267,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5934,8 +6283,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotHandleResponse(re } // NewGetAppSettingsKeyVaultReferencesPager - Description for Gets the config reference app settings and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.GetAppSettingsKeyVaultReferences @@ -5988,7 +6336,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6005,8 +6353,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesHandleResponse(resp // NewGetAppSettingsKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status of an // app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingsKeyVaultReferencesSlot @@ -6063,7 +6410,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6080,7 +6427,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotHandleResponse( // GetAuthSettings - Description for Gets the Authentication/Authorization settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. @@ -6119,7 +6466,7 @@ func (client *WebAppsClient) getAuthSettingsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6136,7 +6483,7 @@ func (client *WebAppsClient) getAuthSettingsHandleResponse(resp *http.Response) // GetAuthSettingsSlot - Description for Gets the Authentication/Authorization settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. @@ -6181,7 +6528,7 @@ func (client *WebAppsClient) getAuthSettingsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6198,7 +6545,7 @@ func (client *WebAppsClient) getAuthSettingsSlotHandleResponse(resp *http.Respon // GetAuthSettingsV2 - Description for Gets site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 @@ -6238,7 +6585,7 @@ func (client *WebAppsClient) getAuthSettingsV2CreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6255,7 +6602,7 @@ func (client *WebAppsClient) getAuthSettingsV2HandleResponse(resp *http.Response // GetAuthSettingsV2Slot - Description for Gets site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. @@ -6300,7 +6647,7 @@ func (client *WebAppsClient) getAuthSettingsV2SlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6318,7 +6665,7 @@ func (client *WebAppsClient) getAuthSettingsV2SlotHandleResponse(resp *http.Resp // GetAuthSettingsV2WithoutSecrets - Description for Gets site's Authentication / Authorization settings for apps via the // V2 format // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets @@ -6358,7 +6705,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6375,7 +6722,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsHandleResponse(resp // GetAuthSettingsV2WithoutSecretsSlot - Gets site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. @@ -6420,7 +6767,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6437,7 +6784,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotHandleResponse(r // GetBackupConfiguration - Description for Gets the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration @@ -6477,7 +6824,7 @@ func (client *WebAppsClient) getBackupConfigurationCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6494,7 +6841,7 @@ func (client *WebAppsClient) getBackupConfigurationHandleResponse(resp *http.Res // GetBackupConfigurationSlot - Description for Gets the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production @@ -6540,7 +6887,7 @@ func (client *WebAppsClient) getBackupConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6557,7 +6904,7 @@ func (client *WebAppsClient) getBackupConfigurationSlotHandleResponse(resp *http // GetBackupStatus - Description for Gets a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -6601,7 +6948,7 @@ func (client *WebAppsClient) getBackupStatusCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6618,7 +6965,7 @@ func (client *WebAppsClient) getBackupStatusHandleResponse(resp *http.Response) // GetBackupStatusSlot - Description for Gets a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -6668,7 +7015,7 @@ func (client *WebAppsClient) getBackupStatusSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6686,7 +7033,7 @@ func (client *WebAppsClient) getBackupStatusSlotHandleResponse(resp *http.Respon // GetConfiguration - Description for Gets the configuration of an app, such as platform version and bitness, default documents, // virtual applications, Always On, etc. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration @@ -6726,7 +7073,7 @@ func (client *WebAppsClient) getConfigurationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6744,7 +7091,7 @@ func (client *WebAppsClient) getConfigurationHandleResponse(resp *http.Response) // GetConfigurationSlot - Description for Gets the configuration of an app, such as platform version and bitness, default // documents, virtual applications, Always On, etc. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @@ -6789,7 +7136,7 @@ func (client *WebAppsClient) getConfigurationSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6806,7 +7153,7 @@ func (client *WebAppsClient) getConfigurationSlotHandleResponse(resp *http.Respo // GetConfigurationSnapshot - Description for Gets a snapshot of the configuration of an app at a previous point in time. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // snapshotID - The ID of the snapshot to read. @@ -6851,7 +7198,7 @@ func (client *WebAppsClient) getConfigurationSnapshotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6868,7 +7215,7 @@ func (client *WebAppsClient) getConfigurationSnapshotHandleResponse(resp *http.R // GetConfigurationSnapshotSlot - Description for Gets a snapshot of the configuration of an app at a previous point in time. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // snapshotID - The ID of the snapshot to read. @@ -6918,7 +7265,7 @@ func (client *WebAppsClient) getConfigurationSnapshotSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6935,7 +7282,7 @@ func (client *WebAppsClient) getConfigurationSnapshotSlotHandleResponse(resp *ht // GetContainerLogsZip - Description for Gets the ZIP archived docker log files for the given site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip @@ -6975,7 +7322,7 @@ func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/zip"} @@ -6984,7 +7331,7 @@ func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Contex // GetContainerLogsZipSlot - Description for Gets the ZIP archived docker log files for the given site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -7029,7 +7376,7 @@ func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/zip"} @@ -7038,7 +7385,7 @@ func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Co // GetContinuousWebJob - Description for Gets a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -7083,7 +7430,7 @@ func (client *WebAppsClient) getContinuousWebJobCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7100,7 +7447,7 @@ func (client *WebAppsClient) getContinuousWebJobHandleResponse(resp *http.Respon // GetContinuousWebJobSlot - Description for Gets a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -7150,7 +7497,7 @@ func (client *WebAppsClient) getContinuousWebJobSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7167,7 +7514,7 @@ func (client *WebAppsClient) getContinuousWebJobSlotHandleResponse(resp *http.Re // GetDeployment - Description for Get a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -7211,7 +7558,7 @@ func (client *WebAppsClient) getDeploymentCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7228,7 +7575,7 @@ func (client *WebAppsClient) getDeploymentHandleResponse(resp *http.Response) (W // GetDeploymentSlot - Description for Get a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -7278,7 +7625,7 @@ func (client *WebAppsClient) getDeploymentSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7295,7 +7642,7 @@ func (client *WebAppsClient) getDeploymentSlotHandleResponse(resp *http.Response // GetDiagnosticLogsConfiguration - Description for Gets the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration @@ -7335,7 +7682,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7352,7 +7699,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationHandleResponse(resp * // GetDiagnosticLogsConfigurationSlot - Description for Gets the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production @@ -7398,7 +7745,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7415,7 +7762,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotHandleResponse(re // GetDomainOwnershipIdentifier - Description for Get domain ownership identifier for web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -7460,7 +7807,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7477,7 +7824,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierHandleResponse(resp *ht // GetDomainOwnershipIdentifierSlot - Description for Get domain ownership identifier for web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -7527,7 +7874,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7544,7 +7891,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierSlotHandleResponse(resp // GetFtpAllowed - Description for Returns whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. @@ -7583,7 +7930,7 @@ func (client *WebAppsClient) getFtpAllowedCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7600,7 +7947,7 @@ func (client *WebAppsClient) getFtpAllowedHandleResponse(resp *http.Response) (W // GetFtpAllowedSlot - Description for Returns whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot @@ -7644,7 +7991,7 @@ func (client *WebAppsClient) getFtpAllowedSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7661,7 +8008,7 @@ func (client *WebAppsClient) getFtpAllowedSlotHandleResponse(resp *http.Response // GetFunction - Description for Get function information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -7705,7 +8052,7 @@ func (client *WebAppsClient) getFunctionCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7722,7 +8069,7 @@ func (client *WebAppsClient) getFunctionHandleResponse(resp *http.Response) (Web // GetFunctionsAdminToken - Description for Fetch a short lived token that can be exchanged for a master key. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken @@ -7762,7 +8109,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7779,7 +8126,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenHandleResponse(resp *http.Res // GetFunctionsAdminTokenSlot - Description for Fetch a short lived token that can be exchanged for a master key. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -7824,7 +8171,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7841,7 +8188,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenSlotHandleResponse(resp *http // GetHostNameBinding - Description for Get the named hostname binding for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -7886,7 +8233,7 @@ func (client *WebAppsClient) getHostNameBindingCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7903,7 +8250,7 @@ func (client *WebAppsClient) getHostNameBindingHandleResponse(resp *http.Respons // GetHostNameBindingSlot - Description for Get the named hostname binding for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @@ -7953,7 +8300,7 @@ func (client *WebAppsClient) getHostNameBindingSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7970,7 +8317,7 @@ func (client *WebAppsClient) getHostNameBindingSlotHandleResponse(resp *http.Res // GetHybridConnection - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -8020,7 +8367,7 @@ func (client *WebAppsClient) getHybridConnectionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8037,7 +8384,7 @@ func (client *WebAppsClient) getHybridConnectionHandleResponse(resp *http.Respon // GetHybridConnectionSlot - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -8092,7 +8439,7 @@ func (client *WebAppsClient) getHybridConnectionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8109,7 +8456,7 @@ func (client *WebAppsClient) getHybridConnectionSlotHandleResponse(resp *http.Re // GetInstanceFunctionSlot - Description for Get function information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -8159,7 +8506,7 @@ func (client *WebAppsClient) getInstanceFunctionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8176,7 +8523,7 @@ func (client *WebAppsClient) getInstanceFunctionSlotHandleResponse(resp *http.Re // GetInstanceInfo - Description for Gets all scale-out instances of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. @@ -8219,7 +8566,7 @@ func (client *WebAppsClient) getInstanceInfoCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8236,7 +8583,7 @@ func (client *WebAppsClient) getInstanceInfoHandleResponse(resp *http.Response) // GetInstanceInfoSlot - Description for Gets all scale-out instances of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @@ -8285,7 +8632,7 @@ func (client *WebAppsClient) getInstanceInfoSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8302,7 +8649,7 @@ func (client *WebAppsClient) getInstanceInfoSlotHandleResponse(resp *http.Respon // GetInstanceMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // instanceID - ID of web app instance. @@ -8347,7 +8694,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8364,7 +8711,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogHandleResponse(resp *http.Res // GetInstanceMSDeployLogSlot - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -8414,7 +8761,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8431,7 +8778,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogSlotHandleResponse(resp *http // GetInstanceMsDeployStatus - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // instanceID - ID of web app instance. @@ -8476,7 +8823,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8493,7 +8840,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusHandleResponse(resp *http. // GetInstanceMsDeployStatusSlot - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -8543,7 +8890,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8560,7 +8907,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotHandleResponse(resp *h // GetInstanceProcess - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8611,7 +8958,7 @@ func (client *WebAppsClient) getInstanceProcessCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8629,7 +8976,7 @@ func (client *WebAppsClient) getInstanceProcessHandleResponse(resp *http.Respons // GetInstanceProcessDump - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in // a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8680,7 +9027,7 @@ func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -8690,7 +9037,7 @@ func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Con // GetInstanceProcessDumpSlot - Description for Get a memory dump of a process by its ID for a specific scaled-out instance // in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8746,7 +9093,7 @@ func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -8756,7 +9103,7 @@ func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context // GetInstanceProcessModule - Description for Get process information by its ID for a specific scaled-out instance in a web // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8812,7 +9159,7 @@ func (client *WebAppsClient) getInstanceProcessModuleCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8830,7 +9177,7 @@ func (client *WebAppsClient) getInstanceProcessModuleHandleResponse(resp *http.R // GetInstanceProcessModuleSlot - Description for Get process information by its ID for a specific scaled-out instance in // a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8891,7 +9238,7 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8909,7 +9256,7 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotHandleResponse(resp *ht // GetInstanceProcessSlot - Description for Get process information by its ID for a specific scaled-out instance in a web // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8965,7 +9312,7 @@ func (client *WebAppsClient) getInstanceProcessSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8980,32 +9327,99 @@ func (client *WebAppsClient) getInstanceProcessSlotHandleResponse(resp *http.Res return result, nil } -// GetMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceWorkflowSlot - Get workflow information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. -func (client *WebAppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (WebAppsClientGetMSDeployLogResponse, error) { - req, err := client.getMSDeployLogCreateRequest(ctx, resourceGroupName, name, options) +// name - Site name. +// slot - Name of the deployment slot. +// workflowName - Workflow name. +// options - WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot +// method. +func (client *WebAppsClient) GetInstanceWorkflowSlot(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string, options *WebAppsClientGetInstanceWorkflowSlotOptions) (WebAppsClientGetInstanceWorkflowSlotResponse, error) { + req, err := client.getInstanceWorkflowSlotCreateRequest(ctx, resourceGroupName, name, slot, workflowName, options) if err != nil { - return WebAppsClientGetMSDeployLogResponse{}, err + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return WebAppsClientGetMSDeployLogResponse{}, err + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployLogResponse{}, runtime.NewResponseError(resp) + return WebAppsClientGetInstanceWorkflowSlotResponse{}, runtime.NewResponseError(resp) } - return client.getMSDeployLogHandleResponse(resp) + return client.getInstanceWorkflowSlotHandleResponse(resp) } -// getMSDeployLogCreateRequest creates the GetMSDeployLog request. -func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") +// getInstanceWorkflowSlotCreateRequest creates the GetInstanceWorkflowSlot request. +func (client *WebAppsClient) getInstanceWorkflowSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string, options *WebAppsClientGetInstanceWorkflowSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName}" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceWorkflowSlotHandleResponse handles the GetInstanceWorkflowSlot response. +func (client *WebAppsClient) getInstanceWorkflowSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceWorkflowSlotResponse, error) { + result := WebAppsClientGetInstanceWorkflowSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err + } + return result, nil +} + +// GetMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of web app. +// options - WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. +func (client *WebAppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (WebAppsClientGetMSDeployLogResponse, error) { + req, err := client.getMSDeployLogCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetMSDeployLogResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientGetMSDeployLogResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientGetMSDeployLogResponse{}, runtime.NewResponseError(resp) + } + return client.getMSDeployLogHandleResponse(resp) +} + +// getMSDeployLogCreateRequest creates the GetMSDeployLog request. +func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) if name == "" { @@ -9021,7 +9435,7 @@ func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9038,7 +9452,7 @@ func (client *WebAppsClient) getMSDeployLogHandleResponse(resp *http.Response) ( // GetMSDeployLogSlot - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -9083,7 +9497,7 @@ func (client *WebAppsClient) getMSDeployLogSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9100,7 +9514,7 @@ func (client *WebAppsClient) getMSDeployLogSlotHandleResponse(resp *http.Respons // GetMSDeployStatus - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus @@ -9140,7 +9554,7 @@ func (client *WebAppsClient) getMSDeployStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9157,7 +9571,7 @@ func (client *WebAppsClient) getMSDeployStatusHandleResponse(resp *http.Response // GetMSDeployStatusSlot - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -9202,7 +9616,7 @@ func (client *WebAppsClient) getMSDeployStatusSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9220,7 +9634,7 @@ func (client *WebAppsClient) getMSDeployStatusSlotHandleResponse(resp *http.Resp // GetMigrateMySQLStatus - Description for Returns the status of MySql in app migration, if one is active, and whether or // not MySql in app is enabled // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus @@ -9260,7 +9674,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9278,7 +9692,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusHandleResponse(resp *http.Resp // GetMigrateMySQLStatusSlot - Description for Returns the status of MySql in app migration, if one is active, and whether // or not MySql in app is enabled // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of the deployment slot. @@ -9323,7 +9737,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9341,7 +9755,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusSlotHandleResponse(resp *http. // GetNetworkTraceOperation - Description for Gets a named operation for a network trace capturing (or deployment slot, if // specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9386,7 +9800,7 @@ func (client *WebAppsClient) getNetworkTraceOperationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9404,7 +9818,7 @@ func (client *WebAppsClient) getNetworkTraceOperationHandleResponse(resp *http.R // GetNetworkTraceOperationSlot - Description for Gets a named operation for a network trace capturing (or deployment slot, // if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9454,7 +9868,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9472,7 +9886,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotHandleResponse(resp *ht // GetNetworkTraceOperationSlotV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, // if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9522,7 +9936,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotV2CreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9540,7 +9954,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotV2HandleResponse(resp * // GetNetworkTraceOperationV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, // if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9585,7 +9999,7 @@ func (client *WebAppsClient) getNetworkTraceOperationV2CreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9602,7 +10016,7 @@ func (client *WebAppsClient) getNetworkTraceOperationV2HandleResponse(resp *http // GetNetworkTraces - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9647,7 +10061,7 @@ func (client *WebAppsClient) getNetworkTracesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9664,7 +10078,7 @@ func (client *WebAppsClient) getNetworkTracesHandleResponse(resp *http.Response) // GetNetworkTracesSlot - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9714,7 +10128,7 @@ func (client *WebAppsClient) getNetworkTracesSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9731,7 +10145,7 @@ func (client *WebAppsClient) getNetworkTracesSlotHandleResponse(resp *http.Respo // GetNetworkTracesSlotV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9781,7 +10195,7 @@ func (client *WebAppsClient) getNetworkTracesSlotV2CreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9798,7 +10212,7 @@ func (client *WebAppsClient) getNetworkTracesSlotV2HandleResponse(resp *http.Res // GetNetworkTracesV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9843,7 +10257,7 @@ func (client *WebAppsClient) getNetworkTracesV2CreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9861,7 +10275,7 @@ func (client *WebAppsClient) getNetworkTracesV2HandleResponse(resp *http.Respons // GetOneDeployStatus - Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the // site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus @@ -9901,7 +10315,7 @@ func (client *WebAppsClient) getOneDeployStatusCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9918,7 +10332,7 @@ func (client *WebAppsClient) getOneDeployStatusHandleResponse(resp *http.Respons // GetPremierAddOn - Description for Gets a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -9962,7 +10376,7 @@ func (client *WebAppsClient) getPremierAddOnCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9979,7 +10393,7 @@ func (client *WebAppsClient) getPremierAddOnHandleResponse(resp *http.Response) // GetPremierAddOnSlot - Description for Gets a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -10029,7 +10443,7 @@ func (client *WebAppsClient) getPremierAddOnSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10047,7 +10461,7 @@ func (client *WebAppsClient) getPremierAddOnSlotHandleResponse(resp *http.Respon // GetPrivateAccess - Description for Gets data around private site access enablement and authorized Virtual Networks that // can access the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess @@ -10087,7 +10501,7 @@ func (client *WebAppsClient) getPrivateAccessCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10105,7 +10519,7 @@ func (client *WebAppsClient) getPrivateAccessHandleResponse(resp *http.Response) // GetPrivateAccessSlot - Description for Gets data around private site access enablement and authorized Virtual Networks // that can access the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for the web app. @@ -10150,7 +10564,7 @@ func (client *WebAppsClient) getPrivateAccessSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10167,7 +10581,7 @@ func (client *WebAppsClient) getPrivateAccessSlotHandleResponse(resp *http.Respo // GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -10212,7 +10626,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10229,8 +10643,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionHandleResponse(resp *ht // NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with // a site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionList @@ -10283,7 +10696,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10300,8 +10713,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListHandleResponse(resp // NewGetPrivateEndpointConnectionListSlotPager - Description for Gets the list of private endpoint connections associated // with a site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // slot - Name of the site deployment slot. @@ -10359,7 +10771,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10376,7 +10788,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotHandleResponse( // GetPrivateEndpointConnectionSlot - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -10426,7 +10838,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10443,7 +10855,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionSlotHandleResponse(resp // GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources @@ -10483,7 +10895,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10500,7 +10912,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesHandleResponse(resp *http.Re // GetPrivateLinkResourcesSlot - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // options - WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot @@ -10544,7 +10956,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10561,7 +10973,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesSlotHandleResponse(resp *htt // GetProcess - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10605,7 +11017,7 @@ func (client *WebAppsClient) getProcessCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10622,7 +11034,7 @@ func (client *WebAppsClient) getProcessHandleResponse(resp *http.Response) (WebA // GetProcessDump - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10666,7 +11078,7 @@ func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -10676,7 +11088,7 @@ func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, re // GetProcessDumpSlot - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web // site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10726,7 +11138,7 @@ func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -10735,7 +11147,7 @@ func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context // GetProcessModule - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10785,7 +11197,7 @@ func (client *WebAppsClient) getProcessModuleCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10802,7 +11214,7 @@ func (client *WebAppsClient) getProcessModuleHandleResponse(resp *http.Response) // GetProcessModuleSlot - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10857,7 +11269,7 @@ func (client *WebAppsClient) getProcessModuleSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10874,7 +11286,7 @@ func (client *WebAppsClient) getProcessModuleSlotHandleResponse(resp *http.Respo // GetProcessSlot - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10923,7 +11335,7 @@ func (client *WebAppsClient) getProcessSlotCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10940,7 +11352,7 @@ func (client *WebAppsClient) getProcessSlotHandleResponse(resp *http.Response) ( // BeginGetProductionSiteDeploymentStatus - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // deploymentStatusID - GUID of the deployment operation. @@ -10960,7 +11372,7 @@ func (client *WebAppsClient) BeginGetProductionSiteDeploymentStatus(ctx context. // GetProductionSiteDeploymentStatus - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) getProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*http.Response, error) { req, err := client.getProductionSiteDeploymentStatusCreateRequest(ctx, resourceGroupName, name, deploymentStatusID, options) if err != nil { @@ -11000,7 +11412,7 @@ func (client *WebAppsClient) getProductionSiteDeploymentStatusCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11008,7 +11420,7 @@ func (client *WebAppsClient) getProductionSiteDeploymentStatusCreateRequest(ctx // GetPublicCertificate - Description for Get the named public certificate for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -11053,7 +11465,7 @@ func (client *WebAppsClient) getPublicCertificateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11070,7 +11482,7 @@ func (client *WebAppsClient) getPublicCertificateHandleResponse(resp *http.Respo // GetPublicCertificateSlot - Description for Get the named public certificate for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @@ -11120,7 +11532,7 @@ func (client *WebAppsClient) getPublicCertificateSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11137,7 +11549,7 @@ func (client *WebAppsClient) getPublicCertificateSlotHandleResponse(resp *http.R // GetRelayServiceConnection - Description for Gets a hybrid connection configuration by its name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection. @@ -11182,7 +11594,7 @@ func (client *WebAppsClient) getRelayServiceConnectionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11199,7 +11611,7 @@ func (client *WebAppsClient) getRelayServiceConnectionHandleResponse(resp *http. // GetRelayServiceConnectionSlot - Description for Gets a hybrid connection configuration by its name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection. @@ -11250,7 +11662,7 @@ func (client *WebAppsClient) getRelayServiceConnectionSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11267,7 +11679,7 @@ func (client *WebAppsClient) getRelayServiceConnectionSlotHandleResponse(resp *h // GetScmAllowed - Description for Returns whether Scm basic auth is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. @@ -11306,7 +11718,7 @@ func (client *WebAppsClient) getScmAllowedCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11323,7 +11735,7 @@ func (client *WebAppsClient) getScmAllowedHandleResponse(resp *http.Response) (W // GetScmAllowedSlot - Description for Returns whether Scm basic auth is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot @@ -11367,7 +11779,7 @@ func (client *WebAppsClient) getScmAllowedSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11384,7 +11796,7 @@ func (client *WebAppsClient) getScmAllowedSlotHandleResponse(resp *http.Response // GetSiteConnectionStringKeyVaultReference - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference @@ -11428,7 +11840,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11445,7 +11857,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceHandleRespo // GetSiteConnectionStringKeyVaultReferenceSlot - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot @@ -11493,7 +11905,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11510,8 +11922,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotHandleR // NewGetSiteConnectionStringKeyVaultReferencesPager - Description for Gets the config reference app settings and status of // an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferences @@ -11564,7 +11975,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11581,8 +11992,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesHandleResp // NewGetSiteConnectionStringKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status // of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot @@ -11639,7 +12049,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11654,9 +12064,139 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotHandle return result, nil } +// GetSiteContainer - Gets a site container of a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// containerName - Site Container Name +// options - WebAppsClientGetSiteContainerOptions contains the optional parameters for the WebAppsClient.GetSiteContainer +// method. +func (client *WebAppsClient) GetSiteContainer(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientGetSiteContainerOptions) (WebAppsClientGetSiteContainerResponse, error) { + req, err := client.getSiteContainerCreateRequest(ctx, resourceGroupName, name, containerName, options) + if err != nil { + return WebAppsClientGetSiteContainerResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientGetSiteContainerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientGetSiteContainerResponse{}, runtime.NewResponseError(resp) + } + return client.getSiteContainerHandleResponse(resp) +} + +// getSiteContainerCreateRequest creates the GetSiteContainer request. +func (client *WebAppsClient) getSiteContainerCreateRequest(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientGetSiteContainerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteContainerHandleResponse handles the GetSiteContainer response. +func (client *WebAppsClient) getSiteContainerHandleResponse(resp *http.Response) (WebAppsClientGetSiteContainerResponse, error) { + result := WebAppsClientGetSiteContainerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientGetSiteContainerResponse{}, err + } + return result, nil +} + +// GetSiteContainerSlot - Gets a site container of a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// slot - Name of the deployment slot. If a slot is not specified, the API will get the Site Container for the production +// slot. +// containerName - Site Container Name +// options - WebAppsClientGetSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.GetSiteContainerSlot +// method. +func (client *WebAppsClient) GetSiteContainerSlot(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientGetSiteContainerSlotOptions) (WebAppsClientGetSiteContainerSlotResponse, error) { + req, err := client.getSiteContainerSlotCreateRequest(ctx, resourceGroupName, name, slot, containerName, options) + if err != nil { + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientGetSiteContainerSlotResponse{}, runtime.NewResponseError(resp) + } + return client.getSiteContainerSlotHandleResponse(resp) +} + +// getSiteContainerSlotCreateRequest creates the GetSiteContainerSlot request. +func (client *WebAppsClient) getSiteContainerSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientGetSiteContainerSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteContainerSlotHandleResponse handles the GetSiteContainerSlot response. +func (client *WebAppsClient) getSiteContainerSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteContainerSlotResponse, error) { + result := WebAppsClientGetSiteContainerSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + return result, nil +} + // GetSiteExtension - Description for Get site extension information by its ID for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -11701,7 +12241,7 @@ func (client *WebAppsClient) getSiteExtensionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11718,7 +12258,7 @@ func (client *WebAppsClient) getSiteExtensionHandleResponse(resp *http.Response) // GetSiteExtensionSlot - Description for Get site extension information by its ID for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -11768,7 +12308,7 @@ func (client *WebAppsClient) getSiteExtensionSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11785,7 +12325,7 @@ func (client *WebAppsClient) getSiteExtensionSlotHandleResponse(resp *http.Respo // GetSitePhpErrorLogFlag - Description for Gets web app's event logs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag @@ -11825,7 +12365,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11842,7 +12382,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagHandleResponse(resp *http.Res // GetSitePhpErrorLogFlagSlot - Description for Gets web app's event logs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -11887,7 +12427,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11904,7 +12444,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagSlotHandleResponse(resp *http // GetSlot - Description for Gets the details of a web, mobile, or API app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. By default, this API returns the production slot. @@ -11948,7 +12488,7 @@ func (client *WebAppsClient) getSlotCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11965,7 +12505,7 @@ func (client *WebAppsClient) getSlotHandleResponse(resp *http.Response) (WebApps // BeginGetSlotSiteDeploymentStatusSlot - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production @@ -11987,7 +12527,7 @@ func (client *WebAppsClient) BeginGetSlotSiteDeploymentStatusSlot(ctx context.Co // GetSlotSiteDeploymentStatusSlot - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) getSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*http.Response, error) { req, err := client.getSlotSiteDeploymentStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, deploymentStatusID, options) if err != nil { @@ -12031,7 +12571,7 @@ func (client *WebAppsClient) getSlotSiteDeploymentStatusSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12039,7 +12579,7 @@ func (client *WebAppsClient) getSlotSiteDeploymentStatusSlotCreateRequest(ctx co // GetSourceControl - Description for Gets the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl @@ -12079,7 +12619,7 @@ func (client *WebAppsClient) getSourceControlCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12096,7 +12636,7 @@ func (client *WebAppsClient) getSourceControlHandleResponse(resp *http.Response) // GetSourceControlSlot - Description for Gets the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the @@ -12142,7 +12682,7 @@ func (client *WebAppsClient) getSourceControlSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12159,7 +12699,7 @@ func (client *WebAppsClient) getSourceControlSlotHandleResponse(resp *http.Respo // GetSwiftVirtualNetworkConnection - Description for Gets a Swift Virtual Network connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection @@ -12199,7 +12739,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12216,7 +12756,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionHandleResponse(resp // GetSwiftVirtualNetworkConnectionSlot - Description for Gets a Swift Virtual Network connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual @@ -12262,7 +12802,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12279,7 +12819,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotHandleResponse( // GetTriggeredWebJob - Description for Gets a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12324,7 +12864,7 @@ func (client *WebAppsClient) getTriggeredWebJobCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12342,7 +12882,7 @@ func (client *WebAppsClient) getTriggeredWebJobHandleResponse(resp *http.Respons // GetTriggeredWebJobHistory - Description for Gets a triggered web job's history by its ID for an app, , or a deployment // slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12392,7 +12932,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12410,7 +12950,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryHandleResponse(resp *http. // GetTriggeredWebJobHistorySlot - Description for Gets a triggered web job's history by its ID for an app, , or a deployment // slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12465,7 +13005,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12482,7 +13022,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotHandleResponse(resp *h // GetTriggeredWebJobSlot - Description for Gets a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12532,7 +13072,7 @@ func (client *WebAppsClient) getTriggeredWebJobSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12549,7 +13089,7 @@ func (client *WebAppsClient) getTriggeredWebJobSlotHandleResponse(resp *http.Res // GetVnetConnection - Description for Gets a virtual network the app (or deployment slot) is connected to by name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -12594,7 +13134,7 @@ func (client *WebAppsClient) getVnetConnectionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12611,7 +13151,7 @@ func (client *WebAppsClient) getVnetConnectionHandleResponse(resp *http.Response // GetVnetConnectionGateway - Description for Gets an app's Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -12661,7 +13201,7 @@ func (client *WebAppsClient) getVnetConnectionGatewayCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12678,7 +13218,7 @@ func (client *WebAppsClient) getVnetConnectionGatewayHandleResponse(resp *http.R // GetVnetConnectionGatewaySlot - Description for Gets an app's Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -12734,7 +13274,7 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12751,7 +13291,7 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotHandleResponse(resp *ht // GetVnetConnectionSlot - Description for Gets a virtual network the app (or deployment slot) is connected to by name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -12802,7 +13342,7 @@ func (client *WebAppsClient) getVnetConnectionSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12819,7 +13359,7 @@ func (client *WebAppsClient) getVnetConnectionSlotHandleResponse(resp *http.Resp // GetWebJob - Description for Get webjob information for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of the web job. @@ -12863,7 +13403,7 @@ func (client *WebAppsClient) getWebJobCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12880,7 +13420,7 @@ func (client *WebAppsClient) getWebJobHandleResponse(resp *http.Response) (WebAp // GetWebJobSlot - Description for Get webjob information for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of the web job. @@ -12929,7 +13469,7 @@ func (client *WebAppsClient) getWebJobSlotCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12946,7 +13486,7 @@ func (client *WebAppsClient) getWebJobSlotHandleResponse(resp *http.Response) (W // GetWebSiteContainerLogs - Description for Gets the last lines of docker logs for the given site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs @@ -12986,7 +13526,7 @@ func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/octet-stream"} @@ -12995,7 +13535,7 @@ func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Co // GetWebSiteContainerLogsSlot - Description for Gets the last lines of docker logs for the given site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -13040,16 +13580,77 @@ func (client *WebAppsClient) getWebSiteContainerLogsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/octet-stream"} return req, nil } +// GetWorkflow - Get workflow information by its ID for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - Workflow name. +// options - WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. +func (client *WebAppsClient) GetWorkflow(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WebAppsClientGetWorkflowOptions) (WebAppsClientGetWorkflowResponse, error) { + req, err := client.getWorkflowCreateRequest(ctx, resourceGroupName, name, workflowName, options) + if err != nil { + return WebAppsClientGetWorkflowResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientGetWorkflowResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientGetWorkflowResponse{}, runtime.NewResponseError(resp) + } + return client.getWorkflowHandleResponse(resp) +} + +// getWorkflowCreateRequest creates the GetWorkflow request. +func (client *WebAppsClient) getWorkflowCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WebAppsClientGetWorkflowOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName}" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWorkflowHandleResponse handles the GetWorkflow response. +func (client *WebAppsClient) getWorkflowHandleResponse(resp *http.Response) (WebAppsClientGetWorkflowResponse, error) { + result := WebAppsClientGetWorkflowResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientGetWorkflowResponse{}, err + } + return result, nil +} + // BeginInstallSiteExtension - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -13069,7 +13670,7 @@ func (client *WebAppsClient) BeginInstallSiteExtension(ctx context.Context, reso // InstallSiteExtension - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) installSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*http.Response, error) { req, err := client.installSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) if err != nil { @@ -13109,7 +13710,7 @@ func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13117,7 +13718,7 @@ func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Conte // BeginInstallSiteExtensionSlot - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -13138,7 +13739,7 @@ func (client *WebAppsClient) BeginInstallSiteExtensionSlot(ctx context.Context, // InstallSiteExtensionSlot - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) installSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*http.Response, error) { req, err := client.installSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) if err != nil { @@ -13182,7 +13783,7 @@ func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13190,7 +13791,7 @@ func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.C // IsCloneable - Description for Shows whether an app can be cloned to another resource group or subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. @@ -13229,7 +13830,7 @@ func (client *WebAppsClient) isCloneableCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13246,7 +13847,7 @@ func (client *WebAppsClient) isCloneableHandleResponse(resp *http.Response) (Web // IsCloneableSlot - Description for Shows whether an app can be cloned to another resource group or subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. By default, this API returns information on the production slot. @@ -13290,7 +13891,7 @@ func (client *WebAppsClient) isCloneableSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13306,8 +13907,7 @@ func (client *WebAppsClient) isCloneableSlotHandleResponse(resp *http.Response) } // NewListPager - Description for Get all apps for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebAppsClientListOptions contains the optional parameters for the WebAppsClient.List method. func (client *WebAppsClient) NewListPager(options *WebAppsClientListOptions) *runtime.Pager[WebAppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WebAppsClientListResponse]{ @@ -13349,7 +13949,7 @@ func (client *WebAppsClient) listCreateRequest(ctx context.Context, options *Web return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13366,7 +13966,7 @@ func (client *WebAppsClient) listHandleResponse(resp *http.Response) (WebAppsCli // ListApplicationSettings - Description for Gets the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings @@ -13406,7 +14006,7 @@ func (client *WebAppsClient) listApplicationSettingsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13423,7 +14023,7 @@ func (client *WebAppsClient) listApplicationSettingsHandleResponse(resp *http.Re // ListApplicationSettingsSlot - Description for Gets the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production @@ -13469,7 +14069,7 @@ func (client *WebAppsClient) listApplicationSettingsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13486,7 +14086,7 @@ func (client *WebAppsClient) listApplicationSettingsSlotHandleResponse(resp *htt // ListAzureStorageAccounts - Description for Gets the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts @@ -13526,7 +14126,7 @@ func (client *WebAppsClient) listAzureStorageAccountsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13543,7 +14143,7 @@ func (client *WebAppsClient) listAzureStorageAccountsHandleResponse(resp *http.R // ListAzureStorageAccountsSlot - Description for Gets the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations @@ -13589,7 +14189,7 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13608,7 +14208,7 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotHandleResponse(resp *ht // with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the // backup if a new URL is passed in the request body. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // backupID - ID of backup. @@ -13654,7 +14254,7 @@ func (client *WebAppsClient) listBackupStatusSecretsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -13673,7 +14273,7 @@ func (client *WebAppsClient) listBackupStatusSecretsHandleResponse(resp *http.Re // associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the // backup if a new URL is passed in the request body. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // backupID - ID of backup. @@ -13724,7 +14324,7 @@ func (client *WebAppsClient) listBackupStatusSecretsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -13740,8 +14340,7 @@ func (client *WebAppsClient) listBackupStatusSecretsSlotHandleResponse(resp *htt } // NewListBackupsPager - Description for Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.ListBackups method. @@ -13793,7 +14392,7 @@ func (client *WebAppsClient) listBackupsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13809,8 +14408,7 @@ func (client *WebAppsClient) listBackupsHandleResponse(resp *http.Response) (Web } // NewListBackupsSlotPager - Description for Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @@ -13867,7 +14465,7 @@ func (client *WebAppsClient) listBackupsSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13884,8 +14482,7 @@ func (client *WebAppsClient) listBackupsSlotHandleResponse(resp *http.Response) // NewListBasicPublishingCredentialsPoliciesPager - Description for Returns whether Scm basic auth is allowed and whether // Ftp is allowed for a given site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.ListBasicPublishingCredentialsPolicies @@ -13938,7 +14535,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13955,8 +14552,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesHandleRespons // NewListBasicPublishingCredentialsPoliciesSlotPager - Description for Returns whether Scm basic auth is allowed and whether // Ftp is allowed for a given site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot @@ -14013,7 +14609,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14029,8 +14625,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotHandleRes } // NewListByResourceGroupPager - Description for Gets all web, mobile, and API apps in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.ListByResourceGroup // method. @@ -14081,7 +14676,7 @@ func (client *WebAppsClient) listByResourceGroupCreateRequest(ctx context.Contex if options != nil && options.IncludeSlots != nil { reqQP.Set("includeSlots", strconv.FormatBool(*options.IncludeSlots)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14098,8 +14693,7 @@ func (client *WebAppsClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListConfigurationSnapshotInfoPager - Description for Gets a list of web app configuration snapshots identifiers. Each // element of the list contains a timestamp and the ID of the snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.ListConfigurationSnapshotInfo @@ -14152,7 +14746,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14169,8 +14763,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoHandleResponse(resp *h // NewListConfigurationSnapshotInfoSlotPager - Description for Gets a list of web app configuration snapshots identifiers. // Each element of the list contains a timestamp and the ID of the snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @@ -14228,7 +14821,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14244,8 +14837,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoSlotHandleResponse(res } // NewListConfigurationsPager - Description for List the configurations of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.ListConfigurations @@ -14298,7 +14890,7 @@ func (client *WebAppsClient) listConfigurationsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14314,8 +14906,7 @@ func (client *WebAppsClient) listConfigurationsHandleResponse(resp *http.Respons } // NewListConfigurationsSlotPager - Description for List the configurations of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @@ -14373,7 +14964,7 @@ func (client *WebAppsClient) listConfigurationsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14390,7 +14981,7 @@ func (client *WebAppsClient) listConfigurationsSlotHandleResponse(resp *http.Res // ListConnectionStrings - Description for Gets the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings @@ -14430,7 +15021,7 @@ func (client *WebAppsClient) listConnectionStringsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14447,7 +15038,7 @@ func (client *WebAppsClient) listConnectionStringsHandleResponse(resp *http.Resp // ListConnectionStringsSlot - Description for Gets the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production @@ -14493,7 +15084,7 @@ func (client *WebAppsClient) listConnectionStringsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14509,8 +15100,7 @@ func (client *WebAppsClient) listConnectionStringsSlotHandleResponse(resp *http. } // NewListContinuousWebJobsPager - Description for List continuous web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.ListContinuousWebJobs @@ -14563,7 +15153,7 @@ func (client *WebAppsClient) listContinuousWebJobsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14579,8 +15169,7 @@ func (client *WebAppsClient) listContinuousWebJobsHandleResponse(resp *http.Resp } // NewListContinuousWebJobsSlotPager - Description for List continuous web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @@ -14638,7 +15227,7 @@ func (client *WebAppsClient) listContinuousWebJobsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14655,7 +15244,7 @@ func (client *WebAppsClient) listContinuousWebJobsSlotHandleResponse(resp *http. // ListDeploymentLog - Description for List deployment log for specific deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". @@ -14700,7 +15289,7 @@ func (client *WebAppsClient) listDeploymentLogCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14717,7 +15306,7 @@ func (client *WebAppsClient) listDeploymentLogHandleResponse(resp *http.Response // ListDeploymentLogSlot - Description for List deployment log for specific deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". @@ -14767,7 +15356,7 @@ func (client *WebAppsClient) listDeploymentLogSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14783,8 +15372,7 @@ func (client *WebAppsClient) listDeploymentLogSlotHandleResponse(resp *http.Resp } // NewListDeploymentsPager - Description for List deployments for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.ListDeployments method. @@ -14836,7 +15424,7 @@ func (client *WebAppsClient) listDeploymentsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14852,8 +15440,7 @@ func (client *WebAppsClient) listDeploymentsHandleResponse(resp *http.Response) } // NewListDeploymentsSlotPager - Description for List deployments for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -14911,7 +15498,7 @@ func (client *WebAppsClient) listDeploymentsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14927,8 +15514,7 @@ func (client *WebAppsClient) listDeploymentsSlotHandleResponse(resp *http.Respon } // NewListDomainOwnershipIdentifiersPager - Description for Lists ownership identifiers for domain associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.ListDomainOwnershipIdentifiers @@ -14981,7 +15567,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14998,8 +15584,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersHandleResponse(resp * // NewListDomainOwnershipIdentifiersSlotPager - Description for Lists ownership identifiers for domain associated with web // app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @@ -15057,7 +15642,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15074,7 +15659,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotHandleResponse(re // ListFunctionKeys - Description for Get function keys for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15119,7 +15704,7 @@ func (client *WebAppsClient) listFunctionKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15136,7 +15721,7 @@ func (client *WebAppsClient) listFunctionKeysHandleResponse(resp *http.Response) // ListFunctionKeysSlot - Description for Get function keys for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15186,7 +15771,7 @@ func (client *WebAppsClient) listFunctionKeysSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15203,7 +15788,7 @@ func (client *WebAppsClient) listFunctionKeysSlotHandleResponse(resp *http.Respo // ListFunctionSecrets - Description for Get function secrets for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15248,7 +15833,7 @@ func (client *WebAppsClient) listFunctionSecretsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15265,7 +15850,7 @@ func (client *WebAppsClient) listFunctionSecretsHandleResponse(resp *http.Respon // ListFunctionSecretsSlot - Description for Get function secrets for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15315,7 +15900,7 @@ func (client *WebAppsClient) listFunctionSecretsSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15331,8 +15916,7 @@ func (client *WebAppsClient) listFunctionSecretsSlotHandleResponse(resp *http.Re } // NewListFunctionsPager - Description for List the functions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.ListFunctions method. @@ -15384,7 +15968,7 @@ func (client *WebAppsClient) listFunctionsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15401,7 +15985,7 @@ func (client *WebAppsClient) listFunctionsHandleResponse(resp *http.Response) (W // ListHostKeys - Description for Get host secrets for a function app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. @@ -15440,7 +16024,7 @@ func (client *WebAppsClient) listHostKeysCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15457,7 +16041,7 @@ func (client *WebAppsClient) listHostKeysHandleResponse(resp *http.Response) (We // ListHostKeysSlot - Description for Get host secrets for a function app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. @@ -15502,7 +16086,7 @@ func (client *WebAppsClient) listHostKeysSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15518,8 +16102,7 @@ func (client *WebAppsClient) listHostKeysSlotHandleResponse(resp *http.Response) } // NewListHostNameBindingsPager - Description for Get hostname bindings for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.ListHostNameBindings @@ -15572,7 +16155,7 @@ func (client *WebAppsClient) listHostNameBindingsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15588,8 +16171,7 @@ func (client *WebAppsClient) listHostNameBindingsHandleResponse(resp *http.Respo } // NewListHostNameBindingsSlotPager - Description for Get hostname bindings for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @@ -15647,7 +16229,7 @@ func (client *WebAppsClient) listHostNameBindingsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15664,7 +16246,7 @@ func (client *WebAppsClient) listHostNameBindingsSlotHandleResponse(resp *http.R // ListHybridConnections - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections @@ -15704,7 +16286,7 @@ func (client *WebAppsClient) listHybridConnectionsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15721,7 +16303,7 @@ func (client *WebAppsClient) listHybridConnectionsHandleResponse(resp *http.Resp // ListHybridConnectionsSlot - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for the web app. @@ -15766,7 +16348,7 @@ func (client *WebAppsClient) listHybridConnectionsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15782,8 +16364,7 @@ func (client *WebAppsClient) listHybridConnectionsSlotHandleResponse(resp *http. } // NewListInstanceFunctionsSlotPager - Description for List the functions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. @@ -15841,7 +16422,7 @@ func (client *WebAppsClient) listInstanceFunctionsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15857,8 +16438,7 @@ func (client *WebAppsClient) listInstanceFunctionsSlotHandleResponse(resp *http. } // NewListInstanceIdentifiersPager - Description for Gets all scale-out instances of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.ListInstanceIdentifiers @@ -15911,7 +16491,7 @@ func (client *WebAppsClient) listInstanceIdentifiersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15927,8 +16507,7 @@ func (client *WebAppsClient) listInstanceIdentifiersHandleResponse(resp *http.Re } // NewListInstanceIdentifiersSlotPager - Description for Gets all scale-out instances of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @@ -15986,7 +16565,7 @@ func (client *WebAppsClient) listInstanceIdentifiersSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16003,8 +16582,7 @@ func (client *WebAppsClient) listInstanceIdentifiersSlotHandleResponse(resp *htt // NewListInstanceProcessModulesPager - Description for List module information for a process by its ID for a specific scaled-out // instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16068,7 +16646,7 @@ func (client *WebAppsClient) listInstanceProcessModulesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16085,8 +16663,7 @@ func (client *WebAppsClient) listInstanceProcessModulesHandleResponse(resp *http // NewListInstanceProcessModulesSlotPager - Description for List module information for a process by its ID for a specific // scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16155,7 +16732,7 @@ func (client *WebAppsClient) listInstanceProcessModulesSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16172,8 +16749,7 @@ func (client *WebAppsClient) listInstanceProcessModulesSlotHandleResponse(resp * // NewListInstanceProcessThreadsPager - Description for List the threads in a process by its ID for a specific scaled-out // instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16237,7 +16813,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16254,8 +16830,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsHandleResponse(resp *http // NewListInstanceProcessThreadsSlotPager - Description for List the threads in a process by its ID for a specific scaled-out // instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16324,7 +16899,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16341,8 +16916,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsSlotHandleResponse(resp * // NewListInstanceProcessesPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific // scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET @@ -16401,7 +16975,7 @@ func (client *WebAppsClient) listInstanceProcessesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16418,8 +16992,7 @@ func (client *WebAppsClient) listInstanceProcessesHandleResponse(resp *http.Resp // NewListInstanceProcessesSlotPager - Description for Get list of processes for a web site, or a deployment slot, or for // a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -16483,7 +17056,7 @@ func (client *WebAppsClient) listInstanceProcessesSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16498,30 +17071,104 @@ func (client *WebAppsClient) listInstanceProcessesSlotHandleResponse(resp *http. return result, nil } -// ListMetadata - Description for Gets the metadata of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// NewListInstanceWorkflowsSlotPager - List the workflows for a web site, or a deployment slot. +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. -func (client *WebAppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (WebAppsClientListMetadataResponse, error) { - req, err := client.listMetadataCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListMetadataResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListMetadataResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListMetadataResponse{}, runtime.NewResponseError(resp) - } - return client.listMetadataHandleResponse(resp) +// name - Site name. +// slot - Name of the deployment slot. +// options - WebAppsClientListInstanceWorkflowsSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceWorkflowsSlot +// method. +func (client *WebAppsClient) NewListInstanceWorkflowsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceWorkflowsSlotOptions) *runtime.Pager[WebAppsClientListInstanceWorkflowsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceWorkflowsSlotResponse]{ + More: func(page WebAppsClientListInstanceWorkflowsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceWorkflowsSlotResponse) (WebAppsClientListInstanceWorkflowsSlotResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listInstanceWorkflowsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebAppsClientListInstanceWorkflowsSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListInstanceWorkflowsSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListInstanceWorkflowsSlotResponse{}, runtime.NewResponseError(resp) + } + return client.listInstanceWorkflowsSlotHandleResponse(resp) + }, + }) } -// listMetadataCreateRequest creates the ListMetadata request. -func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list" +// listInstanceWorkflowsSlotCreateRequest creates the ListInstanceWorkflowsSlot request. +func (client *WebAppsClient) listInstanceWorkflowsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceWorkflowsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceWorkflowsSlotHandleResponse handles the ListInstanceWorkflowsSlot response. +func (client *WebAppsClient) listInstanceWorkflowsSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceWorkflowsSlotResponse, error) { + result := WebAppsClientListInstanceWorkflowsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelopeCollection); err != nil { + return WebAppsClientListInstanceWorkflowsSlotResponse{}, err + } + return result, nil +} + +// ListMetadata - Description for Gets the metadata of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// options - WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. +func (client *WebAppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (WebAppsClientListMetadataResponse, error) { + req, err := client.listMetadataCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListMetadataResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListMetadataResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListMetadataResponse{}, runtime.NewResponseError(resp) + } + return client.listMetadataHandleResponse(resp) +} + +// listMetadataCreateRequest creates the ListMetadata request. +func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") } @@ -16539,7 +17186,7 @@ func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16556,7 +17203,7 @@ func (client *WebAppsClient) listMetadataHandleResponse(resp *http.Response) (We // ListMetadataSlot - Description for Gets the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. @@ -16601,7 +17248,7 @@ func (client *WebAppsClient) listMetadataSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16618,7 +17265,7 @@ func (client *WebAppsClient) listMetadataSlotHandleResponse(resp *http.Response) // ListNetworkFeatures - Description for Gets all network features used by the app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // view - The type of view. Only "summary" is supported at this time. @@ -16663,7 +17310,7 @@ func (client *WebAppsClient) listNetworkFeaturesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16680,7 +17327,7 @@ func (client *WebAppsClient) listNetworkFeaturesHandleResponse(resp *http.Respon // ListNetworkFeaturesSlot - Description for Gets all network features used by the app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // view - The type of view. Only "summary" is supported at this time. @@ -16730,7 +17377,7 @@ func (client *WebAppsClient) listNetworkFeaturesSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16746,8 +17393,7 @@ func (client *WebAppsClient) listNetworkFeaturesSlotHandleResponse(resp *http.Re } // NewListPerfMonCountersPager - Description for Gets perfmon counters for web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.ListPerfMonCounters @@ -16800,7 +17446,7 @@ func (client *WebAppsClient) listPerfMonCountersCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -16821,8 +17467,7 @@ func (client *WebAppsClient) listPerfMonCountersHandleResponse(resp *http.Respon } // NewListPerfMonCountersSlotPager - Description for Gets perfmon counters for web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -16880,7 +17525,7 @@ func (client *WebAppsClient) listPerfMonCountersSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -16902,7 +17547,7 @@ func (client *WebAppsClient) listPerfMonCountersSlotHandleResponse(resp *http.Re // ListPremierAddOns - Description for Gets the premier add-ons of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns @@ -16942,7 +17587,7 @@ func (client *WebAppsClient) listPremierAddOnsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16959,7 +17604,7 @@ func (client *WebAppsClient) listPremierAddOnsHandleResponse(resp *http.Response // ListPremierAddOnsSlot - Description for Gets the premier add-ons of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production @@ -17005,7 +17650,7 @@ func (client *WebAppsClient) listPremierAddOnsSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17022,8 +17667,7 @@ func (client *WebAppsClient) listPremierAddOnsSlotHandleResponse(resp *http.Resp // NewListProcessModulesPager - Description for List module information for a process by its ID for a specific scaled-out // instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -17081,7 +17725,7 @@ func (client *WebAppsClient) listProcessModulesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17098,8 +17742,7 @@ func (client *WebAppsClient) listProcessModulesHandleResponse(resp *http.Respons // NewListProcessModulesSlotPager - Description for List module information for a process by its ID for a specific scaled-out // instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -17162,7 +17805,7 @@ func (client *WebAppsClient) listProcessModulesSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17179,8 +17822,7 @@ func (client *WebAppsClient) listProcessModulesSlotHandleResponse(resp *http.Res // NewListProcessThreadsPager - Description for List the threads in a process by its ID for a specific scaled-out instance // in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -17238,7 +17880,7 @@ func (client *WebAppsClient) listProcessThreadsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17255,8 +17897,7 @@ func (client *WebAppsClient) listProcessThreadsHandleResponse(resp *http.Respons // NewListProcessThreadsSlotPager - Description for List the threads in a process by its ID for a specific scaled-out instance // in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -17319,7 +17960,7 @@ func (client *WebAppsClient) listProcessThreadsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17336,8 +17977,7 @@ func (client *WebAppsClient) listProcessThreadsSlotHandleResponse(resp *http.Res // NewListProcessesPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out // instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.ListProcesses method. @@ -17389,7 +18029,7 @@ func (client *WebAppsClient) listProcessesCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17406,8 +18046,7 @@ func (client *WebAppsClient) listProcessesHandleResponse(resp *http.Response) (W // NewListProcessesSlotPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific // scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -17465,7 +18104,7 @@ func (client *WebAppsClient) listProcessesSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17481,8 +18120,7 @@ func (client *WebAppsClient) listProcessesSlotHandleResponse(resp *http.Response } // NewListProductionSiteDeploymentStatusesPager - List deployment statuses for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.ListProductionSiteDeploymentStatuses @@ -17535,7 +18173,7 @@ func (client *WebAppsClient) listProductionSiteDeploymentStatusesCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17551,8 +18189,7 @@ func (client *WebAppsClient) listProductionSiteDeploymentStatusesHandleResponse( } // NewListPublicCertificatesPager - Description for Get public certificates for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.ListPublicCertificates @@ -17605,7 +18242,7 @@ func (client *WebAppsClient) listPublicCertificatesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17621,8 +18258,7 @@ func (client *WebAppsClient) listPublicCertificatesHandleResponse(resp *http.Res } // NewListPublicCertificatesSlotPager - Description for Get public certificates for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @@ -17680,7 +18316,7 @@ func (client *WebAppsClient) listPublicCertificatesSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17697,7 +18333,7 @@ func (client *WebAppsClient) listPublicCertificatesSlotHandleResponse(resp *http // BeginListPublishingCredentials - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials @@ -17716,7 +18352,7 @@ func (client *WebAppsClient) BeginListPublishingCredentials(ctx context.Context, // ListPublishingCredentials - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) listPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*http.Response, error) { req, err := client.listPublishingCredentialsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -17752,7 +18388,7 @@ func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17760,7 +18396,7 @@ func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context. // BeginListPublishingCredentialsSlot - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production @@ -17781,7 +18417,7 @@ func (client *WebAppsClient) BeginListPublishingCredentialsSlot(ctx context.Cont // ListPublishingCredentialsSlot - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) listPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*http.Response, error) { req, err := client.listPublishingCredentialsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { @@ -17821,7 +18457,7 @@ func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17829,7 +18465,7 @@ func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx cont // ListPublishingProfileXMLWithSecrets - Description for Gets the publishing profile for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publishingProfileOptions - Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} @@ -17871,7 +18507,7 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/xml"} @@ -17881,7 +18517,7 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ct // ListPublishingProfileXMLWithSecretsSlot - Description for Gets the publishing profile for an app (or deployment slot, if // specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production @@ -17929,7 +18565,7 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsSlotCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/xml"} @@ -17938,7 +18574,7 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsSlotCreateReques // ListRelayServiceConnections - Description for Gets hybrid connections configured for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections @@ -17978,7 +18614,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17996,7 +18632,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsHandleResponse(resp *htt // ListRelayServiceConnectionsSlot - Description for Gets hybrid connections configured for an app (or deployment slot, if // specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production @@ -18042,7 +18678,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18058,8 +18694,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsSlotHandleResponse(resp } // NewListSiteBackupsPager - Description for Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.ListSiteBackups method. @@ -18111,7 +18746,7 @@ func (client *WebAppsClient) listSiteBackupsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18127,8 +18762,7 @@ func (client *WebAppsClient) listSiteBackupsHandleResponse(resp *http.Response) } // NewListSiteBackupsSlotPager - Description for Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @@ -18186,7 +18820,7 @@ func (client *WebAppsClient) listSiteBackupsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18201,9 +18835,152 @@ func (client *WebAppsClient) listSiteBackupsSlotHandleResponse(resp *http.Respon return result, nil } +// NewListSiteContainersPager - Lists all the site containers of a site, or a deployment slot. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// options - WebAppsClientListSiteContainersOptions contains the optional parameters for the WebAppsClient.ListSiteContainers +// method. +func (client *WebAppsClient) NewListSiteContainersPager(resourceGroupName string, name string, options *WebAppsClientListSiteContainersOptions) *runtime.Pager[WebAppsClientListSiteContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteContainersResponse]{ + More: func(page WebAppsClientListSiteContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteContainersResponse) (WebAppsClientListSiteContainersResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listSiteContainersCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebAppsClientListSiteContainersResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListSiteContainersResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListSiteContainersResponse{}, runtime.NewResponseError(resp) + } + return client.listSiteContainersHandleResponse(resp) + }, + }) +} + +// listSiteContainersCreateRequest creates the ListSiteContainers request. +func (client *WebAppsClient) listSiteContainersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSiteContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteContainersHandleResponse handles the ListSiteContainers response. +func (client *WebAppsClient) listSiteContainersHandleResponse(resp *http.Response) (WebAppsClientListSiteContainersResponse, error) { + result := WebAppsClientListSiteContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainerCollection); err != nil { + return WebAppsClientListSiteContainersResponse{}, err + } + return result, nil +} + +// NewListSiteContainersSlotPager - Lists all the site containers of a site, or a deployment slot. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// slot - Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production +// slot. +// options - WebAppsClientListSiteContainersSlotOptions contains the optional parameters for the WebAppsClient.ListSiteContainersSlot +// method. +func (client *WebAppsClient) NewListSiteContainersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSiteContainersSlotOptions) *runtime.Pager[WebAppsClientListSiteContainersSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteContainersSlotResponse]{ + More: func(page WebAppsClientListSiteContainersSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteContainersSlotResponse) (WebAppsClientListSiteContainersSlotResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listSiteContainersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebAppsClientListSiteContainersSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListSiteContainersSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListSiteContainersSlotResponse{}, runtime.NewResponseError(resp) + } + return client.listSiteContainersSlotHandleResponse(resp) + }, + }) +} + +// listSiteContainersSlotCreateRequest creates the ListSiteContainersSlot request. +func (client *WebAppsClient) listSiteContainersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSiteContainersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteContainersSlotHandleResponse handles the ListSiteContainersSlot response. +func (client *WebAppsClient) listSiteContainersSlotHandleResponse(resp *http.Response) (WebAppsClientListSiteContainersSlotResponse, error) { + result := WebAppsClientListSiteContainersSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainerCollection); err != nil { + return WebAppsClientListSiteContainersSlotResponse{}, err + } + return result, nil +} + // NewListSiteExtensionsPager - Description for Get list of siteextensions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.ListSiteExtensions @@ -18256,7 +19033,7 @@ func (client *WebAppsClient) listSiteExtensionsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18272,8 +19049,7 @@ func (client *WebAppsClient) listSiteExtensionsHandleResponse(resp *http.Respons } // NewListSiteExtensionsSlotPager - Description for Get list of siteextensions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. @@ -18331,7 +19107,7 @@ func (client *WebAppsClient) listSiteExtensionsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18348,7 +19124,7 @@ func (client *WebAppsClient) listSiteExtensionsSlotHandleResponse(resp *http.Res // ListSitePushSettings - Description for Gets the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings @@ -18388,7 +19164,7 @@ func (client *WebAppsClient) listSitePushSettingsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18405,7 +19181,7 @@ func (client *WebAppsClient) listSitePushSettingsHandleResponse(resp *http.Respo // ListSitePushSettingsSlot - Description for Gets the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -18450,7 +19226,7 @@ func (client *WebAppsClient) listSitePushSettingsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18468,7 +19244,7 @@ func (client *WebAppsClient) listSitePushSettingsSlotHandleResponse(resp *http.R // ListSlotConfigurationNames - Description for Gets the names of app settings and connection strings that stick to the slot // (not swapped). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames @@ -18508,7 +19284,7 @@ func (client *WebAppsClient) listSlotConfigurationNamesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18525,8 +19301,7 @@ func (client *WebAppsClient) listSlotConfigurationNamesHandleResponse(resp *http // NewListSlotDifferencesFromProductionPager - Description for Get the difference in configuration settings between two web // app slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slotSwapEntity - JSON object that contains the target slot name. See example. @@ -18580,7 +19355,7 @@ func (client *WebAppsClient) listSlotDifferencesFromProductionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -18596,8 +19371,7 @@ func (client *WebAppsClient) listSlotDifferencesFromProductionHandleResponse(res } // NewListSlotDifferencesSlotPager - Description for Get the difference in configuration settings between two web app slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @@ -18656,7 +19430,7 @@ func (client *WebAppsClient) listSlotDifferencesSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -18672,8 +19446,7 @@ func (client *WebAppsClient) listSlotDifferencesSlotHandleResponse(resp *http.Re } // NewListSlotSiteDeploymentStatusesSlotPager - List deployment statuses for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production @@ -18732,7 +19505,7 @@ func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18748,8 +19521,7 @@ func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotHandleResponse(re } // NewListSlotsPager - Description for Gets an app's deployment slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.ListSlots method. @@ -18801,7 +19573,7 @@ func (client *WebAppsClient) listSlotsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18817,8 +19589,7 @@ func (client *WebAppsClient) listSlotsHandleResponse(resp *http.Response) (WebAp } // NewListSnapshotsPager - Description for Returns all Snapshots to the user. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // options - WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.ListSnapshots method. @@ -18870,7 +19641,7 @@ func (client *WebAppsClient) listSnapshotsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18886,8 +19657,7 @@ func (client *WebAppsClient) listSnapshotsHandleResponse(resp *http.Response) (W } // NewListSnapshotsFromDRSecondaryPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // options - WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.ListSnapshotsFromDRSecondary @@ -18940,7 +19710,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondaryCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18956,8 +19726,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondaryHandleResponse(resp *ht } // NewListSnapshotsFromDRSecondarySlotPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // slot - Website Slot. @@ -19015,7 +19784,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19031,8 +19800,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotHandleResponse(resp } // NewListSnapshotsSlotPager - Description for Returns all Snapshots to the user. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // slot - Website Slot. @@ -19090,7 +19858,7 @@ func (client *WebAppsClient) listSnapshotsSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19107,7 +19875,7 @@ func (client *WebAppsClient) listSnapshotsSlotHandleResponse(resp *http.Response // ListSyncFunctionTriggers - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers @@ -19147,7 +19915,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19164,7 +19932,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersHandleResponse(resp *http.R // ListSyncFunctionTriggersSlot - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -19209,7 +19977,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19226,7 +19994,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersSlotHandleResponse(resp *ht // ListSyncStatus - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. @@ -19265,7 +20033,7 @@ func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19273,7 +20041,7 @@ func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, re // ListSyncStatusSlot - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -19318,15 +20086,14 @@ func (client *WebAppsClient) listSyncStatusSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // NewListTriggeredWebJobHistoryPager - Description for List a triggered web job's history for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -19384,7 +20151,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistoryCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19401,8 +20168,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistoryHandleResponse(resp *http // NewListTriggeredWebJobHistorySlotPager - Description for List a triggered web job's history for an app, or a deployment // slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -19465,7 +20231,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistorySlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19481,8 +20247,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistorySlotHandleResponse(resp * } // NewListTriggeredWebJobsPager - Description for List triggered web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobs @@ -19535,7 +20300,7 @@ func (client *WebAppsClient) listTriggeredWebJobsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19551,8 +20316,7 @@ func (client *WebAppsClient) listTriggeredWebJobsHandleResponse(resp *http.Respo } // NewListTriggeredWebJobsSlotPager - Description for List triggered web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @@ -19610,7 +20374,7 @@ func (client *WebAppsClient) listTriggeredWebJobsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19626,8 +20390,7 @@ func (client *WebAppsClient) listTriggeredWebJobsSlotHandleResponse(resp *http.R } // NewListUsagesPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.ListUsages method. @@ -19679,7 +20442,7 @@ func (client *WebAppsClient) listUsagesCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -19700,8 +20463,7 @@ func (client *WebAppsClient) listUsagesHandleResponse(resp *http.Response) (WebA } // NewListUsagesSlotPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. @@ -19758,7 +20520,7 @@ func (client *WebAppsClient) listUsagesSlotCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -19780,7 +20542,7 @@ func (client *WebAppsClient) listUsagesSlotHandleResponse(resp *http.Response) ( // ListVnetConnections - Description for Gets the virtual networks the app (or deployment slot) is connected to. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections @@ -19820,7 +20582,7 @@ func (client *WebAppsClient) listVnetConnectionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19837,7 +20599,7 @@ func (client *WebAppsClient) listVnetConnectionsHandleResponse(resp *http.Respon // ListVnetConnectionsSlot - Description for Gets the virtual networks the app (or deployment slot) is connected to. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production @@ -19883,7 +20645,7 @@ func (client *WebAppsClient) listVnetConnectionsSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19899,8 +20661,7 @@ func (client *WebAppsClient) listVnetConnectionsSlotHandleResponse(resp *http.Re } // NewListWebJobsPager - Description for List webjobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.ListWebJobs method. @@ -19952,7 +20713,7 @@ func (client *WebAppsClient) listWebJobsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19968,8 +20729,7 @@ func (client *WebAppsClient) listWebJobsHandleResponse(resp *http.Response) (Web } // NewListWebJobsSlotPager - Description for List webjobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -20026,7 +20786,7 @@ func (client *WebAppsClient) listWebJobsSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20041,9 +20801,196 @@ func (client *WebAppsClient) listWebJobsSlotHandleResponse(resp *http.Response) return result, nil } +// NewListWorkflowsPager - List the workflows for a web site, or a deployment slot. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// options - WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.ListWorkflows method. +func (client *WebAppsClient) NewListWorkflowsPager(resourceGroupName string, name string, options *WebAppsClientListWorkflowsOptions) *runtime.Pager[WebAppsClientListWorkflowsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListWorkflowsResponse]{ + More: func(page WebAppsClientListWorkflowsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListWorkflowsResponse) (WebAppsClientListWorkflowsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listWorkflowsCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebAppsClientListWorkflowsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListWorkflowsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListWorkflowsResponse{}, runtime.NewResponseError(resp) + } + return client.listWorkflowsHandleResponse(resp) + }, + }) +} + +// listWorkflowsCreateRequest creates the ListWorkflows request. +func (client *WebAppsClient) listWorkflowsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkflowsHandleResponse handles the ListWorkflows response. +func (client *WebAppsClient) listWorkflowsHandleResponse(resp *http.Response) (WebAppsClientListWorkflowsResponse, error) { + result := WebAppsClientListWorkflowsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelopeCollection); err != nil { + return WebAppsClientListWorkflowsResponse{}, err + } + return result, nil +} + +// ListWorkflowsConnections - Lists logic app's connections for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// options - WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections +// method. +func (client *WebAppsClient) ListWorkflowsConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsConnectionsOptions) (WebAppsClientListWorkflowsConnectionsResponse, error) { + req, err := client.listWorkflowsConnectionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListWorkflowsConnectionsResponse{}, runtime.NewResponseError(resp) + } + return client.listWorkflowsConnectionsHandleResponse(resp) +} + +// listWorkflowsConnectionsCreateRequest creates the ListWorkflowsConnections request. +func (client *WebAppsClient) listWorkflowsConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkflowsConnectionsHandleResponse handles the ListWorkflowsConnections response. +func (client *WebAppsClient) listWorkflowsConnectionsHandleResponse(resp *http.Response) (WebAppsClientListWorkflowsConnectionsResponse, error) { + result := WebAppsClientListWorkflowsConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + return result, nil +} + +// ListWorkflowsConnectionsSlot - Lists logic app's connections for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2023-12-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// slot - Name of the deployment slot. +// options - WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot +// method. +func (client *WebAppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWorkflowsConnectionsSlotOptions) (WebAppsClientListWorkflowsConnectionsSlotResponse, error) { + req, err := client.listWorkflowsConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, runtime.NewResponseError(resp) + } + return client.listWorkflowsConnectionsSlotHandleResponse(resp) +} + +// listWorkflowsConnectionsSlotCreateRequest creates the ListWorkflowsConnectionsSlot request. +func (client *WebAppsClient) listWorkflowsConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWorkflowsConnectionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkflowsConnectionsSlotHandleResponse handles the ListWorkflowsConnectionsSlot response. +func (client *WebAppsClient) listWorkflowsConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListWorkflowsConnectionsSlotResponse, error) { + result := WebAppsClientListWorkflowsConnectionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + return result, nil +} + // BeginMigrateMySQL - Description for Migrates a local (in-app) MySql database to a remote MySql database. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // migrationRequestEnvelope - MySql migration options. @@ -20063,7 +21010,7 @@ func (client *WebAppsClient) BeginMigrateMySQL(ctx context.Context, resourceGrou // MigrateMySQL - Description for Migrates a local (in-app) MySql database to a remote MySql database. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) migrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*http.Response, error) { req, err := client.migrateMySQLCreateRequest(ctx, resourceGroupName, name, migrationRequestEnvelope, options) if err != nil { @@ -20099,7 +21046,7 @@ func (client *WebAppsClient) migrateMySQLCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, migrationRequestEnvelope) @@ -20107,7 +21054,7 @@ func (client *WebAppsClient) migrateMySQLCreateRequest(ctx context.Context, reso // BeginMigrateStorage - Description for Restores a web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // subscriptionName - Azure subscription. // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. @@ -20128,7 +21075,7 @@ func (client *WebAppsClient) BeginMigrateStorage(ctx context.Context, subscripti // MigrateStorage - Description for Restores a web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) migrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*http.Response, error) { req, err := client.migrateStorageCreateRequest(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) if err != nil { @@ -20165,7 +21112,7 @@ func (client *WebAppsClient) migrateStorageCreateRequest(ctx context.Context, su } reqQP := req.Raw().URL.Query() reqQP.Set("subscriptionName", subscriptionName) - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, migrationOptions) @@ -20174,7 +21121,7 @@ func (client *WebAppsClient) migrateStorageCreateRequest(ctx context.Context, su // PutPrivateAccessVnet - Description for Sets data around private site access enablement and authorized Virtual Networks // that can access the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // access - The information for the private access @@ -20215,7 +21162,7 @@ func (client *WebAppsClient) putPrivateAccessVnetCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, access) @@ -20233,7 +21180,7 @@ func (client *WebAppsClient) putPrivateAccessVnetHandleResponse(resp *http.Respo // PutPrivateAccessVnetSlot - Description for Sets data around private site access enablement and authorized Virtual Networks // that can access the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for the web app. @@ -20279,7 +21226,7 @@ func (client *WebAppsClient) putPrivateAccessVnetSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, access) @@ -20296,7 +21243,7 @@ func (client *WebAppsClient) putPrivateAccessVnetSlotHandleResponse(resp *http.R // RecoverSiteConfigurationSnapshot - Description for Reverts the configuration of an app to a previous snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // snapshotID - The ID of the snapshot to read. @@ -20341,7 +21288,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20349,7 +21296,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx c // RecoverSiteConfigurationSnapshotSlot - Description for Reverts the configuration of an app to a previous snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // snapshotID - The ID of the snapshot to read. @@ -20399,7 +21346,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20408,7 +21355,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(c // ResetProductionSlotConfig - Description for Resets the configuration settings of the current slot if they were previously // modified by calling the API with POST. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig @@ -20448,7 +21395,7 @@ func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20457,7 +21404,7 @@ func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context. // ResetSlotConfigurationSlot - Description for Resets the configuration settings of the current slot if they were previously // modified by calling the API with POST. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production @@ -20503,7 +21450,7 @@ func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20511,7 +21458,7 @@ func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context // Restart - Description for Restarts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. @@ -20556,7 +21503,7 @@ func (client *WebAppsClient) restartCreateRequest(ctx context.Context, resourceG if options != nil && options.Synchronous != nil { reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20564,7 +21511,7 @@ func (client *WebAppsClient) restartCreateRequest(ctx context.Context, resourceG // RestartSlot - Description for Restarts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will restart the production slot. @@ -20614,7 +21561,7 @@ func (client *WebAppsClient) restartSlotCreateRequest(ctx context.Context, resou if options != nil && options.Synchronous != nil { reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20622,7 +21569,7 @@ func (client *WebAppsClient) restartSlotCreateRequest(ctx context.Context, resou // BeginRestore - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -20642,7 +21589,7 @@ func (client *WebAppsClient) BeginRestore(ctx context.Context, resourceGroupName // Restore - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*http.Response, error) { req, err := client.restoreCreateRequest(ctx, resourceGroupName, name, backupID, request, options) if err != nil { @@ -20682,7 +21629,7 @@ func (client *WebAppsClient) restoreCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -20690,7 +21637,7 @@ func (client *WebAppsClient) restoreCreateRequest(ctx context.Context, resourceG // BeginRestoreFromBackupBlob - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // request - Information on restore request . @@ -20710,7 +21657,7 @@ func (client *WebAppsClient) BeginRestoreFromBackupBlob(ctx context.Context, res // RestoreFromBackupBlob - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*http.Response, error) { req, err := client.restoreFromBackupBlobCreateRequest(ctx, resourceGroupName, name, request, options) if err != nil { @@ -20746,7 +21693,7 @@ func (client *WebAppsClient) restoreFromBackupBlobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -20754,7 +21701,7 @@ func (client *WebAppsClient) restoreFromBackupBlobCreateRequest(ctx context.Cont // BeginRestoreFromBackupBlobSlot - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @@ -20775,7 +21722,7 @@ func (client *WebAppsClient) BeginRestoreFromBackupBlobSlot(ctx context.Context, // RestoreFromBackupBlobSlot - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*http.Response, error) { req, err := client.restoreFromBackupBlobSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) if err != nil { @@ -20815,7 +21762,7 @@ func (client *WebAppsClient) restoreFromBackupBlobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -20823,7 +21770,7 @@ func (client *WebAppsClient) restoreFromBackupBlobSlotCreateRequest(ctx context. // BeginRestoreFromDeletedApp - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // restoreRequest - Deleted web app restore information. @@ -20843,7 +21790,7 @@ func (client *WebAppsClient) BeginRestoreFromDeletedApp(ctx context.Context, res // RestoreFromDeletedApp - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*http.Response, error) { req, err := client.restoreFromDeletedAppCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) if err != nil { @@ -20879,7 +21826,7 @@ func (client *WebAppsClient) restoreFromDeletedAppCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) @@ -20887,7 +21834,7 @@ func (client *WebAppsClient) restoreFromDeletedAppCreateRequest(ctx context.Cont // BeginRestoreFromDeletedAppSlot - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -20908,7 +21855,7 @@ func (client *WebAppsClient) BeginRestoreFromDeletedAppSlot(ctx context.Context, // RestoreFromDeletedAppSlot - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*http.Response, error) { req, err := client.restoreFromDeletedAppSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) if err != nil { @@ -20948,7 +21895,7 @@ func (client *WebAppsClient) restoreFromDeletedAppSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) @@ -20956,7 +21903,7 @@ func (client *WebAppsClient) restoreFromDeletedAppSlotCreateRequest(ctx context. // BeginRestoreSlot - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -20978,7 +21925,7 @@ func (client *WebAppsClient) BeginRestoreSlot(ctx context.Context, resourceGroup // RestoreSlot - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*http.Response, error) { req, err := client.restoreSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) if err != nil { @@ -21022,7 +21969,7 @@ func (client *WebAppsClient) restoreSlotCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -21030,7 +21977,7 @@ func (client *WebAppsClient) restoreSlotCreateRequest(ctx context.Context, resou // BeginRestoreSnapshot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // restoreRequest - Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots @@ -21051,7 +21998,7 @@ func (client *WebAppsClient) BeginRestoreSnapshot(ctx context.Context, resourceG // RestoreSnapshot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*http.Response, error) { req, err := client.restoreSnapshotCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) if err != nil { @@ -21087,7 +22034,7 @@ func (client *WebAppsClient) restoreSnapshotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) @@ -21095,7 +22042,7 @@ func (client *WebAppsClient) restoreSnapshotCreateRequest(ctx context.Context, r // BeginRestoreSnapshotSlot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -21117,7 +22064,7 @@ func (client *WebAppsClient) BeginRestoreSnapshotSlot(ctx context.Context, resou // RestoreSnapshotSlot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) restoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*http.Response, error) { req, err := client.restoreSnapshotSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) if err != nil { @@ -21157,7 +22104,7 @@ func (client *WebAppsClient) restoreSnapshotSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) @@ -21165,7 +22112,7 @@ func (client *WebAppsClient) restoreSnapshotSlotCreateRequest(ctx context.Contex // RunTriggeredWebJob - Description for Run a triggered web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21210,7 +22157,7 @@ func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21218,7 +22165,7 @@ func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context // RunTriggeredWebJobSlot - Description for Run a triggered web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21268,7 +22215,7 @@ func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21276,7 +22223,7 @@ func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Con // Start - Description for Starts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. @@ -21315,7 +22262,7 @@ func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21323,7 +22270,7 @@ func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGro // StartContinuousWebJob - Description for Start a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21368,7 +22315,7 @@ func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21376,7 +22323,7 @@ func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Cont // StartContinuousWebJobSlot - Description for Start a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21426,7 +22373,7 @@ func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21434,7 +22381,7 @@ func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context. // BeginStartNetworkTrace - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace @@ -21453,7 +22400,7 @@ func (client *WebAppsClient) BeginStartNetworkTrace(ctx context.Context, resourc // StartNetworkTrace - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) startNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*http.Response, error) { req, err := client.startNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -21498,7 +22445,7 @@ func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21506,7 +22453,7 @@ func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, // BeginStartNetworkTraceSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for this web app. @@ -21526,7 +22473,7 @@ func (client *WebAppsClient) BeginStartNetworkTraceSlot(ctx context.Context, res // StartNetworkTraceSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) startNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*http.Response, error) { req, err := client.startNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { @@ -21575,7 +22522,7 @@ func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Cont if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21583,7 +22530,7 @@ func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Cont // StartSlot - Description for Starts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will start the production slot. @@ -21627,7 +22574,7 @@ func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21635,7 +22582,7 @@ func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourc // StartWebSiteNetworkTrace - Description for Start capturing network packets for the site (To be deprecated). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace @@ -21684,7 +22631,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceCreateRequest(ctx context.C if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21701,7 +22648,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceHandleResponse(resp *http.R // BeginStartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation @@ -21720,7 +22667,7 @@ func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperation(ctx context. // StartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) startWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*http.Response, error) { req, err := client.startWebSiteNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -21765,7 +22712,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21773,7 +22720,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx // BeginStartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for this web app. @@ -21793,7 +22740,7 @@ func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperationSlot(ctx cont // StartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*http.Response, error) { req, err := client.startWebSiteNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { @@ -21842,7 +22789,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest( if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21850,7 +22797,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest( // StartWebSiteNetworkTraceSlot - Description for Start capturing network packets for the site (To be deprecated). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for this web app. @@ -21904,7 +22851,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceSlotCreateRequest(ctx conte if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21921,7 +22868,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceSlotHandleResponse(resp *ht // Stop - Description for Stops an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. @@ -21960,7 +22907,7 @@ func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21968,7 +22915,7 @@ func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGrou // StopContinuousWebJob - Description for Stop a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -22013,7 +22960,7 @@ func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22021,7 +22968,7 @@ func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Conte // StopContinuousWebJobSlot - Description for Stop a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -22071,7 +23018,7 @@ func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22079,7 +23026,7 @@ func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.C // StopNetworkTrace - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace @@ -22119,7 +23066,7 @@ func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22127,7 +23074,7 @@ func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, // StopNetworkTraceSlot - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for this web app. @@ -22172,7 +23119,7 @@ func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22180,7 +23127,7 @@ func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Conte // StopSlot - Description for Stops an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will stop the production slot. @@ -22224,7 +23171,7 @@ func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22232,7 +23179,7 @@ func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resource // StopWebSiteNetworkTrace - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // options - WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace @@ -22272,7 +23219,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22280,7 +23227,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Co // StopWebSiteNetworkTraceSlot - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // slot - The name of the slot for this web app. @@ -22325,7 +23272,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22333,7 +23280,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx contex // BeginSwapSlot - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @@ -22353,7 +23300,7 @@ func (client *WebAppsClient) BeginSwapSlot(ctx context.Context, resourceGroupNam // SwapSlot - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) swapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*http.Response, error) { req, err := client.swapSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) if err != nil { @@ -22393,7 +23340,7 @@ func (client *WebAppsClient) swapSlotCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -22401,7 +23348,7 @@ func (client *WebAppsClient) swapSlotCreateRequest(ctx context.Context, resource // BeginSwapSlotWithProduction - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slotSwapEntity - JSON object that contains the target slot name. See example. @@ -22421,7 +23368,7 @@ func (client *WebAppsClient) BeginSwapSlotWithProduction(ctx context.Context, re // SwapSlotWithProduction - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WebAppsClient) swapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*http.Response, error) { req, err := client.swapSlotWithProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) if err != nil { @@ -22457,7 +23404,7 @@ func (client *WebAppsClient) swapSlotWithProductionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -22465,7 +23412,7 @@ func (client *WebAppsClient) swapSlotWithProductionCreateRequest(ctx context.Con // SyncFunctionTriggers - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers @@ -22505,7 +23452,7 @@ func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22513,7 +23460,7 @@ func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Conte // SyncFunctionTriggersSlot - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -22558,7 +23505,7 @@ func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22566,7 +23513,7 @@ func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.C // SyncFunctions - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. @@ -22605,7 +23552,7 @@ func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22613,7 +23560,7 @@ func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, res // SyncFunctionsSlot - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -22658,7 +23605,7 @@ func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22666,7 +23613,7 @@ func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, // SyncRepository - Description for Sync web app repository. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // options - WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. @@ -22705,7 +23652,7 @@ func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22713,7 +23660,7 @@ func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, re // SyncRepositorySlot - Description for Sync web app repository. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -22758,7 +23705,7 @@ func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22766,7 +23713,7 @@ func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context // Update - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // siteEnvelope - A JSON representation of the app properties. See example. @@ -22806,7 +23753,7 @@ func (client *WebAppsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) @@ -22823,7 +23770,7 @@ func (client *WebAppsClient) updateHandleResponse(resp *http.Response) (WebAppsC // UpdateApplicationSettings - Description for Replaces the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // appSettings - Application settings of the app. @@ -22864,7 +23811,7 @@ func (client *WebAppsClient) updateApplicationSettingsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -22881,7 +23828,7 @@ func (client *WebAppsClient) updateApplicationSettingsHandleResponse(resp *http. // UpdateApplicationSettingsSlot - Description for Replaces the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production @@ -22928,7 +23875,7 @@ func (client *WebAppsClient) updateApplicationSettingsSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -22945,7 +23892,7 @@ func (client *WebAppsClient) updateApplicationSettingsSlotHandleResponse(resp *h // UpdateAuthSettings - Description for Updates the Authentication / Authorization settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // siteAuthSettings - Auth settings associated with web app. @@ -22986,7 +23933,7 @@ func (client *WebAppsClient) updateAuthSettingsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettings) @@ -23003,7 +23950,7 @@ func (client *WebAppsClient) updateAuthSettingsHandleResponse(resp *http.Respons // UpdateAuthSettingsSlot - Description for Updates the Authentication / Authorization settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -23049,7 +23996,7 @@ func (client *WebAppsClient) updateAuthSettingsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettings) @@ -23066,7 +24013,7 @@ func (client *WebAppsClient) updateAuthSettingsSlotHandleResponse(resp *http.Res // UpdateAuthSettingsV2 - Description for Updates site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // siteAuthSettingsV2 - Auth settings associated with web app. @@ -23107,7 +24054,7 @@ func (client *WebAppsClient) updateAuthSettingsV2CreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) @@ -23124,7 +24071,7 @@ func (client *WebAppsClient) updateAuthSettingsV2HandleResponse(resp *http.Respo // UpdateAuthSettingsV2Slot - Description for Updates site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -23170,7 +24117,7 @@ func (client *WebAppsClient) updateAuthSettingsV2SlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) @@ -23187,7 +24134,7 @@ func (client *WebAppsClient) updateAuthSettingsV2SlotHandleResponse(resp *http.R // UpdateAzureStorageAccounts - Description for Updates the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // azureStorageAccounts - Azure storage accounts of the app. @@ -23228,7 +24175,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, azureStorageAccounts) @@ -23245,7 +24192,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsHandleResponse(resp *http // UpdateAzureStorageAccountsSlot - Description for Updates the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations @@ -23292,7 +24239,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, azureStorageAccounts) @@ -23309,7 +24256,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsSlotHandleResponse(resp * // UpdateBackupConfiguration - Description for Updates the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // request - Edited backup configuration. @@ -23350,7 +24297,7 @@ func (client *WebAppsClient) updateBackupConfigurationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -23367,7 +24314,7 @@ func (client *WebAppsClient) updateBackupConfigurationHandleResponse(resp *http. // UpdateBackupConfigurationSlot - Description for Updates the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production @@ -23414,7 +24361,7 @@ func (client *WebAppsClient) updateBackupConfigurationSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -23431,7 +24378,7 @@ func (client *WebAppsClient) updateBackupConfigurationSlotHandleResponse(resp *h // UpdateConfiguration - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // siteConfig - JSON representation of a SiteConfig object. See example. @@ -23472,7 +24419,7 @@ func (client *WebAppsClient) updateConfigurationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -23489,7 +24436,7 @@ func (client *WebAppsClient) updateConfigurationHandleResponse(resp *http.Respon // UpdateConfigurationSlot - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @@ -23535,7 +24482,7 @@ func (client *WebAppsClient) updateConfigurationSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -23552,7 +24499,7 @@ func (client *WebAppsClient) updateConfigurationSlotHandleResponse(resp *http.Re // UpdateConnectionStrings - Description for Replaces the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // connectionStrings - Connection strings of the app or deployment slot. See example. @@ -23593,7 +24540,7 @@ func (client *WebAppsClient) updateConnectionStringsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionStrings) @@ -23610,7 +24557,7 @@ func (client *WebAppsClient) updateConnectionStringsHandleResponse(resp *http.Re // UpdateConnectionStringsSlot - Description for Replaces the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production @@ -23657,7 +24604,7 @@ func (client *WebAppsClient) updateConnectionStringsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionStrings) @@ -23674,7 +24621,7 @@ func (client *WebAppsClient) updateConnectionStringsSlotHandleResponse(resp *htt // UpdateDiagnosticLogsConfig - Description for Updates the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // siteLogsConfig - A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. @@ -23715,7 +24662,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteLogsConfig) @@ -23732,7 +24679,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigHandleResponse(resp *http // UpdateDiagnosticLogsConfigSlot - Description for Updates the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production @@ -23779,7 +24726,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteLogsConfig) @@ -23797,7 +24744,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotHandleResponse(resp * // UpdateDomainOwnershipIdentifier - Description for Creates a domain ownership identifier for web app, or updates an existing // ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -23843,7 +24790,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -23861,7 +24808,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierHandleResponse(resp // UpdateDomainOwnershipIdentifierSlot - Description for Creates a domain ownership identifier for web app, or updates an // existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -23912,7 +24859,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -23929,7 +24876,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotHandleResponse(r // UpdateFtpAllowed - Description for Updates whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed @@ -23969,7 +24916,7 @@ func (client *WebAppsClient) updateFtpAllowedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -23986,7 +24933,7 @@ func (client *WebAppsClient) updateFtpAllowedHandleResponse(resp *http.Response) // UpdateFtpAllowedSlot - Description for Updates whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot @@ -24030,7 +24977,7 @@ func (client *WebAppsClient) updateFtpAllowedSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -24047,7 +24994,7 @@ func (client *WebAppsClient) updateFtpAllowedSlotHandleResponse(resp *http.Respo // UpdateHybridConnection - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -24098,7 +25045,7 @@ func (client *WebAppsClient) updateHybridConnectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24115,7 +25062,7 @@ func (client *WebAppsClient) updateHybridConnectionHandleResponse(resp *http.Res // UpdateHybridConnectionSlot - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - The name of the web app. // namespaceName - The namespace for this hybrid connection. @@ -24171,7 +25118,7 @@ func (client *WebAppsClient) updateHybridConnectionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24188,7 +25135,7 @@ func (client *WebAppsClient) updateHybridConnectionSlotHandleResponse(resp *http // UpdateMetadata - Description for Replaces the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // metadata - Edited metadata of the app or deployment slot. See example. @@ -24228,7 +25175,7 @@ func (client *WebAppsClient) updateMetadataCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, metadata) @@ -24245,7 +25192,7 @@ func (client *WebAppsClient) updateMetadataHandleResponse(resp *http.Response) ( // UpdateMetadataSlot - Description for Replaces the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. @@ -24291,7 +25238,7 @@ func (client *WebAppsClient) updateMetadataSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, metadata) @@ -24308,7 +25255,7 @@ func (client *WebAppsClient) updateMetadataSlotHandleResponse(resp *http.Respons // UpdatePremierAddOn - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -24354,7 +25301,7 @@ func (client *WebAppsClient) updatePremierAddOnCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -24371,7 +25318,7 @@ func (client *WebAppsClient) updatePremierAddOnHandleResponse(resp *http.Respons // UpdatePremierAddOnSlot - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -24423,7 +25370,7 @@ func (client *WebAppsClient) updatePremierAddOnSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -24441,7 +25388,7 @@ func (client *WebAppsClient) updatePremierAddOnSlotHandleResponse(resp *http.Res // UpdateRelayServiceConnection - Description for Creates a new hybrid connection configuration (PUT), or updates an existing // one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -24487,7 +25434,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24505,7 +25452,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionHandleResponse(resp *ht // UpdateRelayServiceConnectionSlot - Description for Creates a new hybrid connection configuration (PUT), or updates an existing // one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -24557,7 +25504,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24574,7 +25521,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionSlotHandleResponse(resp // UpdateScmAllowed - Description for Updates whether user publishing credentials are allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed @@ -24614,7 +25561,7 @@ func (client *WebAppsClient) updateScmAllowedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -24631,7 +25578,7 @@ func (client *WebAppsClient) updateScmAllowedHandleResponse(resp *http.Response) // UpdateScmAllowedSlot - Description for Updates whether user publishing credentials are allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // options - WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot @@ -24675,7 +25622,7 @@ func (client *WebAppsClient) updateScmAllowedSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -24692,7 +25639,7 @@ func (client *WebAppsClient) updateScmAllowedSlotHandleResponse(resp *http.Respo // UpdateSitePushSettings - Description for Updates the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // pushSettings - Push settings associated with web app. @@ -24733,7 +25680,7 @@ func (client *WebAppsClient) updateSitePushSettingsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, pushSettings) @@ -24750,7 +25697,7 @@ func (client *WebAppsClient) updateSitePushSettingsHandleResponse(resp *http.Res // UpdateSitePushSettingsSlot - Description for Updates the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of web app slot. If not specified then will default to production slot. @@ -24796,7 +25743,7 @@ func (client *WebAppsClient) updateSitePushSettingsSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, pushSettings) @@ -24814,7 +25761,7 @@ func (client *WebAppsClient) updateSitePushSettingsSlotHandleResponse(resp *http // UpdateSlot - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing // app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production @@ -24860,7 +25807,7 @@ func (client *WebAppsClient) updateSlotCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) @@ -24878,7 +25825,7 @@ func (client *WebAppsClient) updateSlotHandleResponse(resp *http.Response) (WebA // UpdateSlotConfigurationNames - Description for Updates the names of application settings and connection string that remain // with the slot during swap operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slotConfigNames - Names of application settings and connection strings. See example. @@ -24919,7 +25866,7 @@ func (client *WebAppsClient) updateSlotConfigurationNamesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotConfigNames) @@ -24936,7 +25883,7 @@ func (client *WebAppsClient) updateSlotConfigurationNamesHandleResponse(resp *ht // UpdateSourceControl - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // siteSourceControl - JSON representation of a SiteSourceControl object. See example. @@ -24977,7 +25924,7 @@ func (client *WebAppsClient) updateSourceControlCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) @@ -24994,7 +25941,7 @@ func (client *WebAppsClient) updateSourceControlHandleResponse(resp *http.Respon // UpdateSourceControlSlot - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for @@ -25041,7 +25988,7 @@ func (client *WebAppsClient) updateSourceControlSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) @@ -25060,7 +26007,7 @@ func (client *WebAppsClient) updateSourceControlSlotHandleResponse(resp *http.Re // that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // connectionEnvelope - Properties of the Virtual Network connection. See example. @@ -25101,7 +26048,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -25121,7 +26068,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckHandleR // been // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production @@ -25168,7 +26115,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -25186,7 +26133,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotHan // UpdateVnetConnection - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection // properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -25232,7 +26179,7 @@ func (client *WebAppsClient) updateVnetConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -25249,7 +26196,7 @@ func (client *WebAppsClient) updateVnetConnectionHandleResponse(resp *http.Respo // UpdateVnetConnectionGateway - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -25300,7 +26247,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewayCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -25317,7 +26264,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewayHandleResponse(resp *htt // UpdateVnetConnectionGatewaySlot - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -25374,7 +26321,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -25392,7 +26339,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotHandleResponse(resp // UpdateVnetConnectionSlot - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection // properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -25444,7 +26391,7 @@ func (client *WebAppsClient) updateVnetConnectionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go deleted file mode 100644 index 5e69a21a4ccd..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go +++ /dev/null @@ -1,1187 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListPublishingCredentialsPolicies.json -func ExampleWebAppsClient_NewListBasicPublishingCredentialsPoliciesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("3fb8d758-2e2c-42e9-a528-a8acdfe87237", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBasicPublishingCredentialsPoliciesPager("testrg123", - "testsite", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetPublishingCredentialsPolicy.json -func ExampleWebAppsClient_GetFtpAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetFtpAllowed(ctx, - "rg", - "testSite", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UpdatePublishingCredentialsPolicy.json -func ExampleWebAppsClient_UpdateFtpAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateFtpAllowed(ctx, - "rg", - "testSite", - armappservice.CsmPublishingCredentialsPoliciesEntity{ - Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - Allow: to.Ptr(true), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetPublishingCredentialsPolicy.json -func ExampleWebAppsClient_GetScmAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetScmAllowed(ctx, - "rg", - "testSite", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UpdatePublishingCredentialsPolicy.json -func ExampleWebAppsClient_UpdateScmAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateScmAllowed(ctx, - "rg", - "testSite", - armappservice.CsmPublishingCredentialsPoliciesEntity{ - Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - Allow: to.Ptr(true), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetKeyVaultReferencesForAppSettings.json -func ExampleWebAppsClient_NewGetAppSettingsKeyVaultReferencesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetAppSettingsKeyVaultReferencesPager("testrg123", - "testc6282", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetKeyVaultReferencesForAppSetting.json -func ExampleWebAppsClient_GetAppSettingKeyVaultReference() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAppSettingKeyVaultReference(ctx, - "testrg123", - "testc6282", - "setting", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListSiteDeploymentStatus.json -func ExampleWebAppsClient_NewListProductionSiteDeploymentStatusesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListProductionSiteDeploymentStatusesPager("rg", - "testSite", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSiteDeploymentStatus.json -func ExampleWebAppsClient_BeginGetProductionSiteDeploymentStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetProductionSiteDeploymentStatus(ctx, - "rg", - "testSite", - "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSiteInstanceInfo.json -func ExampleWebAppsClient_GetInstanceInfo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetInstanceInfo(ctx, - "testrg123", - "tests346", - "134987120", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListSlotBackups.json -func ExampleWebAppsClient_NewListSiteBackupsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteBackupsPager("testrg123", - "tests346", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperation(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartWebSiteNetworkTraceOperation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartWebSiteNetworkTraceOperation(ctx, - "testrg123", - "SampleApp", - &armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions{DurationInSeconds: to.Ptr[int32](60), - MaxFrameLength: nil, - SasURL: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopWebSiteNetworkTrace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopWebSiteNetworkTrace(ctx, - "testrg123", - "SampleApp", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTraces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraces(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperationV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperationV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTracesV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTracesV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateEndpointConnection.json -func ExampleWebAppsClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ApproveRejectSitePrivateEndpointConnection.json -func ExampleWebAppsClient_BeginApproveOrRejectPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginApproveOrRejectPrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteSitePrivateEndpointConnection.json -func ExampleWebAppsClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeletePrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateLinkResources.json -func ExampleWebAppsClient_GetPrivateLinkResources() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResources(ctx, - "rg", - "testSite", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListPublishingCredentialsPoliciesSlot.json -func ExampleWebAppsClient_NewListBasicPublishingCredentialsPoliciesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("3fb8d758-2e2c-42e9-a528-a8acdfe87237", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBasicPublishingCredentialsPoliciesSlotPager("testrg123", - "testsite", - "staging", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetPublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_GetFtpAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetFtpAllowedSlot(ctx, - "rg", - "testSite", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UpdatePublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_UpdateFtpAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateFtpAllowedSlot(ctx, - "rg", - "testSite", - "stage", - armappservice.CsmPublishingCredentialsPoliciesEntity{ - Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - Allow: to.Ptr(true), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetPublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_GetScmAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetScmAllowedSlot(ctx, - "rg", - "testSite", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/UpdatePublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_UpdateScmAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateScmAllowedSlot(ctx, - "rg", - "testSite", - "stage", - armappservice.CsmPublishingCredentialsPoliciesEntity{ - Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - Allow: to.Ptr(true), - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json -func ExampleWebAppsClient_NewGetAppSettingsKeyVaultReferencesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetAppSettingsKeyVaultReferencesSlotPager("testrg123", - "testc6282", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetKeyVaultReferencesForAppSettingSlot.json -func ExampleWebAppsClient_GetAppSettingKeyVaultReferenceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAppSettingKeyVaultReferenceSlot(ctx, - "testrg123", - "testc6282", - "setting", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListSiteDeploymentStatusSlot.json -func ExampleWebAppsClient_NewListSlotSiteDeploymentStatusesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSlotSiteDeploymentStatusesSlotPager("rg", - "testSite", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSiteDeploymentStatusSlot.json -func ExampleWebAppsClient_BeginGetSlotSiteDeploymentStatusSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetSlotSiteDeploymentStatusSlot(ctx, - "rg", - "testSite", - "stage", - "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSiteInstanceInfo.json -func ExampleWebAppsClient_GetInstanceInfoSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetInstanceInfoSlot(ctx, - "testrg123", - "tests346", - "134987120", - "staging", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListSlotBackups.json -func ExampleWebAppsClient_NewListSiteBackupsSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteBackupsSlotPager("testrg123", - "tests346", - "staging", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperationSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperationSlot(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartWebSiteNetworkTraceOperationSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartWebSiteNetworkTraceOperationSlot(ctx, - "testrg123", - "SampleApp", - "Production", - &armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions{DurationInSeconds: to.Ptr[int32](60), - MaxFrameLength: nil, - SasURL: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopWebSiteNetworkTraceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopWebSiteNetworkTraceSlot(ctx, - "testrg123", - "SampleApp", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTracesSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTracesSlot(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperationSlotV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperationSlotV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTracesSlotV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTracesSlotV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateEndpointConnectionSlot.json -func ExampleWebAppsClient_GetPrivateEndpointConnectionSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnectionSlot(ctx, - "rg", - "testSite", - "connection", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json -func ExampleWebAppsClient_BeginApproveOrRejectPrivateEndpointConnectionSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginApproveOrRejectPrivateEndpointConnectionSlot(ctx, - "rg", - "testSite", - "connection", - "stage", - armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/DeleteSitePrivateEndpointConnectionSlot.json -func ExampleWebAppsClient_BeginDeletePrivateEndpointConnectionSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeletePrivateEndpointConnectionSlot(ctx, - "rg", - "testSite", - "connection", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/GetSitePrivateLinkResourcesSlot.json -func ExampleWebAppsClient_GetPrivateLinkResourcesSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResourcesSlot(ctx, - "rg", - "testSite", - "stage", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartNetworkTraceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartNetworkTraceSlot(ctx, - "testrg123", - "SampleApp", - "Production", - &armappservice.WebAppsClientBeginStartNetworkTraceSlotOptions{DurationInSeconds: to.Ptr[int32](60), - MaxFrameLength: nil, - SasURL: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopNetworkTraceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopNetworkTraceSlot(ctx, - "testrg123", - "SampleApp", - "Production", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartNetworkTrace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartNetworkTrace(ctx, - "testrg123", - "SampleApp", - &armappservice.WebAppsClientBeginStartNetworkTraceOptions{DurationInSeconds: to.Ptr[int32](60), - MaxFrameLength: nil, - SasURL: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopNetworkTrace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopNetworkTrace(ctx, - "testrg123", - "SampleApp", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go index d4418db45019..1ce90e8258dd 100644 --- a/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go +++ b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go @@ -58,7 +58,7 @@ func NewWebSiteManagementClient(subscriptionID string, credential azcore.TokenCr // CheckNameAvailability - Description for Check if a resource name is available. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // request - Name availability request. // options - WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability // method. @@ -89,7 +89,7 @@ func (client *WebSiteManagementClient) checkNameAvailabilityCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -106,7 +106,7 @@ func (client *WebSiteManagementClient) checkNameAvailabilityHandleResponse(resp // GetPublishingUser - Description for Gets publishing user // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser // method. func (client *WebSiteManagementClient) GetPublishingUser(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (WebSiteManagementClientGetPublishingUserResponse, error) { @@ -132,7 +132,7 @@ func (client *WebSiteManagementClient) getPublishingUserCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -149,7 +149,7 @@ func (client *WebSiteManagementClient) getPublishingUserHandleResponse(resp *htt // GetSourceControl - Description for Gets source control token // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // sourceControlType - Type of source control // options - WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl // method. @@ -180,7 +180,7 @@ func (client *WebSiteManagementClient) getSourceControlCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ func (client *WebSiteManagementClient) getSourceControlHandleResponse(resp *http // GetSubscriptionDeploymentLocations - Description for Gets list of available geo regions plus ministamps // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations // method. func (client *WebSiteManagementClient) GetSubscriptionDeploymentLocations(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { @@ -227,7 +227,7 @@ func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -242,9 +242,67 @@ func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsHandleR return result, nil } +// NewListAseRegionsPager - Description for get a list of available ASE regions and its supported Skus. +// Generated from API version 2023-12-01 +// options - WebSiteManagementClientListAseRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListAseRegions +// method. +func (client *WebSiteManagementClient) NewListAseRegionsPager(options *WebSiteManagementClientListAseRegionsOptions) *runtime.Pager[WebSiteManagementClientListAseRegionsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListAseRegionsResponse]{ + More: func(page WebSiteManagementClientListAseRegionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListAseRegionsResponse) (WebSiteManagementClientListAseRegionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAseRegionsCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebSiteManagementClientListAseRegionsResponse{}, runtime.NewResponseError(resp) + } + return client.listAseRegionsHandleResponse(resp) + }, + }) +} + +// listAseRegionsCreateRequest creates the ListAseRegions request. +func (client *WebSiteManagementClient) listAseRegionsCreateRequest(ctx context.Context, options *WebSiteManagementClientListAseRegionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + 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-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAseRegionsHandleResponse handles the ListAseRegions response. +func (client *WebSiteManagementClient) listAseRegionsHandleResponse(resp *http.Response) (WebSiteManagementClientListAseRegionsResponse, error) { + result := WebSiteManagementClientListAseRegionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AseRegionCollection); err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + return result, nil +} + // NewListBillingMetersPager - Description for Gets a list of meters for a given location. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.ListBillingMeters // method. func (client *WebSiteManagementClient) NewListBillingMetersPager(options *WebSiteManagementClientListBillingMetersOptions) *runtime.Pager[WebSiteManagementClientListBillingMetersResponse] { @@ -293,7 +351,7 @@ func (client *WebSiteManagementClient) listBillingMetersCreateRequest(ctx contex if options != nil && options.OSType != nil { reqQP.Set("osType", *options.OSType) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -309,8 +367,7 @@ func (client *WebSiteManagementClient) listBillingMetersHandleResponse(resp *htt } // NewListCustomHostNameSitesPager - Get custom hostnames under this subscription -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.ListCustomHostNameSites // method. func (client *WebSiteManagementClient) NewListCustomHostNameSitesPager(options *WebSiteManagementClientListCustomHostNameSitesOptions) *runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse] { @@ -356,7 +413,7 @@ func (client *WebSiteManagementClient) listCustomHostNameSitesCreateRequest(ctx if options != nil && options.Hostname != nil { reqQP.Set("hostname", *options.Hostname) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -372,8 +429,7 @@ func (client *WebSiteManagementClient) listCustomHostNameSitesHandleResponse(res } // NewListGeoRegionsPager - Description for Get a list of available geographical regions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListGeoRegions // method. func (client *WebSiteManagementClient) NewListGeoRegionsPager(options *WebSiteManagementClientListGeoRegionsOptions) *runtime.Pager[WebSiteManagementClientListGeoRegionsResponse] { @@ -428,7 +484,7 @@ func (client *WebSiteManagementClient) listGeoRegionsCreateRequest(ctx context.C if options != nil && options.LinuxDynamicWorkersEnabled != nil { reqQP.Set("linuxDynamicWorkersEnabled", strconv.FormatBool(*options.LinuxDynamicWorkersEnabled)) } - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -444,8 +500,7 @@ func (client *WebSiteManagementClient) listGeoRegionsHandleResponse(resp *http.R } // NewListPremierAddOnOffersPager - Description for List all premier add-on offers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.ListPremierAddOnOffers // method. func (client *WebSiteManagementClient) NewListPremierAddOnOffersPager(options *WebSiteManagementClientListPremierAddOnOffersOptions) *runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse] { @@ -488,7 +543,7 @@ func (client *WebSiteManagementClient) listPremierAddOnOffersCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -505,7 +560,7 @@ func (client *WebSiteManagementClient) listPremierAddOnOffersHandleResponse(resp // ListSKUs - Description for List all SKUs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs // method. func (client *WebSiteManagementClient) ListSKUs(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (WebSiteManagementClientListSKUsResponse, error) { @@ -535,7 +590,7 @@ func (client *WebSiteManagementClient) listSKUsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -551,8 +606,7 @@ func (client *WebSiteManagementClient) listSKUsHandleResponse(resp *http.Respons } // NewListSiteIdentifiersAssignedToHostNamePager - Description for List all apps that are assigned to a hostname. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // nameIdentifier - Hostname information. // options - WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the // WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName method. @@ -596,7 +650,7 @@ func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, nameIdentifier) @@ -612,8 +666,7 @@ func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameHand } // NewListSourceControlsPager - Description for Gets the source controls available for Azure websites. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // options - WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.ListSourceControls // method. func (client *WebSiteManagementClient) NewListSourceControlsPager(options *WebSiteManagementClientListSourceControlsOptions) *runtime.Pager[WebSiteManagementClientListSourceControlsResponse] { @@ -652,7 +705,7 @@ func (client *WebSiteManagementClient) listSourceControlsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -669,7 +722,7 @@ func (client *WebSiteManagementClient) listSourceControlsHandleResponse(resp *ht // Move - Description for Move resources between resource groups. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // moveResourceEnvelope - Object that represents the resource to move. // options - WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. @@ -704,7 +757,7 @@ func (client *WebSiteManagementClient) moveCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) @@ -712,7 +765,7 @@ func (client *WebSiteManagementClient) moveCreateRequest(ctx context.Context, re // UpdatePublishingUser - Description for Updates publishing user // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // userDetails - Details of publishing user // options - WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser // method. @@ -739,7 +792,7 @@ func (client *WebSiteManagementClient) updatePublishingUserCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, userDetails) @@ -756,7 +809,7 @@ func (client *WebSiteManagementClient) updatePublishingUserHandleResponse(resp * // UpdateSourceControl - Description for Updates source control token // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // sourceControlType - Type of source control // requestMessage - Source control token information // options - WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl @@ -788,7 +841,7 @@ func (client *WebSiteManagementClient) updateSourceControlCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, requestMessage) @@ -805,7 +858,7 @@ func (client *WebSiteManagementClient) updateSourceControlHandleResponse(resp *h // Validate - Description for Validate if a resource can be created. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // validateRequest - Request with the resources to validate. // options - WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate @@ -841,7 +894,7 @@ func (client *WebSiteManagementClient) validateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validateRequest) @@ -858,7 +911,7 @@ func (client *WebSiteManagementClient) validateHandleResponse(resp *http.Respons // ValidateMove - Description for Validate whether a resource can be moved. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // moveResourceEnvelope - Object that represents the resource to move. // options - WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove @@ -894,7 +947,7 @@ func (client *WebSiteManagementClient) validateMoveCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) @@ -903,7 +956,7 @@ func (client *WebSiteManagementClient) validateMoveCreateRequest(ctx context.Con // VerifyHostingEnvironmentVnet - Description for Verifies if this VNET is compatible with an App Service Environment by analyzing // the Network Security Group rules. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // parameters - VNET information // options - WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet // method. @@ -934,7 +987,7 @@ func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/appservice/armappservice/websitemanagementclient_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/websitemanagementclient_client_example_test.go deleted file mode 100644 index 12f20ebe2525..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/websitemanagementclient_client_example_test.go +++ /dev/null @@ -1,69 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/ListCustomHostNameSites.json -func ExampleWebSiteManagementClient_NewListCustomHostNameSitesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebSiteManagementClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCustomHostNameSitesPager(&armappservice.WebSiteManagementClientListCustomHostNameSitesOptions{Hostname: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/VerifyHostingEnvironmentVnet.json -func ExampleWebSiteManagementClient_VerifyHostingEnvironmentVnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebSiteManagementClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.VerifyHostingEnvironmentVnet(ctx, - armappservice.VnetParameters{ - Properties: &armappservice.VnetParametersProperties{ - VnetName: to.Ptr("vNet123"), - VnetResourceGroup: to.Ptr("vNet123rg"), - VnetSubnetName: to.Ptr("vNet123SubNet"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go index 17844b8d6e24..33c40d41a8fb 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go @@ -57,7 +57,7 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azc // Get - Get a workflow run action repetition. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -117,7 +117,7 @@ func (client *WorkflowRunActionRepetitionsClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -133,8 +133,7 @@ func (client *WorkflowRunActionRepetitionsClient) getHandleResponse(resp *http.R } // NewListPager - Get all of a workflow run action repetitions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -202,7 +201,7 @@ func (client *WorkflowRunActionRepetitionsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -218,8 +217,7 @@ func (client *WorkflowRunActionRepetitionsClient) listHandleResponse(resp *http. } // NewListExpressionTracesPager - Lists a workflow run expression trace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -292,7 +290,7 @@ func (client *WorkflowRunActionRepetitionsClient) listExpressionTracesCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go deleted file mode 100644 index c8dccdc9ab9c..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionRepetitions_List.json -func ExampleWorkflowRunActionRepetitionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionRepetitionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testResourceGroup", - "test-name", - "testFlow", - "08586776228332053161046300351", - "testAction", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionRepetitions_Get.json -func ExampleWorkflowRunActionRepetitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionRepetitionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testResourceGroup", - "test-name", - "testFlow", - "08586776228332053161046300351", - "testAction", - "000001", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionRepetitions_ListExpressionTraces.json -func ExampleWorkflowRunActionRepetitionsClient_NewListExpressionTracesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionRepetitionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListExpressionTracesPager("testResourceGroup", - "test-name", - "testFlow", - "08586776228332053161046300351", - "testAction", - "000001", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Inputs { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go index 785dea56be6f..f5893013bad4 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go @@ -57,7 +57,7 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string // Get - Gets a workflow run repetition request history. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -122,7 +122,7 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -138,8 +138,7 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getHandleRespo } // NewListPager - List a workflow run repetition request history. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -212,7 +211,7 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) listCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go deleted file mode 100644 index 5257cdd91c8b..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go +++ /dev/null @@ -1,74 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionRepetitionsRequestHistories_List.json -func ExampleWorkflowRunActionRepetitionsRequestHistoriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionRepetitionsRequestHistoriesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-resource-group", - "test-name", - "test-workflow", - "08586776228332053161046300351", - "HTTP_Webhook", - "000001", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json -func ExampleWorkflowRunActionRepetitionsRequestHistoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionRepetitionsRequestHistoriesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "08586776228332053161046300351", - "HTTP_Webhook", - "000001", - "08586611142732800686", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go index c2d90de9f635..81df37fc0b35 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go @@ -58,7 +58,7 @@ func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenC // Get - Gets a workflow run action. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -112,7 +112,7 @@ func (client *WorkflowRunActionsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -128,8 +128,7 @@ func (client *WorkflowRunActionsClient) getHandleResponse(resp *http.Response) ( } // NewListPager - Gets a list of workflow run actions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -191,7 +190,7 @@ func (client *WorkflowRunActionsClient) listCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -213,8 +212,7 @@ func (client *WorkflowRunActionsClient) listHandleResponse(resp *http.Response) } // NewListExpressionTracesPager - Lists a workflow run expression trace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -282,7 +280,7 @@ func (client *WorkflowRunActionsClient) listExpressionTracesCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go deleted file mode 100644 index ae9859f5e83f..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go +++ /dev/null @@ -1,101 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActions_List.json -func ExampleWorkflowRunActionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-resource-group", - "test-name", - "test-workflow", - "08586676746934337772206998657CU22", - &armappservice.WorkflowRunActionsClientListOptions{Top: nil, - Filter: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActions_Get.json -func ExampleWorkflowRunActionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "08586676746934337772206998657CU22", - "HTTP", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActions_ListExpressionTraces.json -func ExampleWorkflowRunActionsClient_NewListExpressionTracesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListExpressionTracesPager("testResourceGroup", - "test-name", - "testFlow", - "08586776228332053161046300351", - "testAction", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Inputs { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go index ca76b5607a61..d65e15b72ba8 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go @@ -57,7 +57,7 @@ func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credentia // Get - Get a workflow run action scoped repetition. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -117,7 +117,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -133,8 +133,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) getHandleResponse(resp *h } // NewListPager - List the workflow run action scoped repetitions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -202,7 +201,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go deleted file mode 100644 index c32fe56a4877..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go +++ /dev/null @@ -1,72 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionScopeRepetitions_List.json -func ExampleWorkflowRunActionScopeRepetitionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionScopeRepetitionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testResourceGroup", - "test-name", - "testFlow", - "08586776228332053161046300351", - "for_each", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRunActionScopeRepetitions_Get.json -func ExampleWorkflowRunActionScopeRepetitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunActionScopeRepetitionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testResourceGroup", - "test-name", - "testFlow", - "08586776228332053161046300351", - "for_each", - "000000", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go b/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go index 64bc205dc1f0..017512204779 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go @@ -58,7 +58,7 @@ func NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredent // Cancel - Cancels a workflow run. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -107,7 +107,7 @@ func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +115,7 @@ func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resou // Get - Gets a workflow run. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -164,7 +164,7 @@ func (client *WorkflowRunsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,8 +180,7 @@ func (client *WorkflowRunsClient) getHandleResponse(resp *http.Response) (Workfl } // NewListPager - Gets a list of workflow runs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -238,7 +237,7 @@ func (client *WorkflowRunsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go deleted file mode 100644 index bb88053ee7a6..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go +++ /dev/null @@ -1,92 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRuns_List.json -func ExampleWorkflowRunsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-resource-group", - "test-name", - "test-workflow", - &armappservice.WorkflowRunsClientListOptions{Top: nil, - Filter: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRuns_Get.json -func ExampleWorkflowRunsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "08586676746934337772206998657CU22", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowRuns_Cancel.json -func ExampleWorkflowRunsClient_Cancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowRunsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Cancel(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "08586676746934337772206998657CU22", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflows_client.go b/sdk/resourcemanager/appservice/armappservice/workflows_client.go index a5e8403c1ff2..e1227217f390 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflows_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflows_client.go @@ -57,7 +57,7 @@ func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential // RegenerateAccessKey - Regenerates the callback URL access key for request triggers. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -103,7 +103,7 @@ func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, keyType) @@ -111,7 +111,7 @@ func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Cont // Validate - Validates the workflow definition. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -156,7 +156,7 @@ func (client *WorkflowsClient) validateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validate) diff --git a/sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go deleted file mode 100644 index 7e56e31bc85b..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go +++ /dev/null @@ -1,76 +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 armappservice_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/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Workflows_RegenerateAccessKey.json -func ExampleWorkflowsClient_RegenerateAccessKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.RegenerateAccessKey(ctx, - "testResourceGroup", - "test-name", - "testWorkflowName", - armappservice.RegenerateActionParameter{ - KeyType: to.Ptr(armappservice.KeyTypePrimary), - }, - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/Workflows_Validate.json -func ExampleWorkflowsClient_Validate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Validate(ctx, - "test-resource-group", - "test-name", - "test-workflow", - armappservice.Workflow{ - Properties: &armappservice.WorkflowProperties{ - Definition: map[string]interface{}{ - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "actions": map[string]interface{}{}, - "contentVersion": "1.0.0.0", - "outputs": map[string]interface{}{}, - "parameters": map[string]interface{}{}, - "triggers": map[string]interface{}{}, - }, - Kind: to.Ptr(armappservice.KindStateful), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go index 78b2e65cdedd..fb27c17f3144 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go @@ -58,7 +58,7 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore. // Get - Gets a workflow trigger history. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -113,7 +113,7 @@ func (client *WorkflowTriggerHistoriesClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -129,8 +129,7 @@ func (client *WorkflowTriggerHistoriesClient) getHandleResponse(resp *http.Respo } // NewListPager - Gets a list of workflow trigger histories. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -193,7 +192,7 @@ func (client *WorkflowTriggerHistoriesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -216,7 +215,7 @@ func (client *WorkflowTriggerHistoriesClient) listHandleResponse(resp *http.Resp // BeginResubmit - Resubmits a workflow run based on the trigger history. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -238,7 +237,7 @@ func (client *WorkflowTriggerHistoriesClient) BeginResubmit(ctx context.Context, // Resubmit - Resubmits a workflow run based on the trigger history. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WorkflowTriggerHistoriesClient) resubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*http.Response, error) { req, err := client.resubmitCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) if err != nil { @@ -286,7 +285,7 @@ func (client *WorkflowTriggerHistoriesClient) resubmitCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go deleted file mode 100644 index 952b58a40ed5..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go +++ /dev/null @@ -1,99 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowTriggerHistories_List.json -func ExampleWorkflowTriggerHistoriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowTriggerHistoriesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testResourceGroup", - "test-name", - "testWorkflowName", - "testTriggerName", - &armappservice.WorkflowTriggerHistoriesClientListOptions{Top: nil, - Filter: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowTriggerHistories_Get.json -func ExampleWorkflowTriggerHistoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowTriggerHistoriesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testResourceGroup", - "test-name", - "testWorkflowName", - "testTriggerName", - "08586676746934337772206998657CU22", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowTriggerHistories_Resubmit.json -func ExampleWorkflowTriggerHistoriesClient_BeginResubmit() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowTriggerHistoriesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResubmit(ctx, - "testResourceGroup", - "test-name", - "testWorkflowName", - "testTriggerName", - "testHistoryName", - 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/appservice/armappservice/workflowtriggers_client.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go index 93fd0d967d14..d7617f6b4143 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go @@ -58,7 +58,7 @@ func NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCre // Get - Gets a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -107,7 +107,7 @@ func (client *WorkflowTriggersClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +124,7 @@ func (client *WorkflowTriggersClient) getHandleResponse(resp *http.Response) (Wo // GetSchemaJSON - Get the trigger schema as JSON. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -174,7 +174,7 @@ func (client *WorkflowTriggersClient) getSchemaJSONCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,8 +190,7 @@ func (client *WorkflowTriggersClient) getSchemaJSONHandleResponse(resp *http.Res } // NewListPager - Gets a list of workflow triggers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -248,7 +247,7 @@ func (client *WorkflowTriggersClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -271,7 +270,7 @@ func (client *WorkflowTriggersClient) listHandleResponse(resp *http.Response) (W // ListCallbackURL - Get the callback URL for a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -321,7 +320,7 @@ func (client *WorkflowTriggersClient) listCallbackURLCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -338,7 +337,7 @@ func (client *WorkflowTriggersClient) listCallbackURLHandleResponse(resp *http.R // BeginRun - Runs a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -359,7 +358,7 @@ func (client *WorkflowTriggersClient) BeginRun(ctx context.Context, resourceGrou // Run - Runs a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 func (client *WorkflowTriggersClient) run(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*http.Response, error) { req, err := client.runCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) if err != nil { @@ -403,7 +402,7 @@ func (client *WorkflowTriggersClient) runCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go deleted file mode 100644 index dcc4844fd8f0..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go +++ /dev/null @@ -1,96 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowTriggers_List.json -func ExampleWorkflowTriggersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowTriggersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-resource-group", - "test-name", - "test-workflow", - &armappservice.WorkflowTriggersClientListOptions{Top: nil, - Filter: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowTriggers_Get.json -func ExampleWorkflowTriggersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowTriggersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "manual", - 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowTriggers_Run.json -func ExampleWorkflowTriggersClient_BeginRun() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowTriggersClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRun(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "manual", - 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/appservice/armappservice/workflowversions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go index 01ccc17530eb..4686d461a718 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go @@ -58,7 +58,7 @@ func NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCre // Get - Gets a workflow version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -107,7 +107,7 @@ func (client *WorkflowVersionsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -123,8 +123,7 @@ func (client *WorkflowVersionsClient) getHandleResponse(resp *http.Response) (Wo } // NewListPager - Gets a list of workflow versions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-03-01 +// Generated from API version 2023-12-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // workflowName - The workflow name. @@ -181,7 +180,7 @@ func (client *WorkflowVersionsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-03-01") + reqQP.Set("api-version", "2023-12-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go deleted file mode 100644 index 3a6d11c6e42a..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go +++ /dev/null @@ -1,68 +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 armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowVersions_List.json -func ExampleWorkflowVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowVersionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-resource-group", - "test-name", - "test-workflow", - &armappservice.WorkflowVersionsClientListOptions{Top: 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/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/WorkflowVersions_Get.json -func ExampleWorkflowVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWorkflowVersionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-resource-group", - "test-name", - "test-workflow", - "08586676824806722526", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -}