From ed1a5bac3d60ad2eca721b42e03aa1841a22983e Mon Sep 17 00:00:00 2001 From: Kota Sudhakar Reddy <60102891+Kotasudhakarreddy@users.noreply.github.com> Date: Wed, 8 Sep 2021 11:07:51 +0530 Subject: [PATCH] .NET SDK generated for API version "2021-01-15" (#22832) --- .../mgmtmetadata/web_resource-manager.txt | 6 +- .../AzSdk.RP.props | 2 +- .../Generated/IKubeEnvironmentsOperations.cs | 297 + .../src/Generated/IWebAppsOperations.cs | 189 +- .../src/Generated/IWebSiteManagementClient.cs | 33 +- .../Generated/KubeEnvironmentsOperations.cs | 1708 ++++ .../KubeEnvironmentsOperationsExtensions.cs | 467 + .../Generated/Models/AppLogsConfiguration.cs | 52 + .../src/Generated/Models/AppServicePlan.cs | 19 +- .../Models/AppServicePlanPatchResource.cs | 13 +- .../src/Generated/Models/ArcConfiguration.cs | 86 + .../Models/CsmOperationDescription.cs | 8 +- ...PublishingCredentialsPoliciesCollection.cs | 94 - .../src/Generated/Models/ExtendedLocation.cs | 59 + .../Generated/Models/FrontEndConfiguration.cs | 49 + .../Generated/Models/FrontEndServiceType.cs | 60 + .../src/Generated/Models/KubeEnvironment.cs | 156 + .../Models/KubeEnvironmentPatchResource.cs | 138 + .../KubeEnvironmentProvisioningState.cs | 108 + .../Models/LogAnalyticsConfiguration.cs | 52 + .../Models/ManagedServiceIdentity.cs | 4 +- .../src/Generated/Models/Site.cs | 8 +- .../src/Generated/Models/StorageType.cs | 60 + ...titiesValue.cs => UserAssignedIdentity.cs} | 15 +- .../SdkInfo_WebSiteManagementClient.cs | 73 +- .../src/Generated/WebAppsOperations.cs | 8402 ++++++++++------- .../Generated/WebAppsOperationsExtensions.cs | 318 +- .../src/Generated/WebSiteManagementClient.cs | 44 +- ...Microsoft.Azure.Management.Websites.csproj | 4 +- .../src/Properties/AssemblyInfo.cs | 4 +- 30 files changed, 8661 insertions(+), 3867 deletions(-) create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesCollection.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs create mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs rename sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/{ManagedServiceIdentityUserAssignedIdentitiesValue.cs => UserAssignedIdentity.cs} (74%) diff --git a/eng/mgmt/mgmtmetadata/web_resource-manager.txt b/eng/mgmt/mgmtmetadata/web_resource-manager.txt index 53bc81aeae39..48d5b38729ea 100644 --- a/eng/mgmt/mgmtmetadata/web_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/web_resource-manager.txt @@ -3,13 +3,13 @@ AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-12 --csharp-sdks-folder=K:\DotNet-SDK\Apr-2021\azure-sdk-for-net\sdk +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=K:\DotNet-SDK\July-2021\azure-sdk-for-net\sdk Autorest CSharp Version: 2.3.84 -2021-05-18 03:16:34 UTC +2021-07-23 06:38:26 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 03a759c3b3c86cecc1c6030cc5e4d6940437706a +Commit: 9e9017617ee84fd46b0be3fe6a431e13bde18bd2 AutoRest information Requested version: v2 Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props b/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props index 5e8eb9669936..2b32a448efd3 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props @@ -1,7 +1,7 @@ - CertificateRegistration_2020-12-01;DomainRegistration_2020-12-01;Web_2020-12-01;Web_2020-12-01;WebSiteManagementClient_2020-12-01; + CertificateRegistration_2021-01-15;DomainRegistration_2021-01-15;Web_2021-01-15;Web_2021-01-15;WebSiteManagementClient_2021-01-15; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs new file mode 100644 index 000000000000..c91aa361b24a --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs @@ -0,0 +1,297 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// KubeEnvironmentsOperations operations. + /// + public partial interface IKubeEnvironmentsOperations + { + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource + /// group. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource + /// group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs index 1b54aedbd05c..d48729e3932c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs @@ -488,7 +488,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns whether FTP is allowed on the site or not. /// @@ -3845,6 +3845,47 @@ public partial interface IWebAppsOperations /// Task DeleteSwiftVirtualNetworkWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. + /// This requires 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. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets all network features used by the app (or deployment slot, if /// specified). /// @@ -5716,7 +5757,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns whether FTP is allowed on the site or not. /// @@ -9245,6 +9286,51 @@ public partial interface IWebAppsOperations /// Task> GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. + /// This requires 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. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API + /// will add or update connections for the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Deletes a Swift Virtual Network connection from an app (or /// deployment slot). /// @@ -9276,6 +9362,51 @@ public partial interface IWebAppsOperations /// Task DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. + /// This requires 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. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API + /// will add or update connections for the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets all network features used by the app (or deployment slot, if /// specified). /// @@ -14093,6 +14224,33 @@ public partial interface IWebAppsOperations /// Task>> ListBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Returns whether Scm basic auth is allowed and whether Ftp is + /// allowed for a given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and + /// whether Ftp is allowed for a given site. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBasicPublishingCredentialsPoliciesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List the configurations of an app /// /// @@ -14696,6 +14854,33 @@ public partial interface IWebAppsOperations /// Task>> ListBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Returns whether Scm basic auth is allowed and whether Ftp is + /// allowed for a given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and + /// whether Ftp is allowed for a given site. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBasicPublishingCredentialsPoliciesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List the configurations of an app /// /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs index 2c6b10eea2a4..3b43eb7611d8 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs @@ -104,6 +104,16 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// IDomainRegistrationProviderOperations DomainRegistrationProvider { get; } + /// + /// Gets the IAppServiceEnvironmentsOperations. + /// + IAppServiceEnvironmentsOperations AppServiceEnvironments { get; } + + /// + /// Gets the IAppServicePlansOperations. + /// + IAppServicePlansOperations AppServicePlans { get; } + /// /// Gets the ICertificatesOperations. /// @@ -124,6 +134,11 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// IGlobalModelOperations GlobalModel { get; } + /// + /// Gets the IKubeEnvironmentsOperations. + /// + IKubeEnvironmentsOperations KubeEnvironments { get; } + /// /// Gets the IProviderOperations. /// @@ -135,9 +150,9 @@ public partial interface IWebSiteManagementClient : System.IDisposable IRecommendationsOperations Recommendations { get; } /// - /// Gets the IWebAppsOperations. + /// Gets the IResourceHealthMetadataOperations. /// - IWebAppsOperations WebApps { get; } + IResourceHealthMetadataOperations ResourceHealthMetadata { get; } /// /// Gets the IStaticSitesOperations. @@ -145,19 +160,9 @@ public partial interface IWebSiteManagementClient : System.IDisposable IStaticSitesOperations StaticSites { get; } /// - /// Gets the IAppServiceEnvironmentsOperations. - /// - IAppServiceEnvironmentsOperations AppServiceEnvironments { get; } - - /// - /// Gets the IAppServicePlansOperations. - /// - IAppServicePlansOperations AppServicePlans { get; } - - /// - /// Gets the IResourceHealthMetadataOperations. + /// Gets the IWebAppsOperations. /// - IResourceHealthMetadataOperations ResourceHealthMetadata { get; } + IWebAppsOperations WebApps { get; } /// /// Exchange code for GitHub access token for AppService CLI diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs new file mode 100644 index 000000000000..6f817f1b68ec --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs @@ -0,0 +1,1708 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// KubeEnvironmentsOperations operations. + /// + internal partial class KubeEnvironmentsOperations : IServiceOperations, IKubeEnvironmentsOperations + { + /// + /// Initializes a new instance of the KubeEnvironmentsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal KubeEnvironmentsOperations(WebSiteManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the WebSiteManagementClient + /// + public WebSiteManagementClient Client { get; private set; } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (kubeEnvironmentEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "kubeEnvironmentEnvelope"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("kubeEnvironmentEnvelope", kubeEnvironmentEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(kubeEnvironmentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(kubeEnvironmentEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (kubeEnvironmentEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "kubeEnvironmentEnvelope"); + } + if (kubeEnvironmentEnvelope != null) + { + kubeEnvironmentEnvelope.Validate(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("kubeEnvironmentEnvelope", kubeEnvironmentEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(kubeEnvironmentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(kubeEnvironmentEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs new file mode 100644 index 000000000000..fda574b00e42 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs @@ -0,0 +1,467 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for KubeEnvironmentsOperations. + /// + public static partial class KubeEnvironmentsOperationsExtensions + { + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListBySubscription(this IKubeEnvironmentsOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IKubeEnvironmentsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + public static IPage ListByResourceGroup(this IKubeEnvironmentsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + public static KubeEnvironment Get(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) + { + return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + public static KubeEnvironment CreateOrUpdate(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope) + { + return operations.CreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + public static void Delete(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) + { + operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + public static KubeEnvironment Update(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope) + { + return operations.UpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + public static KubeEnvironment BeginCreateOrUpdate(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + public static void BeginDelete(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) + { + operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBySubscriptionNext(this IKubeEnvironmentsOperations operations, string nextPageLink) + { + return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionNextAsync(this IKubeEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IKubeEnvironmentsOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IKubeEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs new file mode 100644 index 000000000000..a1deb095dbf0 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs @@ -0,0 +1,52 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class AppLogsConfiguration + { + /// + /// Initializes a new instance of the AppLogsConfiguration class. + /// + public AppLogsConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppLogsConfiguration class. + /// + public AppLogsConfiguration(string destination = default(string), LogAnalyticsConfiguration logAnalyticsConfiguration = default(LogAnalyticsConfiguration)) + { + Destination = destination; + LogAnalyticsConfiguration = logAnalyticsConfiguration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "destination")] + public string Destination { get; set; } + + /// + /// + [JsonProperty(PropertyName = "logAnalyticsConfiguration")] + public LogAnalyticsConfiguration LogAnalyticsConfiguration { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs index b77592992597..99df81c6036c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs @@ -55,6 +55,9 @@ public AppServicePlan() /// assigned to this App Service plan can be scaled independently. /// If <code>false</code>, apps assigned to this App /// Service plan will scale to all instances of the plan. + /// ServerFarm supports ElasticScale. + /// Apps in this plan will scale as if the ServerFarm was + /// ElasticPremium sku /// Maximum number of total /// workers allowed for this ElasticScaleEnabled App Service /// Plan @@ -84,7 +87,7 @@ public AppServicePlan() /// 'Canceled', 'InProgress', 'Deleting' /// Specification for the /// Kubernetes Environment to use for the App Service plan. - public AppServicePlan(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile), SkuDescription sku = default(SkuDescription)) + public AppServicePlan(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), bool? elasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile), SkuDescription sku = default(SkuDescription), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, kind, type, tags) { WorkerTierName = workerTierName; @@ -94,6 +97,7 @@ public AppServicePlan() MaximumNumberOfWorkers = maximumNumberOfWorkers; GeoRegion = geoRegion; PerSiteScaling = perSiteScaling; + ElasticScaleEnabled = elasticScaleEnabled; MaximumElasticWorkerCount = maximumElasticWorkerCount; NumberOfSites = numberOfSites; IsSpot = isSpot; @@ -108,6 +112,7 @@ public AppServicePlan() ProvisioningState = provisioningState; KubeEnvironmentProfile = kubeEnvironmentProfile; Sku = sku; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -164,6 +169,13 @@ public AppServicePlan() [JsonProperty(PropertyName = "properties.perSiteScaling")] public bool? PerSiteScaling { get; set; } + /// + /// Gets or sets serverFarm supports ElasticScale. Apps in this plan + /// will scale as if the ServerFarm was ElasticPremium sku + /// + [JsonProperty(PropertyName = "properties.elasticScaleEnabled")] + public bool? ElasticScaleEnabled { get; set; } + /// /// Gets or sets maximum number of total workers allowed for this /// ElasticScaleEnabled App Service Plan @@ -259,6 +271,11 @@ public AppServicePlan() [JsonProperty(PropertyName = "sku")] public SkuDescription Sku { get; set; } + /// + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs index 87b7050495c3..418fba09030a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs @@ -53,6 +53,9 @@ public AppServicePlanPatchResource() /// assigned to this App Service plan can be scaled independently. /// If <code>false</code>, apps assigned to this App /// Service plan will scale to all instances of the plan. + /// ServerFarm supports ElasticScale. + /// Apps in this plan will scale as if the ServerFarm was + /// ElasticPremium sku /// Maximum number of total /// workers allowed for this ElasticScaleEnabled App Service /// Plan @@ -82,7 +85,7 @@ public AppServicePlanPatchResource() /// 'Canceled', 'InProgress', 'Deleting' /// Specification for the /// Kubernetes Environment to use for the App Service plan. - public AppServicePlanPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile)) + public AppServicePlanPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), bool? elasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile)) : base(id, name, kind, type) { WorkerTierName = workerTierName; @@ -92,6 +95,7 @@ public AppServicePlanPatchResource() MaximumNumberOfWorkers = maximumNumberOfWorkers; GeoRegion = geoRegion; PerSiteScaling = perSiteScaling; + ElasticScaleEnabled = elasticScaleEnabled; MaximumElasticWorkerCount = maximumElasticWorkerCount; NumberOfSites = numberOfSites; IsSpot = isSpot; @@ -161,6 +165,13 @@ public AppServicePlanPatchResource() [JsonProperty(PropertyName = "properties.perSiteScaling")] public bool? PerSiteScaling { get; set; } + /// + /// Gets or sets serverFarm supports ElasticScale. Apps in this plan + /// will scale as if the ServerFarm was ElasticPremium sku + /// + [JsonProperty(PropertyName = "properties.elasticScaleEnabled")] + public bool? ElasticScaleEnabled { get; set; } + /// /// Gets or sets maximum number of total workers allowed for this /// ElasticScaleEnabled App Service Plan diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs new file mode 100644 index 000000000000..8fa89baad2b2 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs @@ -0,0 +1,86 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ArcConfiguration + { + /// + /// Initializes a new instance of the ArcConfiguration class. + /// + public ArcConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArcConfiguration class. + /// + /// Possible values include: + /// 'LocalNode', 'NetworkFileSystem' + public ArcConfiguration(StorageType? artifactsStorageType = default(StorageType?), string artifactStorageClassName = default(string), string artifactStorageMountPath = default(string), string artifactStorageNodeName = default(string), string artifactStorageAccessMode = default(string), FrontEndConfiguration frontEndServiceConfiguration = default(FrontEndConfiguration), string kubeConfig = default(string)) + { + ArtifactsStorageType = artifactsStorageType; + ArtifactStorageClassName = artifactStorageClassName; + ArtifactStorageMountPath = artifactStorageMountPath; + ArtifactStorageNodeName = artifactStorageNodeName; + ArtifactStorageAccessMode = artifactStorageAccessMode; + FrontEndServiceConfiguration = frontEndServiceConfiguration; + KubeConfig = kubeConfig; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'LocalNode', + /// 'NetworkFileSystem' + /// + [JsonProperty(PropertyName = "artifactsStorageType")] + public StorageType? ArtifactsStorageType { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageClassName")] + public string ArtifactStorageClassName { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageMountPath")] + public string ArtifactStorageMountPath { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageNodeName")] + public string ArtifactStorageNodeName { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageAccessMode")] + public string ArtifactStorageAccessMode { get; set; } + + /// + /// + [JsonProperty(PropertyName = "frontEndServiceConfiguration")] + public FrontEndConfiguration FrontEndServiceConfiguration { get; set; } + + /// + /// + [JsonProperty(PropertyName = "kubeConfig")] + public string KubeConfig { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs index e37bb469ac64..52de32488e8f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs @@ -30,9 +30,10 @@ public CsmOperationDescription() /// /// Initializes a new instance of the CsmOperationDescription class. /// - public CsmOperationDescription(string name = default(string), CsmOperationDisplay display = default(CsmOperationDisplay), string origin = default(string), CsmOperationDescriptionProperties properties = default(CsmOperationDescriptionProperties)) + public CsmOperationDescription(string name = default(string), bool? isDataAction = default(bool?), CsmOperationDisplay display = default(CsmOperationDisplay), string origin = default(string), CsmOperationDescriptionProperties properties = default(CsmOperationDescriptionProperties)) { Name = name; + IsDataAction = isDataAction; Display = display; Origin = origin; Properties = properties; @@ -49,6 +50,11 @@ public CsmOperationDescription() [JsonProperty(PropertyName = "name")] public string Name { get; set; } + /// + /// + [JsonProperty(PropertyName = "isDataAction")] + public bool? IsDataAction { get; set; } + /// /// [JsonProperty(PropertyName = "display")] diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesCollection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesCollection.cs deleted file mode 100644 index 364b186fed71..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesCollection.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// 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. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Publishing Credentials Policies collection. - /// - [Rest.Serialization.JsonTransformation] - public partial class CsmPublishingCredentialsPoliciesCollection : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// CsmPublishingCredentialsPoliciesCollection class. - /// - public CsmPublishingCredentialsPoliciesCollection() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CsmPublishingCredentialsPoliciesCollection class. - /// - /// Whether FTP is allowed. - /// Whether Scm Basic Auth is allowed. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public CsmPublishingCredentialsPoliciesCollection(CsmPublishingCredentialsPoliciesEntity ftp, CsmPublishingCredentialsPoliciesEntity scm, string id = default(string), string name = default(string), string kind = default(string), string type = default(string)) - : base(id, name, kind, type) - { - Ftp = ftp; - Scm = scm; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets whether FTP is allowed. - /// - [JsonProperty(PropertyName = "properties.ftp")] - public CsmPublishingCredentialsPoliciesEntity Ftp { get; set; } - - /// - /// Gets or sets whether Scm Basic Auth is allowed. - /// - [JsonProperty(PropertyName = "properties.scm")] - public CsmPublishingCredentialsPoliciesEntity Scm { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Ftp == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Ftp"); - } - if (Scm == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Scm"); - } - if (Ftp != null) - { - Ftp.Validate(); - } - if (Scm != null) - { - Scm.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs new file mode 100644 index 000000000000..3fa0e6d091ef --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs @@ -0,0 +1,59 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Extended Location. + /// + public partial class ExtendedLocation + { + /// + /// Initializes a new instance of the ExtendedLocation class. + /// + public ExtendedLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExtendedLocation class. + /// + /// Name of extended location. + /// Type of extended location. + public ExtendedLocation(string name = default(string), string type = default(string)) + { + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of extended location. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets type of extended location. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs new file mode 100644 index 000000000000..0f851ec956af --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs @@ -0,0 +1,49 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class FrontEndConfiguration + { + /// + /// Initializes a new instance of the FrontEndConfiguration class. + /// + public FrontEndConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FrontEndConfiguration class. + /// + /// Possible values include: 'NodePort', + /// 'LoadBalancer' + public FrontEndConfiguration(FrontEndServiceType? kind = default(FrontEndServiceType?)) + { + Kind = kind; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'NodePort', 'LoadBalancer' + /// + [JsonProperty(PropertyName = "kind")] + public FrontEndServiceType? Kind { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs new file mode 100644 index 000000000000..b89583e73855 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs @@ -0,0 +1,60 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for FrontEndServiceType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FrontEndServiceType + { + [EnumMember(Value = "NodePort")] + NodePort, + [EnumMember(Value = "LoadBalancer")] + LoadBalancer + } + internal static class FrontEndServiceTypeEnumExtension + { + internal static string ToSerializedValue(this FrontEndServiceType? value) + { + return value == null ? null : ((FrontEndServiceType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this FrontEndServiceType value) + { + switch( value ) + { + case FrontEndServiceType.NodePort: + return "NodePort"; + case FrontEndServiceType.LoadBalancer: + return "LoadBalancer"; + } + return null; + } + + internal static FrontEndServiceType? ParseFrontEndServiceType(this string value) + { + switch( value ) + { + case "NodePort": + return FrontEndServiceType.NodePort; + case "LoadBalancer": + return FrontEndServiceType.LoadBalancer; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs new file mode 100644 index 000000000000..17a2f2ac7f9c --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs @@ -0,0 +1,156 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A Kubernetes cluster specialized for web workloads by Azure App Service + /// + [Rest.Serialization.JsonTransformation] + public partial class KubeEnvironment : Resource + { + /// + /// Initializes a new instance of the KubeEnvironment class. + /// + public KubeEnvironment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KubeEnvironment class. + /// + /// Resource Location. + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Resource tags. + /// Provisioning state of the + /// Kubernetes Environment. Possible values include: 'Succeeded', + /// 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', + /// 'InfrastructureSetupInProgress', 'InfrastructureSetupComplete', + /// 'ScheduledForDelete', 'UpgradeRequested', 'UpgradeFailed' + /// Any errors that occurred during + /// deployment or deployment validation + /// Only visible within + /// Vnet/Subnet + /// Default Domain Name for the + /// cluster + /// Static IP of the KubeEnvironment + /// Cluster configuration which + /// determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// Cluster configuration which + /// enables the log daemon to export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + public KubeEnvironment(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), KubeEnvironmentProvisioningState? provisioningState = default(KubeEnvironmentProvisioningState?), string deploymentErrors = default(string), bool? internalLoadBalancerEnabled = default(bool?), string defaultDomain = default(string), string staticIp = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), string aksResourceID = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation)) + : base(location, id, name, kind, type, tags) + { + ProvisioningState = provisioningState; + DeploymentErrors = deploymentErrors; + InternalLoadBalancerEnabled = internalLoadBalancerEnabled; + DefaultDomain = defaultDomain; + StaticIp = staticIp; + ArcConfiguration = arcConfiguration; + AppLogsConfiguration = appLogsConfiguration; + AksResourceID = aksResourceID; + ExtendedLocation = extendedLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets provisioning state of the Kubernetes Environment. Possible + /// values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', + /// 'InitializationInProgress', 'InfrastructureSetupInProgress', + /// 'InfrastructureSetupComplete', 'ScheduledForDelete', + /// 'UpgradeRequested', 'UpgradeFailed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public KubeEnvironmentProvisioningState? ProvisioningState { get; private set; } + + /// + /// Gets any errors that occurred during deployment or deployment + /// validation + /// + [JsonProperty(PropertyName = "properties.deploymentErrors")] + public string DeploymentErrors { get; private set; } + + /// + /// Gets or sets only visible within Vnet/Subnet + /// + [JsonProperty(PropertyName = "properties.internalLoadBalancerEnabled")] + public bool? InternalLoadBalancerEnabled { get; set; } + + /// + /// Gets default Domain Name for the cluster + /// + [JsonProperty(PropertyName = "properties.defaultDomain")] + public string DefaultDomain { get; private set; } + + /// + /// Gets or sets static IP of the KubeEnvironment + /// + [JsonProperty(PropertyName = "properties.staticIp")] + public string StaticIp { get; set; } + + /// + /// Gets or sets cluster configuration which determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// + [JsonProperty(PropertyName = "properties.arcConfiguration")] + public ArcConfiguration ArcConfiguration { get; set; } + + /// + /// Gets or sets cluster configuration which enables the log daemon to + /// export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + /// + [JsonProperty(PropertyName = "properties.appLogsConfiguration")] + public AppLogsConfiguration AppLogsConfiguration { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.aksResourceID")] + public string AksResourceID { get; set; } + + /// + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs new file mode 100644 index 000000000000..b68076067de1 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs @@ -0,0 +1,138 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ARM resource for a KubeEnvironment when patching + /// + [Rest.Serialization.JsonTransformation] + public partial class KubeEnvironmentPatchResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the KubeEnvironmentPatchResource + /// class. + /// + public KubeEnvironmentPatchResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KubeEnvironmentPatchResource + /// class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Provisioning state of the + /// Kubernetes Environment. Possible values include: 'Succeeded', + /// 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', + /// 'InfrastructureSetupInProgress', 'InfrastructureSetupComplete', + /// 'ScheduledForDelete', 'UpgradeRequested', 'UpgradeFailed' + /// Any errors that occurred during + /// deployment or deployment validation + /// Only visible within + /// Vnet/Subnet + /// Default Domain Name for the + /// cluster + /// Static IP of the KubeEnvironment + /// Cluster configuration which + /// determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// Cluster configuration which + /// enables the log daemon to export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + public KubeEnvironmentPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), KubeEnvironmentProvisioningState? provisioningState = default(KubeEnvironmentProvisioningState?), string deploymentErrors = default(string), bool? internalLoadBalancerEnabled = default(bool?), string defaultDomain = default(string), string staticIp = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), string aksResourceID = default(string)) + : base(id, name, kind, type) + { + ProvisioningState = provisioningState; + DeploymentErrors = deploymentErrors; + InternalLoadBalancerEnabled = internalLoadBalancerEnabled; + DefaultDomain = defaultDomain; + StaticIp = staticIp; + ArcConfiguration = arcConfiguration; + AppLogsConfiguration = appLogsConfiguration; + AksResourceID = aksResourceID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets provisioning state of the Kubernetes Environment. Possible + /// values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', + /// 'InitializationInProgress', 'InfrastructureSetupInProgress', + /// 'InfrastructureSetupComplete', 'ScheduledForDelete', + /// 'UpgradeRequested', 'UpgradeFailed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public KubeEnvironmentProvisioningState? ProvisioningState { get; private set; } + + /// + /// Gets any errors that occurred during deployment or deployment + /// validation + /// + [JsonProperty(PropertyName = "properties.deploymentErrors")] + public string DeploymentErrors { get; private set; } + + /// + /// Gets or sets only visible within Vnet/Subnet + /// + [JsonProperty(PropertyName = "properties.internalLoadBalancerEnabled")] + public bool? InternalLoadBalancerEnabled { get; set; } + + /// + /// Gets default Domain Name for the cluster + /// + [JsonProperty(PropertyName = "properties.defaultDomain")] + public string DefaultDomain { get; private set; } + + /// + /// Gets or sets static IP of the KubeEnvironment + /// + [JsonProperty(PropertyName = "properties.staticIp")] + public string StaticIp { get; set; } + + /// + /// Gets or sets cluster configuration which determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// + [JsonProperty(PropertyName = "properties.arcConfiguration")] + public ArcConfiguration ArcConfiguration { get; set; } + + /// + /// Gets or sets cluster configuration which enables the log daemon to + /// export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + /// + [JsonProperty(PropertyName = "properties.appLogsConfiguration")] + public AppLogsConfiguration AppLogsConfiguration { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.aksResourceID")] + public string AksResourceID { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs new file mode 100644 index 000000000000..46249dd6048b --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs @@ -0,0 +1,108 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for KubeEnvironmentProvisioningState. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KubeEnvironmentProvisioningState + { + [EnumMember(Value = "Succeeded")] + Succeeded, + [EnumMember(Value = "Failed")] + Failed, + [EnumMember(Value = "Canceled")] + Canceled, + [EnumMember(Value = "Waiting")] + Waiting, + [EnumMember(Value = "InitializationInProgress")] + InitializationInProgress, + [EnumMember(Value = "InfrastructureSetupInProgress")] + InfrastructureSetupInProgress, + [EnumMember(Value = "InfrastructureSetupComplete")] + InfrastructureSetupComplete, + [EnumMember(Value = "ScheduledForDelete")] + ScheduledForDelete, + [EnumMember(Value = "UpgradeRequested")] + UpgradeRequested, + [EnumMember(Value = "UpgradeFailed")] + UpgradeFailed + } + internal static class KubeEnvironmentProvisioningStateEnumExtension + { + internal static string ToSerializedValue(this KubeEnvironmentProvisioningState? value) + { + return value == null ? null : ((KubeEnvironmentProvisioningState)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this KubeEnvironmentProvisioningState value) + { + switch( value ) + { + case KubeEnvironmentProvisioningState.Succeeded: + return "Succeeded"; + case KubeEnvironmentProvisioningState.Failed: + return "Failed"; + case KubeEnvironmentProvisioningState.Canceled: + return "Canceled"; + case KubeEnvironmentProvisioningState.Waiting: + return "Waiting"; + case KubeEnvironmentProvisioningState.InitializationInProgress: + return "InitializationInProgress"; + case KubeEnvironmentProvisioningState.InfrastructureSetupInProgress: + return "InfrastructureSetupInProgress"; + case KubeEnvironmentProvisioningState.InfrastructureSetupComplete: + return "InfrastructureSetupComplete"; + case KubeEnvironmentProvisioningState.ScheduledForDelete: + return "ScheduledForDelete"; + case KubeEnvironmentProvisioningState.UpgradeRequested: + return "UpgradeRequested"; + case KubeEnvironmentProvisioningState.UpgradeFailed: + return "UpgradeFailed"; + } + return null; + } + + internal static KubeEnvironmentProvisioningState? ParseKubeEnvironmentProvisioningState(this string value) + { + switch( value ) + { + case "Succeeded": + return KubeEnvironmentProvisioningState.Succeeded; + case "Failed": + return KubeEnvironmentProvisioningState.Failed; + case "Canceled": + return KubeEnvironmentProvisioningState.Canceled; + case "Waiting": + return KubeEnvironmentProvisioningState.Waiting; + case "InitializationInProgress": + return KubeEnvironmentProvisioningState.InitializationInProgress; + case "InfrastructureSetupInProgress": + return KubeEnvironmentProvisioningState.InfrastructureSetupInProgress; + case "InfrastructureSetupComplete": + return KubeEnvironmentProvisioningState.InfrastructureSetupComplete; + case "ScheduledForDelete": + return KubeEnvironmentProvisioningState.ScheduledForDelete; + case "UpgradeRequested": + return KubeEnvironmentProvisioningState.UpgradeRequested; + case "UpgradeFailed": + return KubeEnvironmentProvisioningState.UpgradeFailed; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs new file mode 100644 index 000000000000..c2a3350d2da9 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs @@ -0,0 +1,52 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class LogAnalyticsConfiguration + { + /// + /// Initializes a new instance of the LogAnalyticsConfiguration class. + /// + public LogAnalyticsConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogAnalyticsConfiguration class. + /// + public LogAnalyticsConfiguration(string customerId = default(string), string sharedKey = default(string)) + { + CustomerId = customerId; + SharedKey = sharedKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "customerId")] + public string CustomerId { get; set; } + + /// + /// + [JsonProperty(PropertyName = "sharedKey")] + public string SharedKey { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs index 2063a4bd6055..7f08f9d1ee37 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs @@ -41,7 +41,7 @@ public ManagedServiceIdentity() /// identities associated with the resource. The user identity /// dictionary key references will be ARM resource ids in the form: /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - public ManagedServiceIdentity(ManagedServiceIdentityType? type = default(ManagedServiceIdentityType?), string tenantId = default(string), string principalId = default(string), IDictionary userAssignedIdentities = default(IDictionary)) + public ManagedServiceIdentity(ManagedServiceIdentityType? type = default(ManagedServiceIdentityType?), string tenantId = default(string), string principalId = default(string), IDictionary userAssignedIdentities = default(IDictionary)) { Type = type; TenantId = tenantId; @@ -82,7 +82,7 @@ public ManagedServiceIdentity() /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} /// [JsonProperty(PropertyName = "userAssignedIdentities")] - public IDictionary UserAssignedIdentities { get; set; } + public IDictionary UserAssignedIdentities { get; set; } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs index 9d2e1ed4bb32..cda65a55c0cc 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs @@ -149,7 +149,7 @@ public Site() /// Integration. /// This must be of the form /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - public Site(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? storageAccountRequired = default(bool?), string keyVaultReferenceIdentity = default(string), string virtualNetworkSubnetId = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) + public Site(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? storageAccountRequired = default(bool?), string keyVaultReferenceIdentity = default(string), string virtualNetworkSubnetId = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, kind, type, tags) { State = state; @@ -194,6 +194,7 @@ public Site() KeyVaultReferenceIdentity = keyVaultReferenceIdentity; VirtualNetworkSubnetId = virtualNetworkSubnetId; Identity = identity; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -511,6 +512,11 @@ public Site() [JsonProperty(PropertyName = "identity")] public ManagedServiceIdentity Identity { get; set; } + /// + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs new file mode 100644 index 000000000000..4303d47c3dee --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs @@ -0,0 +1,60 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for StorageType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StorageType + { + [EnumMember(Value = "LocalNode")] + LocalNode, + [EnumMember(Value = "NetworkFileSystem")] + NetworkFileSystem + } + internal static class StorageTypeEnumExtension + { + internal static string ToSerializedValue(this StorageType? value) + { + return value == null ? null : ((StorageType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this StorageType value) + { + switch( value ) + { + case StorageType.LocalNode: + return "LocalNode"; + case StorageType.NetworkFileSystem: + return "NetworkFileSystem"; + } + return null; + } + + internal static StorageType? ParseStorageType(this string value) + { + switch( value ) + { + case "LocalNode": + return StorageType.LocalNode; + case "NetworkFileSystem": + return StorageType.NetworkFileSystem; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs similarity index 74% rename from sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs rename to sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs index d8ba6054a611..f1f373fbdc70 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs @@ -13,25 +13,26 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; - public partial class ManagedServiceIdentityUserAssignedIdentitiesValue + /// + /// User Assigned identity. + /// + public partial class UserAssignedIdentity { /// - /// Initializes a new instance of the - /// ManagedServiceIdentityUserAssignedIdentitiesValue class. + /// Initializes a new instance of the UserAssignedIdentity class. /// - public ManagedServiceIdentityUserAssignedIdentitiesValue() + public UserAssignedIdentity() { CustomInit(); } /// - /// Initializes a new instance of the - /// ManagedServiceIdentityUserAssignedIdentitiesValue class. + /// Initializes a new instance of the UserAssignedIdentity class. /// /// Principal Id of user assigned /// identity /// Client Id of user assigned identity - public ManagedServiceIdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string)) + public UserAssignedIdentity(string principalId = default(string), string clientId = default(string)) { PrincipalId = principalId; ClientId = clientId; diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs index e081f8220e4f..35c6e8e27f9b 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs @@ -19,50 +19,51 @@ public static IEnumerable> ApiInfo_WebSiteManageme { return new Tuple[] { - new Tuple("CertificateRegistration", "AppServiceCertificateOrders", "2020-12-01"), - new Tuple("CertificateRegistration", "CertificateOrdersDiagnostics", "2020-12-01"), - new Tuple("CertificateRegistration", "CertificateRegistrationProvider", "2020-12-01"), - new Tuple("DomainRegistration", "DomainRegistrationProvider", "2020-12-01"), - new Tuple("DomainRegistration", "Domains", "2020-12-01"), - new Tuple("DomainRegistration", "TopLevelDomains", "2020-12-01"), - new Tuple("Web", "AppServiceEnvironments", "2020-12-01"), - new Tuple("Web", "AppServicePlans", "2020-12-01"), - new Tuple("Web", "Certificates", "2020-12-01"), - new Tuple("Web", "CheckNameAvailability", "2020-12-01"), - new Tuple("Web", "DeletedWebApps", "2020-12-01"), - new Tuple("Web", "Diagnostics", "2020-12-01"), - new Tuple("Web", "GenerateGithubAccessTokenForAppserviceCLIAsync", "2020-12-01"), - new Tuple("Web", "GetPublishingUser", "2020-12-01"), - new Tuple("Web", "GetSourceControl", "2020-12-01"), - new Tuple("Web", "GetSubscriptionDeploymentLocations", "2020-12-01"), - new Tuple("Web", "Global", "2020-12-01"), - new Tuple("Web", "ListBillingMeters", "2020-12-01"), - new Tuple("Web", "ListGeoRegions", "2020-12-01"), - new Tuple("Web", "ListPremierAddOnOffers", "2020-12-01"), - new Tuple("Web", "ListSiteIdentifiersAssignedToHostName", "2020-12-01"), - new Tuple("Web", "ListSkus", "2020-12-01"), - new Tuple("Web", "ListSourceControls", "2020-12-01"), - new Tuple("Web", "Provider", "2020-12-01"), - new Tuple("Web", "Recommendations", "2020-12-01"), - new Tuple("Web", "ResourceHealthMetadata", "2020-12-01"), - new Tuple("Web", "StaticSites", "2020-12-01"), - new Tuple("Web", "UpdatePublishingUser", "2020-12-01"), - new Tuple("Web", "UpdateSourceControl", "2020-12-01"), - new Tuple("Web", "Validate", "2020-12-01"), - new Tuple("Web", "VerifyHostingEnvironmentVnet", "2020-12-01"), - new Tuple("Web", "WebApps", "2020-12-01"), - new Tuple("WebSiteManagementClient", "Move", "2020-12-01"), - new Tuple("WebSiteManagementClient", "ValidateMove", "2020-12-01"), + new Tuple("CertificateRegistration", "AppServiceCertificateOrders", "2021-01-15"), + new Tuple("CertificateRegistration", "CertificateOrdersDiagnostics", "2021-01-15"), + new Tuple("CertificateRegistration", "CertificateRegistrationProvider", "2021-01-15"), + new Tuple("DomainRegistration", "DomainRegistrationProvider", "2021-01-15"), + new Tuple("DomainRegistration", "Domains", "2021-01-15"), + new Tuple("DomainRegistration", "TopLevelDomains", "2021-01-15"), + new Tuple("Web", "AppServiceEnvironments", "2021-01-15"), + new Tuple("Web", "AppServicePlans", "2021-01-15"), + new Tuple("Web", "Certificates", "2021-01-15"), + new Tuple("Web", "CheckNameAvailability", "2021-01-15"), + new Tuple("Web", "DeletedWebApps", "2021-01-15"), + new Tuple("Web", "Diagnostics", "2021-01-15"), + new Tuple("Web", "GenerateGithubAccessTokenForAppserviceCLIAsync", "2021-01-15"), + new Tuple("Web", "GetPublishingUser", "2021-01-15"), + new Tuple("Web", "GetSourceControl", "2021-01-15"), + new Tuple("Web", "GetSubscriptionDeploymentLocations", "2021-01-15"), + new Tuple("Web", "Global", "2021-01-15"), + new Tuple("Web", "KubeEnvironments", "2021-01-15"), + new Tuple("Web", "ListBillingMeters", "2021-01-15"), + new Tuple("Web", "ListGeoRegions", "2021-01-15"), + new Tuple("Web", "ListPremierAddOnOffers", "2021-01-15"), + new Tuple("Web", "ListSiteIdentifiersAssignedToHostName", "2021-01-15"), + new Tuple("Web", "ListSkus", "2021-01-15"), + new Tuple("Web", "ListSourceControls", "2021-01-15"), + new Tuple("Web", "Provider", "2021-01-15"), + new Tuple("Web", "Recommendations", "2021-01-15"), + new Tuple("Web", "ResourceHealthMetadata", "2021-01-15"), + new Tuple("Web", "StaticSites", "2021-01-15"), + new Tuple("Web", "UpdatePublishingUser", "2021-01-15"), + new Tuple("Web", "UpdateSourceControl", "2021-01-15"), + new Tuple("Web", "Validate", "2021-01-15"), + new Tuple("Web", "VerifyHostingEnvironmentVnet", "2021-01-15"), + new Tuple("Web", "WebApps", "2021-01-15"), + new Tuple("WebSiteManagementClient", "Move", "2021-01-15"), + new Tuple("WebSiteManagementClient", "ValidateMove", "2021-01-15"), }.AsEnumerable(); } } // BEGIN: Code Generation Metadata Section public static readonly String AutoRestVersion = "v2"; public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-12 --csharp-sdks-folder=K:\\DotNet-SDK\\Apr-2021\\azure-sdk-for-net\\sdk"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=K:\\DotNet-SDK\\July-2021\\azure-sdk-for-net\\sdk"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "03a759c3b3c86cecc1c6030cc5e4d6940437706a"; + public static readonly String GithubCommidId = "9e9017617ee84fd46b0be3fe6a431e13bde18bd2"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs index 37159f875601..beae94064edb 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs @@ -2715,7 +2715,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2758,7 +2758,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBasicPublishingCredentialsPolicies", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBasicPublishingCredentialsPolicies", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -2859,7 +2859,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2872,7 +2872,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -24838,6 +24838,236 @@ internal WebAppsOperations(WebSiteManagementClient client) return _result; } + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSwiftVirtualNetworkConnectionWithCheck", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Gets all network features used by the app (or deployment slot, if /// specified). @@ -35580,7 +35810,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -35628,7 +35858,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBasicPublishingCredentialsPoliciesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBasicPublishingCredentialsPoliciesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -35730,7 +35960,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -35743,7 +35973,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -57744,12 +57974,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). + /// Integrates this Web App with a Virtual Network. This requires 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. /// /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. /// /// /// Name of the resource group to which the resource belongs. @@ -57757,9 +57992,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Properties of the Virtual Network connection. See example. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. /// /// /// Headers that will be added to request. @@ -57770,6 +58008,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -57779,7 +58020,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -57804,6 +58045,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -57825,9 +58070,10 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetworkSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -57848,7 +58094,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -57879,6 +58125,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -57899,7 +58151,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -57929,13 +58181,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -57944,12 +58214,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). + /// Deletes a Swift Virtual Network connection from an app (or deployment + /// slot). /// /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). + /// Description for Deletes a Swift Virtual Network connection from an app (or + /// deployment slot). /// /// /// Name of the resource group to which the resource belongs. @@ -57957,12 +58227,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The type of view. Only "summary" is supported at this time. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// network features for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the connection for the production slot. /// /// /// Headers that will be added to request. @@ -57973,9 +58240,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -57985,7 +58249,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListNetworkFeaturesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string view, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58010,10 +58274,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (view == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "view"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58035,17 +58295,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("view", view); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeaturesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetworkSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58060,7 +58318,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -58141,31 +58399,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -58174,12 +58414,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Integrates this Web App with a Virtual Network. This requires 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. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. /// /// /// Name of the resource group to which the resource belongs. @@ -58187,12 +58432,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// GUID of the operation. + /// + /// Properties of the Virtual Network connection. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. /// /// /// Headers that will be added to request. @@ -58215,7 +58460,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58240,9 +58485,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) + if (connectionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (slot == null) { @@ -58265,17 +58510,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSwiftVirtualNetworkConnectionWithCheckSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58290,7 +58534,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -58321,6 +58565,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -58341,7 +58591,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -58371,7 +58621,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -58384,25 +58634,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -58422,29 +58654,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site (To be deprecated). + /// Gets all network features used by the app (or deployment slot, if + /// specified). /// /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). + /// Description for Gets all network features used by the app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. + /// Name of the app. /// - /// - /// The maximum frame length in bytes (Optional). + /// + /// The type of view. Only "summary" is supported at this time. /// - /// - /// The Blob URL to store capture file. + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// network features for the production slot. /// /// /// Headers that will be added to request. @@ -58467,7 +58695,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListNetworkFeaturesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string view, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58492,6 +58720,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (view == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "view"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58513,33 +58745,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("view", view); tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeaturesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -58551,7 +58770,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -58602,7 +58821,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -58632,7 +58851,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -58645,7 +58864,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -58665,56 +58884,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Start capturing network packets for the site. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. + /// Name of the app. /// - /// - /// The name of the web app. + /// + /// GUID of the operation. /// /// - /// The name of the slot for this web app. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -58725,6 +58913,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -58734,7 +58925,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58759,6 +58950,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58780,15 +58975,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58803,7 +59000,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -58854,7 +59051,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -58884,13 +59081,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -58899,25 +59132,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Start capturing network packets for the site (To be deprecated). /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Start capturing network packets for the site (To be + /// deprecated). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// GUID of the operation. + /// The name of the web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// The name of the slot for this web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -58940,7 +59177,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTracesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58965,10 +59202,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58990,20 +59223,33 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("durationInSeconds", durationInSeconds); tracingParameters.Add("slot", slot); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -59015,7 +59261,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -59096,7 +59342,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -59109,7 +59355,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -59129,25 +59375,56 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Start capturing network packets for the site. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// GUID of the operation. + /// + /// The name of the slot for this web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stop ongoing capturing network packets for the site. + /// + /// + /// Description for Stop ongoing capturing network packets for the site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// The name of the slot for this web app. /// /// /// Headers that will be added to request. @@ -59158,9 +59435,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -59170,7 +59444,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59195,10 +59469,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -59220,17 +59490,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlotV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -59245,7 +59513,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -59296,7 +59564,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -59326,49 +59594,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -59418,7 +59650,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTracesSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTracesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59471,11 +59703,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlotV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); @@ -59607,11 +59839,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Generates a new publishing password for an app (or + /// Description for Gets a named operation for a network trace capturing (or /// deployment slot, if specified). /// /// @@ -59620,9 +59852,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// GUID of the operation. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API generate a - /// new publishing password for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -59633,6 +59868,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -59642,7 +59880,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59667,6 +59905,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -59688,15 +59930,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPasswordSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlotV2", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -59711,7 +59955,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -59762,7 +60006,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -59792,13 +60036,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -59807,26 +60087,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets perfmon counters for web app. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Gets perfmon counters for web app. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// + /// GUID of the operation. /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -59849,7 +60128,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPerfMonCountersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTracesSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59874,6 +60153,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -59895,16 +60178,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlotV2", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -59912,10 +60196,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -60004,7 +60284,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -60017,7 +60297,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -60037,10 +60317,210 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets web app's event logs. + /// Generates a new publishing password for an app (or deployment slot, if + /// specified). /// /// - /// Description for Gets web app's event logs. + /// Description for Generates a new publishing password for an app (or + /// deployment slot, if specified). + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API generate a + /// new publishing password for the production slot. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPasswordSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets perfmon counters for web app. + /// + /// + /// Description for Gets perfmon counters for web app. /// /// /// Name of the resource group to which the resource belongs. @@ -60052,6 +60532,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of web app slot. If not specified then will default to production /// slot. /// + /// + /// Return only usages/metrics specified in the filter. Filter conforms to + /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and + /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq + /// duration'[Hour|Minute|Day]'. + /// /// /// Headers that will be added to request. /// @@ -60073,7 +60559,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPerfMonCountersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60120,12 +60606,13 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlagSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -60135,6 +60622,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -60223,7 +60714,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -60236,7 +60727,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -60256,20 +60747,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the premier add-ons of an app. + /// Gets web app's event logs. /// /// - /// Description for Gets the premier add-ons of an app. + /// Description for Gets web app's event logs. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the premier add-ons for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -60292,7 +60783,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListPremierAddOnsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60340,11 +60831,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOnsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlagSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -60442,7 +60933,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -60455,7 +60946,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -60475,10 +60966,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named add-on of an app. + /// Gets the premier add-ons of an app. /// /// - /// Description for Gets a named add-on of an app. + /// Description for Gets the premier add-ons of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -60486,12 +60977,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Add-on name. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named add-on for the production slot. + /// the premier add-ons for the production slot. /// /// /// Headers that will be added to request. @@ -60514,7 +61002,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListPremierAddOnsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60539,10 +61027,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -60564,17 +61048,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOnsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -60703,10 +61185,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates a named add-on of an app. + /// Gets a named add-on of an app. /// /// - /// Description for Updates a named add-on of an app. + /// Description for Gets a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -60717,12 +61199,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Add-on name. /// - /// - /// A JSON representation of the edited premier add-on. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -60745,7 +61224,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> AddPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60774,14 +61253,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (premierAddOn != null) - { - premierAddOn.Validate(); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -60804,10 +61275,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -60829,7 +61299,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -60860,12 +61330,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -60949,10 +61413,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a premier add-on from an app. + /// Updates a named add-on of an app. /// /// - /// Description for Delete a premier add-on from an app. + /// Description for Updates a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -60963,9 +61427,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Add-on name. /// + /// + /// A JSON representation of the edited premier add-on. + /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the named add-on for the production slot. + /// update the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -60976,6 +61443,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -60985,7 +61455,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeletePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> AddPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61014,6 +61484,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } + if (premierAddOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); + } + if (premierAddOn != null) + { + premierAddOn.Validate(); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -61036,9 +61514,10 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -61060,7 +61539,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -61091,6 +61570,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(premierAddOn != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -61141,13 +61626,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -61156,10 +61659,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates a named add-on of an app. + /// Delete a premier add-on from an app. /// /// - /// Description for Updates a named add-on of an app. + /// Description for Delete a premier add-on from an app. /// /// /// Name of the resource group to which the resource belongs. @@ -61170,12 +61673,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Add-on name. /// - /// - /// A JSON representation of the edited premier add-on. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. + /// delete the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -61186,9 +61686,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -61198,7 +61695,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdatePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeletePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61227,10 +61724,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -61253,10 +61746,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -61278,7 +61770,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -61309,12 +61801,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -61365,31 +61851,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -61398,21 +61866,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Updates a named add-on of an app. /// /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Updates a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. + /// + /// + /// Add-on name. + /// + /// + /// A JSON representation of the edited premier add-on. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -61435,7 +61908,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateAccessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdatePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61460,6 +61933,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (premierAddOnName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); + } + if (premierAddOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -61481,15 +61962,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -61504,7 +61988,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -61535,6 +62019,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(premierAddOn != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -61585,7 +62075,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -61598,7 +62088,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -61618,11 +62108,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sets data around private site access enablement and authorized Virtual + /// Gets data around private site access enablement and authorized Virtual /// Networks that can access the site. /// /// - /// Description for Sets data around private site access enablement and + /// Description for Gets data around private site access enablement and /// authorized Virtual Networks that can access the site. /// /// @@ -61631,9 +62121,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The name of the web app. /// - /// - /// The information for the private access - /// /// /// The name of the slot for the web app. /// @@ -61658,7 +62145,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateAccessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61683,10 +62170,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (access == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "access"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -61708,10 +62191,9 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("access", access); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnetSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -61732,7 +62214,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -61763,12 +62245,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(access != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -61852,20 +62328,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the list of private endpoint connections associated with a site + /// Sets data around private site access enablement and authorized Virtual + /// Networks that can access the site. /// /// - /// Description for Gets the list of private endpoint connections associated - /// with a site + /// Description for Sets data around private site access enablement and + /// authorized Virtual Networks that can access the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// The name of the web app. + /// + /// + /// The information for the private access /// /// - /// Name of the site deployment slot. + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -61888,7 +62368,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61913,6 +62393,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (access == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "access"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -61934,13 +62418,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("access", access); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnetSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -61957,7 +62442,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -61988,6 +62473,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(access != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -62038,7 +62529,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -62051,7 +62542,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -62071,10 +62562,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a private endpoint connection + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Gets a private endpoint connection + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// Name of the resource group to which the resource belongs. @@ -62082,9 +62574,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the site. /// - /// - /// Name of the private endpoint connection. - /// /// /// Name of the site deployment slot. /// @@ -62109,7 +62598,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62134,10 +62623,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -62159,17 +62644,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -62265,7 +62748,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -62278,7 +62761,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -62298,41 +62781,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a private endpoint connection + /// Gets a private endpoint connection /// /// - /// Description for Deletes a private endpoint connection + /// Description for Gets a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -62341,35 +62793,10 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the site. /// /// + /// Name of the private endpoint connection. /// /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// + /// Name of the site deployment slot. /// /// /// Headers that will be added to request. @@ -62392,7 +62819,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateLinkResourcesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62417,6 +62844,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -62438,15 +62869,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResourcesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -62542,7 +62975,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -62555,7 +62988,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -62575,22 +63008,78 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Approves or rejects a private endpoint connection /// /// - /// 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. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -62613,7 +63102,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateLinkResourcesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62661,11 +63150,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResourcesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -62733,7 +63222,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -62763,7 +63252,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -62776,7 +63265,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -62796,12 +63285,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// 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. /// /// /// Name of the resource group to which the resource belongs. @@ -62809,9 +63298,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// PID. - /// /// /// Name of the deployment slot. If a slot is not specified, the API returns /// deployments for the production slot. @@ -62837,7 +63323,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62862,10 +63348,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -62887,17 +63369,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -62993,7 +63473,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -63006,7 +63486,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -63026,12 +63506,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// 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. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -63055,6 +63535,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -63064,7 +63547,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63117,7 +63600,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteProcessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -63139,7 +63622,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -63190,7 +63673,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -63220,13 +63703,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -63235,12 +63736,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. + /// Terminate a process by its ID for a web site, or a deployment slot, or + /// specific scaled-out instance in a web site. /// /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. + /// 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. /// /// /// Name of the resource group to which the resource belongs. @@ -63264,9 +63765,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -63276,7 +63774,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63329,11 +63827,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessDumpSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteProcessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); @@ -63351,7 +63849,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -63394,7 +63892,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -63402,7 +63900,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -63432,18 +63930,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -63452,12 +63945,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Get a memory dump of a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Get a memory dump of a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -63493,7 +63986,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63546,11 +64039,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessDumpSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); @@ -63611,7 +64104,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -63649,7 +64142,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -63659,20 +64152,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -63682,12 +64162,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -63698,9 +64178,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// PID. /// - /// - /// Module base address. - /// /// /// Name of the deployment slot. If a slot is not specified, the API returns /// deployments for the production slot. @@ -63726,7 +64203,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63755,10 +64232,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -63781,18 +64254,16 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessModuleSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -63888,7 +64359,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -63901,7 +64372,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -63921,12 +64392,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -63937,6 +64408,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// PID. /// + /// + /// Module base address. + /// /// /// Name of the deployment slot. If a slot is not specified, the API returns /// deployments for the production slot. @@ -63962,7 +64436,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63991,6 +64465,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } + if (baseAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -64013,16 +64491,18 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("processId", processId); + tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessModuleSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -64118,7 +64598,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -64131,7 +64611,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -64151,20 +64631,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get public certificates for an app or a deployment slot. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Get public certificates for an app or a deployment slot. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. /// /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -64187,7 +64672,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPublicCertificatesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64212,6 +64697,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -64233,15 +64722,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -64307,7 +64798,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -64337,7 +64828,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -64350,7 +64841,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -64370,12 +64861,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). + /// Get public certificates for an app or a deployment slot. /// /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). + /// Description for Get public certificates for an app or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -64384,11 +64873,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Public certificate name. + /// Name of the deployment slot. If a slot is not specified, the API gets + /// hostname bindings for the production slot. /// /// /// Headers that will be added to request. @@ -64411,7 +64897,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPublicCertificatesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64440,10 +64926,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -64462,17 +64944,15 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -64567,7 +65047,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -64580,7 +65060,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -64600,10 +65080,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a hostname binding for an app. + /// Get the named public certificate for an app (or deployment slot, if + /// specified). /// /// - /// Description for Creates a hostname binding for an app. + /// Description for Get the named public certificate for an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -64611,17 +65093,13 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of the deployment slot. If a slot is not specified, the API the named + /// binding for the production slot. + /// /// /// Public certificate name. /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// /// /// Headers that will be added to request. /// @@ -64643,7 +65121,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64668,18 +65146,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (publicCertificate == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (publicCertificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -64697,19 +65171,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("publicCertificate", publicCertificate); tracingParameters.Add("slot", slot); + tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -64723,7 +65196,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -64754,12 +65227,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(publicCertificate != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -64843,10 +65310,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a hostname binding for an app. + /// Creates a hostname binding for an app. /// /// - /// Description for Deletes a hostname binding for an app. + /// Description for Creates a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. @@ -64854,13 +65321,17 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// /// /// Public certificate name. /// + /// + /// Public certificate details. This is the JSON representation of a + /// PublicCertificate object. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// create a binding for the production slot. + /// /// /// Headers that will be added to request. /// @@ -64870,6 +65341,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -64879,7 +65353,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeletePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64904,14 +65378,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (publicCertificateName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); } + if (publicCertificate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -64929,18 +65407,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); tracingParameters.Add("publicCertificateName", publicCertificateName); + tracingParameters.Add("publicCertificate", publicCertificate); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -64954,7 +65433,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -64985,6 +65464,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(publicCertificate != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -65005,7 +65490,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -65035,13 +65520,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -65050,11 +65553,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the publishing profile for an app (or deployment slot, if specified). + /// Deletes a hostname binding for an app. /// /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). + /// Description for Deletes a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. @@ -65062,13 +65564,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing profile for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. + /// + /// + /// Public certificate name. /// /// /// Headers that will be added to request. @@ -65079,9 +65580,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -65091,7 +65589,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeletePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65116,14 +65614,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publishingProfileOptions == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (publicCertificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -65141,17 +65639,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); tracingParameters.Add("slot", slot); + tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecretsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -65165,7 +65664,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -65196,12 +65695,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(publishingProfileOptions != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -65214,7 +65707,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -65222,7 +65715,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -65252,18 +65745,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -65272,12 +65760,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. + /// Gets the publishing profile for an app (or deployment slot, if specified). /// /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. + /// Description for Gets the publishing profile for an app (or deployment slot, + /// if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -65285,9 +65772,13 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Specifies publishingProfileOptions for publishing profile. For example, use + /// {"format": "FileZilla3"} to get a FileZilla publishing profile. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API resets - /// configuration settings for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the publishing profile for the production slot. /// /// /// Headers that will be added to request. @@ -65298,6 +65789,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -65307,7 +65801,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ResetSlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65332,6 +65826,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (publishingProfileOptions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -65353,13 +65851,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetSlotConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecretsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -65407,6 +65906,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(publishingProfileOptions != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -65419,7 +65924,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -65457,13 +65962,18 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -65472,10 +65982,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restarts an app (or deployment slot, if specified). + /// Resets the configuration settings of the current slot if they were + /// previously modified by calling the API with POST. /// /// - /// Description for Restarts an app (or deployment slot, if specified). + /// Description for Resets the configuration settings of the current slot if + /// they were previously modified by calling the API with POST. /// /// /// Name of the resource group to which the resource belongs. @@ -65484,16 +65996,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restart the production slot. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). + /// Name of the deployment slot. If a slot is not specified, the API resets + /// configuration settings for the production slot. /// /// /// Headers that will be added to request. @@ -65513,7 +66017,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RestartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ResetSlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65560,27 +66064,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("softRestart", softRestart); - tracingParameters.Add("synchronous", synchronous); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RestartSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ResetSlotConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (softRestart != null) - { - _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); - } - if (synchronous != null) - { - _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, Client.SerializationSettings).Trim('"')))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -65688,10 +66182,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. + /// Restarts an app (or deployment slot, if specified). /// /// - /// Description for Restores an app from a backup blob in Azure Storage. + /// Description for Restarts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -65699,107 +66193,17 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Information on restore request . - /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. + /// restart the production slot. /// - /// - /// Site name. + /// + /// Specify true to apply the configuration settings and restarts the app only + /// if necessary. By default, the API always restarts and reprovisions the app. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// + /// Specify true to block until the app is restarted. By default, it is set to + /// false, and the API responds immediately (asynchronous). /// /// /// Headers that will be added to request. @@ -65810,9 +66214,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -65822,7 +66223,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteExtensionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RestartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65869,17 +66270,27 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); + tracingParameters.Add("softRestart", softRestart); + tracingParameters.Add("synchronous", synchronous); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RestartSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (softRestart != null) + { + _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); + } + if (synchronous != null) + { + _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, Client.SerializationSettings).Trim('"')))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -65891,7 +66302,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -65942,7 +66353,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -65972,31 +66383,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -66005,21 +66398,114 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get site extension information by its ID for a web site, or a deployment + /// Restores an app from a backup blob in Azure Storage. + /// + /// + /// Description for Restores an app from a backup blob in Azure Storage. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Information on restore request . + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// restore a backup of the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a deleted web app to this web app. + /// + /// + /// Description for Restores a deleted web app to this web app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Deleted web app restore information. + /// + /// + /// Name of web app slot. If not specified then will default to production /// slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a web app from a snapshot. /// /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. + /// Description for Restores a web app from a snapshot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of web app. /// - /// - /// Site extension name. + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get list of siteextensions for a web site, or a deployment slot. + /// + /// + /// Description for Get list of siteextensions for a web site, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. /// /// /// Name of the deployment slot. If a slot is not specified, the API uses the @@ -66046,7 +66532,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteExtensionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66071,10 +66557,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -66096,17 +66578,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtensionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -66202,7 +66682,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -66215,7 +66695,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -66235,10 +66715,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. + /// Get site extension information by its ID for a web site, or a deployment + /// slot. /// /// - /// Description for Install site extension on a web site, or a deployment slot. + /// Description for Get site extension information by its ID for a web site, or + /// a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -66254,39 +66736,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// production slot. /// /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> InstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginInstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// /// Headers that will be added to request. /// /// @@ -66295,6 +66744,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -66304,7 +66756,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66357,7 +66809,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtensionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtensionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -66379,7 +66831,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -66430,7 +66882,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -66460,13 +66912,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -66475,24 +66945,56 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the difference in configuration settings between two web app slots. + /// Install site extension on a web site, or a deployment slot. /// /// - /// Description for Get the difference in configuration settings between two - /// web app slots. + /// Description for Install site extension on a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// Site extension name. /// /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> InstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginInstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Remove a site extension from a web site, or a deployment slot. + /// + /// + /// Description for Remove a site extension from a web site, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Site extension name. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -66503,9 +67005,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -66515,7 +67014,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotDifferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66540,13 +67039,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) + if (siteExtensionId == null) { - slotSwapEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (slot == null) { @@ -66569,16 +67064,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtensionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -66593,7 +67089,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -66624,12 +67120,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -66650,7 +67140,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -66680,31 +67170,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -66713,10 +67185,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Get the difference in configuration settings between two web app slots. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Get the difference in configuration settings between two + /// web app slots. /// /// /// Name of the resource group to which the resource belongs. @@ -66732,34 +67205,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// used as the source slot. /// /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task SwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// /// Headers that will be added to request. /// /// @@ -66780,7 +67225,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotDifferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66805,6 +67250,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (slotSwapEntity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -66826,13 +67279,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -66849,7 +67303,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -66880,6 +67334,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -66930,7 +67390,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -66943,7 +67403,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -66963,11 +67423,42 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Returns all Snapshots to the user from DRSecondary endpoint. + /// Swaps two deployment slots of an app. /// /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. + /// Description for Swaps two deployment slots of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// JSON object that contains the target slot name. See example. + /// + /// + /// Name of the source slot. If a slot is not specified, the production slot is + /// used as the source slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task SwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns all Snapshots to the user. + /// + /// + /// Description for Returns all Snapshots to the user. /// /// /// Name of the resource group to which the resource belongs. @@ -66999,7 +67490,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSnapshotsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67047,11 +67538,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondarySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -67182,20 +67673,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the source control configuration of an app. + /// Returns all Snapshots to the user from DRSecondary endpoint. /// /// - /// Description for Gets the source control configuration of an app. + /// Description for Returns all Snapshots to the user from DRSecondary + /// endpoint. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Website Name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the source control configuration for the production slot. + /// Website Slot. /// /// /// Headers that will be added to request. @@ -67218,7 +67709,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67266,11 +67757,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondarySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -67338,7 +67829,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -67368,7 +67859,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -67381,43 +67872,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -67437,42 +67892,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the source control configuration of an app. + /// Gets the source control configuration of an app. /// /// - /// Description for Deletes the source control configuration of an app. + /// Description for Gets the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -67481,10 +67904,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the source control configuration for the production slot. - /// - /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the source control configuration for the production slot. /// /// /// Headers that will be added to request. @@ -67495,6 +67916,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -67504,7 +67928,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67551,9 +67975,8 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("additionalFlags", additionalFlags); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -67563,10 +67986,6 @@ internal WebAppsOperations(WebSiteManagementClient client) _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (additionalFlags != null) - { - _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -67578,7 +67997,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -67629,7 +68048,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -67659,13 +68078,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -67693,6 +68166,37 @@ internal WebAppsOperations(WebSiteManagementClient client) /// update the source control configuration for the production slot. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the source control configuration of an app. + /// + /// + /// Description for Deletes the source control configuration of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the source control configuration for the production slot. + /// + /// + /// + /// /// Headers that will be added to request. /// /// @@ -67701,9 +68205,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -67713,7 +68214,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67738,10 +68239,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -67763,10 +68260,10 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("slot", slot); + tracingParameters.Add("additionalFlags", additionalFlags); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -67776,6 +68273,10 @@ internal WebAppsOperations(WebSiteManagementClient client) _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (additionalFlags != null) + { + _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -67787,7 +68288,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -67818,12 +68319,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -67844,7 +68339,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -67874,67 +68369,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -67943,10 +68384,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Starts an app (or deployment slot, if specified). + /// Updates the source control configuration of an app. /// /// - /// Description for Starts an app (or deployment slot, if specified). + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -67954,9 +68395,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// JSON representation of a SiteSourceControl object. See example. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will start - /// the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the source control configuration for the production slot. /// /// /// Headers that will be added to request. @@ -67967,6 +68411,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -67976,7 +68423,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68001,6 +68448,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteSourceControl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -68022,13 +68473,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -68045,7 +68497,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -68076,6 +68528,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -68096,7 +68554,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -68126,13 +68584,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -68141,47 +68653,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stops an app (or deployment slot, if specified). + /// Starts an app (or deployment slot, if specified). /// /// - /// Description for Stops an app (or deployment slot, if specified). + /// Description for Starts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -68190,7 +68665,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will stop + /// Name of the deployment slot. If a slot is not specified, the API will start /// the production slot. /// /// @@ -68211,7 +68686,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68259,11 +68734,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -68376,10 +68851,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Stop ongoing capturing network packets for the site. + /// Start capturing network packets for the site. /// /// - /// Description for Stop ongoing capturing network packets for the site. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. @@ -68390,6 +68865,44 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The name of the slot for this web app. /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> StartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginStartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops an app (or deployment slot, if specified). + /// + /// + /// Description for Stops an app (or deployment slot, if specified). + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will stop + /// the production slot. + /// /// /// Headers that will be added to request. /// @@ -68408,7 +68921,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68456,11 +68969,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -68528,7 +69041,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -68573,20 +69086,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sync web app repository. + /// Stop ongoing capturing network packets for the site. /// /// - /// Description for Sync web app repository. + /// Description for Stop ongoing capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// The name of the web app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// The name of the slot for this web app. /// /// /// Headers that will be added to request. @@ -68606,7 +69118,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncRepositorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68654,11 +69166,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncRepositorySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -68726,7 +69238,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -68771,19 +69283,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Syncs function trigger metadata to the management database + /// Sync web app repository. /// /// - /// Description for Syncs function trigger metadata to the management database + /// Description for Sync web app repository. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// /// - /// Name of the deployment slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -68803,7 +69316,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncRepositorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68851,11 +69364,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncRepositorySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -68923,7 +69436,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -68968,20 +69481,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List triggered web jobs for an app, or a deployment slot. + /// Syncs function trigger metadata to the management database /// /// - /// Description for List triggered web jobs for an app, or a deployment slot. + /// Description for Syncs function trigger metadata to the management database /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -68992,9 +69504,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -69004,7 +69513,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69052,11 +69561,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -69073,7 +69582,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -69124,7 +69633,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -69154,31 +69663,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -69187,11 +69678,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. + /// List triggered web jobs for an app, or a deployment slot. /// /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. + /// Description for List triggered web jobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -69199,12 +69689,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of Web Job. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -69227,7 +69714,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69252,10 +69739,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -69277,17 +69760,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -69353,7 +69834,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -69383,7 +69864,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -69396,7 +69877,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -69416,10 +69897,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. + /// Gets a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for Delete a triggered web job by its ID for an app, or a + /// Description for Gets a triggered web job by its ID for an app, or a /// deployment slot. /// /// @@ -69432,8 +69913,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of Web Job. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes - /// web job for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -69444,6 +69925,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -69453,7 +69937,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69506,7 +69990,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -69528,7 +70012,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -69579,7 +70063,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -69609,13 +70093,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -69624,10 +70126,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List a triggered web job's history for an app, or a deployment slot. + /// Delete a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for List a triggered web job's history for an app, or a + /// Description for Delete a triggered web job by its ID for an app, or a /// deployment slot. /// /// @@ -69640,8 +70142,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of Web Job. /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes + /// web job for the production slot. /// /// /// Headers that will be added to request. @@ -69652,9 +70154,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -69664,7 +70163,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69717,11 +70216,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistorySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); @@ -69739,7 +70238,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -69790,7 +70289,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -69820,31 +70319,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -69853,12 +70334,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. + /// List a triggered web job's history for an app, or a deployment slot. /// /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. + /// Description for List a triggered web job's history for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -69869,9 +70349,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of Web Job. /// - /// - /// History ID. - /// /// /// Name of the deployment slot. If a slot is not specified, the API uses the /// production slot. @@ -69897,7 +70374,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69926,10 +70403,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -69952,18 +70425,16 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistorySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistorySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -70059,7 +70530,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -70072,7 +70543,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -70092,10 +70563,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Run a triggered web job for an app, or a deployment slot. + /// Gets a triggered web job's history by its ID for an app, , or a deployment + /// slot. /// /// - /// Description for Run a triggered web job for an app, or a deployment slot. + /// Description for Gets a triggered web job's history by its ID for an app, , + /// or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -70106,6 +70579,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of Web Job. /// + /// + /// History ID. + /// /// /// Name of the deployment slot. If a slot is not specified, the API uses the /// production slot. @@ -70119,6 +70595,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -70128,7 +70607,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RunTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70157,6 +70636,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -70179,16 +70662,18 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistorySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -70203,7 +70688,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -70284,13 +70769,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -70299,28 +70802,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). + /// Run a triggered web job for an app, or a deployment slot. /// /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). + /// Description for Run a triggered web job for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// quota information of the production slot. + /// + /// Name of Web Job. /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -70331,9 +70829,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -70343,7 +70838,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListUsagesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RunTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70368,6 +70863,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -70389,16 +70888,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsagesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -70406,10 +70906,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -70417,7 +70913,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -70468,7 +70964,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -70498,31 +70994,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -70531,11 +71009,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the virtual networks the app (or deployment slot) is connected to. + /// Gets the quota usage information of an app (or deployment slot, if + /// specified). /// /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. + /// Description for Gets the quota usage information of an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -70545,7 +71024,13 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// virtual network connections for the production slot. + /// quota information of the production slot. + /// + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and + /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and + /// timeGrain eq duration'[Hour|Minute|Day]'. /// /// /// Headers that will be added to request. @@ -70568,7 +71053,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListUsagesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70615,12 +71100,13 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnectionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListUsagesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -70630,6 +71116,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -70718,7 +71208,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -70731,7 +71221,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -70751,12 +71241,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. + /// Gets the virtual networks the app (or deployment slot) is connected to. /// /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. + /// Description for Gets the virtual networks the app (or deployment slot) is + /// connected to. /// /// /// Name of the resource group to which the resource belongs. @@ -70764,12 +71253,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the virtual network. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named virtual network for the production slot. + /// virtual network connections for the production slot. /// /// /// Headers that will be added to request. @@ -70792,7 +71278,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70817,10 +71303,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -70842,17 +71324,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnectionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -70948,7 +71428,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -70961,7 +71441,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -70981,12 +71461,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Gets a virtual network the app (or deployment slot) is connected to by + /// name. /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Gets a virtual network the app (or deployment slot) is + /// connected to by name. /// /// /// Name of the resource group to which the resource belongs. @@ -70995,14 +71475,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. + /// Name of the virtual network. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the named virtual network for the production slot. /// /// /// Headers that will be added to request. @@ -71025,7 +71502,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71054,10 +71531,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -71080,10 +71553,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -71105,7 +71577,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -71136,12 +71608,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -71225,12 +71691,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -71239,11 +71705,14 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the virtual network. + /// Name of an existing Virtual Network. + /// + /// + /// Properties of the Virtual Network connection. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. /// /// /// Headers that will be added to request. @@ -71254,6 +71723,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -71263,7 +71735,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71292,6 +71764,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -71314,9 +71790,10 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -71338,7 +71815,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -71369,6 +71846,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -71389,7 +71872,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -71419,13 +71902,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -71434,12 +71935,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Deletes a connection from an app (or deployment slot to a named virtual + /// network. /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Deletes a connection from an app (or deployment slot to a + /// named virtual network. /// /// /// Name of the resource group to which the resource belongs. @@ -71448,14 +71949,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. + /// Name of the virtual network. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the connection for the production slot. /// /// /// Headers that will be added to request. @@ -71466,9 +71964,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -71478,7 +71973,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71507,10 +72002,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -71533,10 +72024,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -71558,7 +72048,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -71589,12 +72079,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -71615,7 +72099,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -71645,31 +72129,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -71678,10 +72144,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets an app's Virtual Network gateway. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Gets an app's Virtual Network gateway. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -71690,14 +72158,14 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the Virtual Network. + /// Name of an existing Virtual Network. /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// Properties of the Virtual Network connection. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. /// /// /// Headers that will be added to request. @@ -71720,7 +72188,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71749,9 +72217,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (gatewayName == null) + if (connectionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (slot == null) { @@ -71775,18 +72243,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGatewaySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -71801,7 +72268,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -71832,6 +72299,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -71852,7 +72325,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -71882,7 +72355,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -71895,7 +72368,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -71915,11 +72388,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + /// Gets an app's Virtual Network gateway. /// /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). + /// Description for Gets an app's Virtual Network gateway. /// /// /// Name of the resource group to which the resource belongs. @@ -71933,12 +72405,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the gateway. Currently, the only supported string is "primary". /// - /// - /// The properties to update this gateway with. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. + /// Name of the deployment slot. If a slot is not specified, the API will get a + /// gateway for the production slot's Virtual Network. /// /// /// Headers that will be added to request. @@ -71961,7 +72430,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71994,14 +72463,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -72025,10 +72486,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGatewaySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGatewaySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -72051,7 +72511,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -72082,12 +72542,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -72108,7 +72562,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -72217,7 +72671,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72254,6 +72708,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } + if (connectionEnvelope != null) + { + connectionEnvelope.Validate(); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -72280,7 +72738,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGatewaySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGatewaySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -72303,7 +72761,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -72423,20 +72881,30 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List webjobs for an app, or a deployment slot. + /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). /// /// - /// Description for List webjobs for an app, or a deployment slot. + /// Description for Adds a gateway to a connected Virtual Network (PUT) or + /// updates it (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. + /// + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// The properties to update this gateway with. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update a gateway for the production slot's Virtual Network. /// /// /// Headers that will be added to request. @@ -72459,7 +72927,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72484,6 +72952,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -72505,15 +72985,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebJobsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGatewaySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -72528,7 +73013,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -72559,6 +73044,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -72609,7 +73100,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -72622,7 +73113,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -72642,10 +73133,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get webjob information for an app, or a deployment slot. + /// List webjobs for an app, or a deployment slot. /// /// - /// Description for Get webjob information for an app, or a deployment slot. + /// Description for List webjobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -72653,9 +73144,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of the web job. - /// /// /// Name of the deployment slot. If a slot is not specified, the API returns /// deployments for the production slot. @@ -72681,7 +73169,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72706,10 +73194,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -72731,17 +73215,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWebJobsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -72837,7 +73319,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -72850,7 +73332,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -72870,20 +73352,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the difference in configuration settings between two web app slots. + /// Get webjob information for an app, or a deployment slot. /// /// - /// Description for Get the difference in configuration settings between two - /// web app slots. + /// Description for Get webjob information for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// Name of the web job. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -72906,7 +73391,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotDifferencesFromProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72931,13 +73416,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } - if (slotSwapEntity != null) + if (slot == null) { - slotSwapEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -72956,15 +73441,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesFromProduction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -72978,7 +73466,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -73009,12 +73497,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -73065,7 +73547,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -73078,7 +73560,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -73098,10 +73580,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Get the difference in configuration settings between two web app slots. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Get the difference in configuration settings between two + /// web app slots. /// /// /// Name of the resource group to which the resource belongs. @@ -73113,31 +73596,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// JSON object that contains the target slot name. See example. /// /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task SwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// /// Headers that will be added to request. /// /// @@ -73158,7 +73616,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotDifferencesFromProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73183,6 +73641,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (slotSwapEntity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -73200,12 +73666,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshots", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesFromProduction", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -73221,7 +73688,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -73252,6 +73719,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -73302,7 +73775,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -73315,7 +73788,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -73335,11 +73808,38 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Returns all Snapshots to the user from DRSecondary endpoint. + /// Swaps two deployment slots of an app. /// /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. + /// Description for Swaps two deployment slots of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// JSON object that contains the target slot name. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task SwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns all Snapshots to the user. + /// + /// + /// Description for Returns all Snapshots to the user. /// /// /// Name of the resource group to which the resource belongs. @@ -73368,7 +73868,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSnapshotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73411,11 +73911,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondary", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshots", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -73545,16 +74045,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the source control configuration of an app. + /// Returns all Snapshots to the user from DRSecondary endpoint. /// /// - /// Description for Gets the source control configuration of an app. + /// Description for Returns all Snapshots to the user from DRSecondary + /// endpoint. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Website Name. /// /// /// Headers that will be added to request. @@ -73577,7 +74078,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73620,11 +74121,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondary", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -73691,7 +74192,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -73721,7 +74222,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -73734,43 +74235,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -73790,38 +74255,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the source control configuration of an app. + /// Gets the source control configuration of an app. /// /// - /// Description for Deletes the source control configuration of an app. + /// Description for Gets the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -73829,8 +74266,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// /// /// Headers that will be added to request. /// @@ -73840,6 +74275,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -73849,7 +74287,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73891,9 +74329,8 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("additionalFlags", additionalFlags); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -73902,10 +74339,6 @@ internal WebAppsOperations(WebSiteManagementClient client) _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (additionalFlags != null) - { - _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -73917,7 +74350,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -73968,7 +74401,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -73998,13 +74431,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -74028,6 +74515,33 @@ internal WebAppsOperations(WebSiteManagementClient client) /// JSON representation of a SiteSourceControl object. See example. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the source control configuration of an app. + /// + /// + /// Description for Deletes the source control configuration of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + /// /// Headers that will be added to request. /// /// @@ -74036,9 +74550,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -74048,7 +74559,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74073,10 +74584,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -74094,9 +74601,9 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("additionalFlags", additionalFlags); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControl", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -74105,6 +74612,10 @@ internal WebAppsOperations(WebSiteManagementClient client) _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (additionalFlags != null) + { + _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -74116,7 +74627,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -74147,12 +74658,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -74173,7 +74678,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -74203,67 +74708,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -74272,10 +74723,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Starts an app (or deployment slot, if specified). + /// Updates the source control configuration of an app. /// /// - /// Description for Starts an app (or deployment slot, if specified). + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -74283,6 +74734,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// JSON representation of a SiteSourceControl object. See example. + /// /// /// Headers that will be added to request. /// @@ -74292,6 +74746,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -74301,7 +74758,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StartWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74326,6 +74783,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteSourceControl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -74343,12 +74804,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Start", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -74364,7 +74826,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -74395,6 +74857,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -74415,7 +74883,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -74445,13 +74913,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -74460,44 +74982,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stops an app (or deployment slot, if specified). + /// Starts an app (or deployment slot, if specified). /// /// - /// Description for Stops an app (or deployment slot, if specified). + /// Description for Starts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -74523,7 +75011,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StartWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74566,11 +75054,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Stop", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Start", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -74682,10 +75170,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Stop ongoing capturing network packets for the site. + /// Start capturing network packets for the site. /// /// - /// Description for Stop ongoing capturing network packets for the site. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. @@ -74693,6 +75181,40 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The name of the web app. /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> StartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginStartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops an app (or deployment slot, if specified). + /// + /// + /// Description for Stops an app (or deployment slot, if specified). + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// /// /// Headers that will be added to request. /// @@ -74711,7 +75233,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74754,11 +75276,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTrace", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Stop", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -74825,7 +75347,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -74870,16 +75392,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sync web app repository. + /// Stop ongoing capturing network packets for the site. /// /// - /// Description for Sync web app repository. + /// Description for Stop ongoing capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// The name of the web app. /// /// /// Headers that will be added to request. @@ -74899,7 +75421,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncRepositoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74942,11 +75464,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncRepository", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTrace", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -75013,7 +75535,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -75058,16 +75580,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Syncs function trigger metadata to the management database + /// Sync web app repository. /// /// - /// Description for Syncs function trigger metadata to the management database + /// Description for Sync web app repository. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -75087,7 +75609,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncRepositoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75130,11 +75652,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggers", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncRepository", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -75201,7 +75723,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -75246,16 +75768,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List triggered web jobs for an app, or a deployment slot. + /// Syncs function trigger metadata to the management database /// /// - /// Description for List triggered web jobs for an app, or a deployment slot. + /// Description for Syncs function trigger metadata to the management database /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -75266,9 +75788,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -75278,7 +75797,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75321,11 +75840,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobs", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggers", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -75341,7 +75860,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -75392,7 +75911,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -75422,31 +75941,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -75455,11 +75956,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. + /// List triggered web jobs for an app, or a deployment slot. /// /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. + /// Description for List triggered web jobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -75467,9 +75967,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of Web Job. - /// /// /// Headers that will be added to request. /// @@ -75491,7 +75988,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75516,10 +76013,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -75537,16 +76030,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobs", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -75611,7 +76102,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -75641,7 +76132,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -75654,7 +76145,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -75674,10 +76165,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. + /// Gets a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for Delete a triggered web job by its ID for an app, or a + /// Description for Gets a triggered web job by its ID for an app, or a /// deployment slot. /// /// @@ -75698,6 +76189,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -75707,7 +76201,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75755,7 +76249,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -75776,7 +76270,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -75827,7 +76321,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -75857,13 +76351,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -75872,10 +76384,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List a triggered web job's history for an app, or a deployment slot. + /// Delete a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for List a triggered web job's history for an app, or a + /// Description for Delete a triggered web job by its ID for an app, or a /// deployment slot. /// /// @@ -75896,9 +76408,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -75908,7 +76417,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75956,11 +76465,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistory", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); @@ -75977,7 +76486,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -76028,7 +76537,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -76058,31 +76567,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -76091,12 +76582,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. + /// List a triggered web job's history for an app, or a deployment slot. /// /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. + /// Description for List a triggered web job's history for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -76107,9 +76597,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of Web Job. /// - /// - /// History ID. - /// /// /// Headers that will be added to request. /// @@ -76131,7 +76618,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76160,10 +76647,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -76182,17 +76665,15 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistory", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistory", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -76287,7 +76768,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -76300,7 +76781,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -76320,10 +76801,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Run a triggered web job for an app, or a deployment slot. + /// Gets a triggered web job's history by its ID for an app, , or a deployment + /// slot. /// /// - /// Description for Run a triggered web job for an app, or a deployment slot. + /// Description for Gets a triggered web job's history by its ID for an app, , + /// or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -76334,6 +76817,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of Web Job. /// + /// + /// History ID. + /// /// /// Headers that will be added to request. /// @@ -76343,6 +76829,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -76352,7 +76841,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RunTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76381,6 +76870,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -76399,15 +76892,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistory", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -76421,7 +76916,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -76502,13 +76997,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -76517,24 +77030,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). + /// Run a triggered web job for an app, or a deployment slot. /// /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). + /// Description for Run a triggered web job for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -76545,9 +77053,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -76557,7 +77062,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RunTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76582,6 +77087,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -76599,25 +77108,22 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("filter", filter); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsages", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -76625,7 +77131,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -76676,7 +77182,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -76706,31 +77212,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -76739,11 +77227,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the virtual networks the app (or deployment slot) is connected to. + /// Gets the quota usage information of an app (or deployment slot, if + /// specified). /// /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. + /// Description for Gets the quota usage information of an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -76751,6 +77240,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and + /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and + /// timeGrain eq duration'[Hour|Minute|Day]'. + /// /// /// Headers that will be added to request. /// @@ -76772,7 +77267,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76814,12 +77309,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnections", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListUsages", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -76828,6 +77324,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -76916,7 +77416,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -76929,7 +77429,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -76949,12 +77449,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. + /// Gets the virtual networks the app (or deployment slot) is connected to. /// /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. + /// Description for Gets the virtual networks the app (or deployment slot) is + /// connected to. /// /// /// Name of the resource group to which the resource belongs. @@ -76962,9 +77461,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the virtual network. - /// /// /// Headers that will be added to request. /// @@ -76986,7 +77482,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77011,10 +77507,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77032,16 +77524,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnections", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -77136,7 +77626,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -77149,7 +77639,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -77169,12 +77659,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Gets a virtual network the app (or deployment slot) is connected to by + /// name. /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Gets a virtual network the app (or deployment slot) is + /// connected to by name. /// /// /// Name of the resource group to which the resource belongs. @@ -77183,10 +77673,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. + /// Name of the virtual network. /// /// /// Headers that will be added to request. @@ -77209,7 +77696,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77238,10 +77725,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77260,9 +77743,8 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -77283,7 +77765,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -77314,12 +77796,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -77403,12 +77879,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -77417,7 +77893,10 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the virtual network. + /// Name of an existing Virtual Network. + /// + /// + /// Properties of the Virtual Network connection. See example. /// /// /// Headers that will be added to request. @@ -77428,6 +77907,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -77437,7 +77919,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77466,6 +77948,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77484,8 +77970,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -77506,7 +77993,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -77537,6 +78024,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -77557,7 +78050,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -77587,13 +78080,31 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -77602,12 +78113,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Deletes a connection from an app (or deployment slot to a named virtual + /// network. /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Deletes a connection from an app (or deployment slot to a + /// named virtual network. /// /// /// Name of the resource group to which the resource belongs. @@ -77616,10 +78127,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. + /// Name of the virtual network. /// /// /// Headers that will be added to request. @@ -77630,9 +78138,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -77642,7 +78147,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77671,10 +78176,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77693,9 +78194,8 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -77716,7 +78216,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -77747,12 +78247,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -77773,7 +78267,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -77803,31 +78297,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -77836,10 +78312,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets an app's Virtual Network gateway. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Gets an app's Virtual Network gateway. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -77848,10 +78326,10 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the Virtual Network. + /// Name of an existing Virtual Network. /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// Properties of the Virtual Network connection. See example. /// /// /// Headers that will be added to request. @@ -77874,7 +78352,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77903,9 +78381,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (gatewayName == null) + if (connectionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -77925,17 +78403,16 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGateway", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -77949,7 +78426,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -77980,6 +78457,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -78000,7 +78483,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -78030,7 +78513,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -78043,7 +78526,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -78063,11 +78546,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + /// Gets an app's Virtual Network gateway. /// /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). + /// Description for Gets an app's Virtual Network gateway. /// /// /// Name of the resource group to which the resource belongs. @@ -78081,9 +78563,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the gateway. Currently, the only supported string is "primary". /// - /// - /// The properties to update this gateway with. - /// /// /// Headers that will be added to request. /// @@ -78105,7 +78584,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78138,14 +78617,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -78165,9 +78636,8 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGateway", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGateway", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -78189,7 +78659,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -78220,12 +78690,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -78246,7 +78710,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -78351,7 +78815,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78388,6 +78852,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } + if (connectionEnvelope != null) + { + connectionEnvelope.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -78409,7 +78877,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGateway", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGateway", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -78431,7 +78899,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -78551,16 +79019,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List webjobs for an app, or a deployment slot. + /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). /// /// - /// Description for List webjobs for an app, or a deployment slot. + /// Description for Adds a gateway to a connected Virtual Network (PUT) or + /// updates it (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. + /// + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// The properties to update this gateway with. /// /// /// Headers that will be added to request. @@ -78583,7 +79061,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78608,6 +79086,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -78625,14 +79115,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebJobs", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGateway", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78646,7 +79141,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -78677,6 +79172,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -78727,7 +79228,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -78740,7 +79241,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -78760,10 +79261,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get webjob information for an app, or a deployment slot. + /// List webjobs for an app, or a deployment slot. /// /// - /// Description for Get webjob information for an app, or a deployment slot. + /// Description for List webjobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -78771,9 +79272,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of the web job. - /// /// /// Headers that will be added to request. /// @@ -78795,7 +79293,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78820,10 +79318,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -78841,16 +79335,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWebJobs", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78945,7 +79437,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -78958,7 +79450,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -78978,22 +79470,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. + /// Get webjob information for an app, or a deployment slot. /// /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. + /// Description for Get webjob information for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. + /// Site name. /// - /// - /// A JSON representation of the app properties. See example. + /// + /// Name of the web job. /// /// /// Headers that will be added to request. @@ -79016,7 +79505,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79041,13 +79530,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (siteEnvelope != null) + if (webJobName == null) { - siteEnvelope.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -79066,15 +79551,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79088,7 +79574,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -79119,12 +79605,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -79145,7 +79625,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79175,7 +79655,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -79188,25 +79668,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -79226,24 +79688,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). + /// Creates a new web, mobile, or API app in an existing resource group, or + /// updates an existing app. /// /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). + /// Description for Creates a new web, mobile, or API app in an existing + /// resource group, or updates an existing app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// ID of the backup. + /// Unique name of the app to create or update. To create or update a + /// deployment slot, use the {slot} parameter. /// - /// - /// Information on restore request . + /// + /// A JSON representation of the app properties. See example. /// /// /// Headers that will be added to request. @@ -79254,6 +79714,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -79263,7 +79726,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79288,17 +79751,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) + if (siteEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); } - if (request != null) + if (siteEnvelope != null) { - request.Validate(); + siteEnvelope.Validate(); } if (Client.SubscriptionId == null) { @@ -79317,17 +79776,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); + tracingParameters.Add("siteEnvelope", siteEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestore", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79341,7 +79798,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -79372,9 +79829,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(request != null) + if(siteEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -79428,13 +79885,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -79443,10 +79936,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an app. + /// Restores a specific backup to another app (or deployment slot, if + /// specified). /// /// - /// Description for Gets the Git/FTP publishing credentials of an app. + /// Description for Restores a specific backup to another app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -79454,6 +79949,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// ID of the backup. + /// + /// + /// Information on restore request . + /// /// /// Headers that will be added to request. /// @@ -79463,9 +79964,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -79475,7 +79973,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79500,6 +79998,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (backupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -79517,14 +80027,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("backupId", backupId); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentials", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestore", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79569,6 +80082,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -79589,7 +80108,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79619,31 +80138,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -79652,19 +80153,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Gets the Git/FTP publishing credentials of an app. /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Gets the Git/FTP publishing credentials of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation + /// Name of the app. /// /// /// Headers that will be added to request. @@ -79687,7 +80185,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79712,10 +80210,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -79733,13 +80227,12 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentials", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -79755,7 +80248,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -79786,12 +80279,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -79812,7 +80299,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79842,7 +80329,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -79850,12 +80337,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -79875,22 +80362,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create function for web site, or a deployment slot. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Create function for web site, or a deployment slot. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Function name. + /// Name of web app. /// - /// - /// Function details. + /// + /// Details of MSDeploy operation /// /// /// Headers that will be added to request. @@ -79913,7 +80397,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79938,13 +80422,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (functionEnvelope == null) + if (mSDeploy == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); } if (Client.SubscriptionId == null) { @@ -79963,17 +80443,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("functionEnvelope", functionEnvelope); + tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateFunction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -80018,9 +80496,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(functionEnvelope != null) + if(mSDeploy != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -80044,7 +80522,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201) + if ((int)_statusCode != 201 && (int)_statusCode != 409) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -80074,7 +80552,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -80087,7 +80565,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -80107,22 +80585,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Create function for web site, or a deployment slot. /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Create function for web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Site name. /// - /// - /// ID of web app instance. + /// + /// Function name. /// - /// - /// Details of MSDeploy operation + /// + /// Function details. /// /// /// Headers that will be added to request. @@ -80145,7 +80623,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -80170,13 +80648,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } - if (mSDeploy == null) + if (functionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); } if (Client.SubscriptionId == null) { @@ -80195,17 +80673,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("functionName", functionName); + tracingParameters.Add("functionEnvelope", functionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateFunction", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -80250,9 +80728,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) + if(functionEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -80276,7 +80754,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -80306,7 +80784,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -80319,7 +80797,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -80339,22 +80817,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Restores a web app. + /// Description for Invoke the MSDeploy web app extension. /// - /// - /// Azure subscription. - /// /// /// Name of the resource group to which the resource belongs. /// /// /// Name of web app. /// - /// - /// Migration migrationOptions. + /// + /// ID of web app instance. + /// + /// + /// Details of MSDeploy operation /// /// /// Headers that will be added to request. @@ -80377,12 +80855,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginMigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (subscriptionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionName"); - } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -80406,13 +80880,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (migrationOptions == null) + if (instanceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationOptions"); + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); } - if (migrationOptions != null) + if (mSDeploy == null) { - migrationOptions.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); } if (Client.SubscriptionId == null) { @@ -80429,24 +80903,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("subscriptionName", subscriptionName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("migrationOptions", migrationOptions); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateStorage", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (subscriptionName != null) - { - _queryParameters.Add(string.Format("subscriptionName={0}", System.Uri.EscapeDataString(subscriptionName))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -80489,9 +80960,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(migrationOptions != null) + if(mSDeploy != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationOptions, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -80515,7 +80986,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 201 && (int)_statusCode != 409) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -80545,7 +81016,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -80553,12 +81024,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 200) + if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -80578,20 +81049,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Migrates a local (in-app) MySql database to a remote MySql database. + /// Restores a web app. /// /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. + /// Description for Restores a web app. /// + /// + /// Azure subscription. + /// /// /// Name of the resource group to which the resource belongs. /// /// /// Name of web app. /// - /// - /// MySql migration options. + /// + /// Migration migrationOptions. /// /// /// Headers that will be added to request. @@ -80614,8 +81087,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginMigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginMigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (subscriptionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionName"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -80639,13 +81116,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (migrationRequestEnvelope == null) + if (migrationOptions == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationRequestEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "migrationOptions"); } - if (migrationRequestEnvelope != null) + if (migrationOptions != null) { - migrationRequestEnvelope.Validate(); + migrationOptions.Validate(); } if (Client.SubscriptionId == null) { @@ -80662,19 +81139,24 @@ internal WebAppsOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("subscriptionName", subscriptionName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("migrationRequestEnvelope", migrationRequestEnvelope); + tracingParameters.Add("migrationOptions", migrationOptions); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateMySql", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateStorage", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (subscriptionName != null) + { + _queryParameters.Add(string.Format("subscriptionName={0}", System.Uri.EscapeDataString(subscriptionName))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -80686,7 +81168,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -80717,9 +81199,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(migrationRequestEnvelope != null) + if(migrationOptions != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationRequestEnvelope, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationOptions, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -80773,7 +81255,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -80786,7 +81268,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -80806,25 +81288,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Migrates a local (in-app) MySql database to a remote MySql database. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Migrates a local (in-app) MySql database to a remote MySql + /// database. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). + /// Name of web app. /// - /// - /// The Blob URL to store capture file. + /// + /// MySql migration options. /// /// /// Headers that will be added to request. @@ -80847,7 +81324,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginMigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -80872,6 +81349,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (migrationRequestEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "migrationRequestEnvelope"); + } + if (migrationRequestEnvelope != null) + { + migrationRequestEnvelope.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -80889,31 +81374,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("migrationRequestEnvelope", migrationRequestEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateMySql", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -80956,6 +81427,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(migrationRequestEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationRequestEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -80976,7 +81453,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -81006,7 +81483,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -81019,25 +81496,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81057,20 +81516,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Approves or rejects a private endpoint connection + /// Start capturing network packets for the site. /// /// - /// Description for Approves or rejects a private endpoint connection + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// The name of the web app. /// - /// + /// + /// The duration to keep capturing in seconds. /// - /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -81093,7 +81557,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81118,14 +81582,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (privateEndpointWrapper == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -81143,19 +81599,31 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -81167,7 +81635,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -81198,12 +81666,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(privateEndpointWrapper != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -81254,7 +81716,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -81267,7 +81729,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81285,7 +81747,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81305,10 +81767,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a private endpoint connection + /// Approves or rejects a private endpoint connection /// /// - /// Description for Deletes a private endpoint connection + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -81318,6 +81780,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// + /// + /// /// /// Headers that will be added to request. /// @@ -81339,7 +81803,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81368,6 +81832,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + if (privateEndpointWrapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -81386,8 +81854,9 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -81408,7 +81877,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -81439,6 +81908,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(privateEndpointWrapper != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -81459,7 +81934,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -81489,7 +81964,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -81502,7 +81977,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81520,25 +81995,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81558,19 +82015,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. + /// Deletes a private endpoint connection /// /// - /// Description for Restores an app from a backup blob in Azure Storage. + /// Description for Deletes a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of the site. /// - /// - /// Information on restore request . + /// /// /// /// Headers that will be added to request. @@ -81581,6 +82037,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -81590,7 +82049,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81615,13 +82074,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) + if (privateEndpointConnectionName == null) { - request.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } if (Client.SubscriptionId == null) { @@ -81640,15 +82095,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -81662,7 +82118,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -81693,12 +82149,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -81719,7 +82169,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -81749,13 +82199,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -81764,19 +82268,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a deleted web app to this web app. + /// Restores an app from a backup blob in Azure Storage. /// /// - /// Description for Restores a deleted web app to this web app. + /// Description for Restores an app from a backup blob in Azure Storage. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Deleted web app restore information. + /// + /// Information on restore request . /// /// /// Headers that will be added to request. @@ -81796,7 +82300,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81821,9 +82325,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (restoreRequest == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (Client.SubscriptionId == null) { @@ -81842,13 +82350,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedApp", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -81895,9 +82403,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(restoreRequest != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -81966,10 +82474,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app from a snapshot. + /// Restores a deleted web app to this web app. /// /// - /// Description for Restores a web app from a snapshot. + /// Description for Restores a deleted web app to this web app. /// /// /// Name of the resource group to which the resource belongs. @@ -81978,8 +82486,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of web app. /// /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. + /// Deleted web app restore information. /// /// /// Headers that will be added to request. @@ -81999,7 +82506,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82028,10 +82535,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); } - if (restoreRequest != null) - { - restoreRequest.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -82051,11 +82554,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("restoreRequest", restoreRequest); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedApp", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -82173,19 +82676,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. + /// Restores a web app from a snapshot. /// /// - /// Description for Install site extension on a web site, or a deployment slot. + /// Description for Restores a web app from a snapshot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of web app. /// - /// - /// Site extension name. + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. /// /// /// Headers that will be added to request. @@ -82196,9 +82700,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -82208,7 +82709,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82233,9 +82734,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) + if (restoreRequest == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + } + if (restoreRequest != null) + { + restoreRequest.Validate(); } if (Client.SubscriptionId == null) { @@ -82254,16 +82759,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); + tracingParameters.Add("restoreRequest", restoreRequest); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtension", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -82277,7 +82781,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -82308,6 +82812,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(restoreRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -82328,7 +82838,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -82358,49 +82868,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -82409,26 +82883,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. + /// Install site extension on a web site, or a deployment slot. /// /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. + /// Description for Install site extension on a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. + /// Site name. /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. + /// + /// Site extension name. /// /// /// Headers that will be added to request. @@ -82451,7 +82918,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82476,17 +82943,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (siteEnvelope != null) - { - siteEnvelope.Validate(); - } - if (slot == null) + if (siteExtensionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (Client.SubscriptionId == null) { @@ -82505,17 +82964,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - tracingParameters.Add("slot", slot); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtension", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -82560,12 +83018,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -82586,7 +83038,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -82616,7 +83068,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -82629,7 +83081,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -82642,12 +83094,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } } // Deserialize Response - if ((int)_statusCode == 202) + if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -82667,28 +83119,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). + /// Creates a new web, mobile, or API app in an existing resource group, or + /// updates an existing app. /// /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). + /// Description for Creates a new web, mobile, or API app in an existing + /// resource group, or updates an existing app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// ID of the backup. + /// Unique name of the app to create or update. To create or update a + /// deployment slot, use the {slot} parameter. /// - /// - /// Information on restore request . + /// + /// A JSON representation of the app properties. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. + /// Name of the deployment slot to create or update. By default, this API + /// attempts to create or modify the production slot. /// /// /// Headers that will be added to request. @@ -82699,6 +83149,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -82708,7 +83161,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82733,17 +83186,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) + if (siteEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); } - if (request != null) + if (siteEnvelope != null) { - request.Validate(); + siteEnvelope.Validate(); } if (slot == null) { @@ -82766,18 +83215,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); + tracingParameters.Add("siteEnvelope", siteEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -82792,7 +83239,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -82823,9 +83270,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(request != null) + if(siteEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -82879,13 +83326,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -82894,10 +83377,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an app. + /// Restores a specific backup to another app (or deployment slot, if + /// specified). /// /// - /// Description for Gets the Git/FTP publishing credentials of an app. + /// Description for Restores a specific backup to another app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -82905,9 +83390,15 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// ID of the backup. + /// + /// + /// Information on restore request . + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// restore a backup of the production slot. /// /// /// Headers that will be added to request. @@ -82918,9 +83409,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -82930,7 +83418,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82955,6 +83443,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (backupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -82976,15 +83476,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("backupId", backupId); + tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentialsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -83030,6 +83533,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -83050,7 +83559,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83080,31 +83589,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -83113,23 +83604,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Gets the Git/FTP publishing credentials of an app. /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Gets the Git/FTP publishing credentials of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the publishing credentials for the production slot. /// /// /// Headers that will be added to request. @@ -83152,7 +83640,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -83181,10 +83669,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -83203,13 +83687,12 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentialsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -83226,7 +83709,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -83257,12 +83740,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -83283,7 +83760,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83313,7 +83790,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -83321,12 +83798,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -83346,25 +83823,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create function for web site, or a deployment slot. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Create function for web site, or a deployment slot. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Function name. + /// Name of web app. /// /// - /// Name of the deployment slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// - /// - /// Function details. + /// + /// Details of MSDeploy operation /// /// /// Headers that will be added to request. @@ -83387,7 +83862,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -83412,17 +83887,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (functionEnvelope == null) + if (mSDeploy == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); } if (Client.SubscriptionId == null) { @@ -83441,18 +83912,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); tracingParameters.Add("slot", slot); - tracingParameters.Add("functionEnvelope", functionEnvelope); + tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceFunctionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -83498,9 +83967,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(functionEnvelope != null) + if(mSDeploy != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -83524,7 +83993,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201) + if ((int)_statusCode != 201 && (int)_statusCode != 409) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83554,7 +84023,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -83567,7 +84036,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -83587,26 +84056,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Create function for web site, or a deployment slot. /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Create function for web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Site name. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// + /// Function name. /// - /// - /// ID of web app instance. + /// + /// Name of the deployment slot. /// - /// - /// Details of MSDeploy operation + /// + /// Function details. /// /// /// Headers that will be added to request. @@ -83629,7 +84097,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -83654,17 +84122,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } - if (instanceId == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (mSDeploy == null) + if (functionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); } if (Client.SubscriptionId == null) { @@ -83683,19 +84151,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("functionEnvelope", functionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceFunctionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -83740,9 +84208,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) + if(functionEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -83766,7 +84234,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83796,7 +84264,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -83809,7 +84277,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -83829,28 +84297,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of web app. /// /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. + /// Name of web app slot. If not specified then will default to production + /// slot. /// - /// - /// The maximum frame length in bytes (Optional). + /// + /// ID of web app instance. /// - /// - /// The Blob URL to store capture file. + /// + /// Details of MSDeploy operation /// /// /// Headers that will be added to request. @@ -83873,7 +84339,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -83902,6 +84368,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } + if (mSDeploy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -83919,33 +84393,21 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -83957,7 +84419,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -83988,6 +84450,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(mSDeploy != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -84008,7 +84476,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 201 && (int)_statusCode != 409) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -84038,7 +84506,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -84046,30 +84514,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) + if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -84089,22 +84539,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Approves or rejects a private endpoint connection + /// Start capturing network packets for the site. /// /// - /// Description for Approves or rejects a private endpoint connection + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// The name of the web app. /// - /// + /// + /// The name of the slot for this web app. /// - /// + /// + /// The duration to keep capturing in seconds. /// - /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -84127,7 +84583,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -84152,14 +84608,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (privateEndpointWrapper == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -84181,21 +84629,33 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); + tracingParameters.Add("durationInSeconds", durationInSeconds); tracingParameters.Add("slot", slot); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -84207,7 +84667,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -84238,12 +84698,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(privateEndpointWrapper != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -84294,7 +84748,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -84307,7 +84761,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -84325,7 +84779,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -84345,10 +84799,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a private endpoint connection + /// Approves or rejects a private endpoint connection /// /// - /// Description for Deletes a private endpoint connection + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -84358,6 +84812,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// + /// + /// /// /// /// @@ -84381,7 +84837,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -84410,6 +84866,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + if (privateEndpointWrapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -84432,9 +84892,10 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -84456,7 +84917,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -84487,6 +84948,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(privateEndpointWrapper != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -84507,7 +84974,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -84537,7 +85004,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -84550,7 +85017,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -84568,25 +85035,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -84606,23 +85055,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. + /// Deletes a private endpoint connection /// /// - /// Description for Restores an app from a backup blob in Azure Storage. + /// Description for Deletes a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of the site. /// - /// - /// Information on restore request . + /// /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. /// /// /// Headers that will be added to request. @@ -84633,6 +85079,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -84642,7 +85091,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -84667,13 +85116,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) + if (privateEndpointConnectionName == null) { - request.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } if (slot == null) { @@ -84696,16 +85141,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -84720,7 +85166,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -84751,12 +85197,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -84777,7 +85217,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -84807,13 +85247,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -84822,23 +85316,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a deleted web app to this web app. + /// Restores an app from a backup blob in Azure Storage. /// /// - /// Description for Restores a deleted web app to this web app. + /// Description for Restores an app from a backup blob in Azure Storage. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Deleted web app restore information. + /// + /// Information on restore request . /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// restore a backup of the production slot. /// /// /// Headers that will be added to request. @@ -84858,7 +85352,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -84883,9 +85377,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (restoreRequest == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (slot == null) { @@ -84908,14 +85406,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); + tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedAppSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -84963,9 +85461,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(restoreRequest != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -85034,10 +85532,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app from a snapshot. + /// Restores a deleted web app to this web app. /// /// - /// Description for Restores a web app from a snapshot. + /// Description for Restores a deleted web app to this web app. /// /// /// Name of the resource group to which the resource belongs. @@ -85046,8 +85544,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of web app. /// /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. + /// Deleted web app restore information. /// /// /// Name of web app slot. If not specified then will default to production @@ -85071,7 +85568,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -85100,10 +85597,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); } - if (restoreRequest != null) - { - restoreRequest.Validate(); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -85128,11 +85621,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("restoreRequest", restoreRequest); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedAppSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -85251,23 +85744,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. + /// Restores a web app from a snapshot. /// /// - /// Description for Install site extension on a web site, or a deployment slot. + /// Description for Restores a web app from a snapshot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of web app. /// - /// - /// Site extension name. + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -85278,9 +85772,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -85290,7 +85781,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -85315,9 +85806,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) + if (restoreRequest == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + } + if (restoreRequest != null) + { + restoreRequest.Validate(); } if (slot == null) { @@ -85340,17 +85835,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); + tracingParameters.Add("restoreRequest", restoreRequest); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtensionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshotSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -85365,7 +85859,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -85396,6 +85890,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(restoreRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -85416,7 +85916,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -85446,49 +85946,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -85497,23 +85961,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Install site extension on a web site, or a deployment slot. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Install site extension on a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// Site extension name. /// /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -85524,6 +85988,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -85533,7 +86000,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginSwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -85558,13 +86025,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) + if (siteExtensionId == null) { - slotSwapEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (slot == null) { @@ -85587,16 +86050,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtensionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -85611,7 +86075,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -85642,12 +86106,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -85668,7 +86126,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -85698,13 +86156,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -85713,10 +86207,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Swaps two deployment slots of an app. /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Swaps two deployment slots of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -85724,12 +86218,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteSourceControl object. See example. + /// + /// JSON object that contains the target slot name. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. + /// Name of the source slot. If a slot is not specified, the production slot is + /// used as the source slot. /// /// /// Headers that will be added to request. @@ -85740,9 +86234,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -85752,7 +86243,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginSwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -85777,9 +86268,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) + if (slotSwapEntity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); } if (slot == null) { @@ -85802,14 +86297,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -85826,7 +86321,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -85857,9 +86352,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) + if(slotSwapEntity != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -85883,7 +86378,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -85913,67 +86408,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -85982,28 +86423,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Updates the source control configuration of an app. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. + /// Name of the app. /// - /// - /// The maximum frame length in bytes (Optional). + /// + /// JSON representation of a SiteSourceControl object. See example. /// - /// - /// The Blob URL to store capture file. + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the source control configuration for the production slot. /// /// /// Headers that will be added to request. @@ -86026,7 +86462,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -86051,6 +86487,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteSourceControl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -86072,33 +86512,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -86110,7 +86536,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -86141,6 +86567,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -86161,7 +86593,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -86191,7 +86623,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -86204,7 +86636,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -86222,7 +86672,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -86242,19 +86692,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Start capturing network packets for the site. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// The name of the slot for this web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -86265,6 +86724,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -86274,7 +86736,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginSwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> BeginStartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -86299,13 +86761,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) + if (slot == null) { - slotSwapEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -86324,17 +86782,33 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("slot", slot); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotWithProduction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -86377,12 +86851,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -86433,13 +86901,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -86448,10 +86952,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Swaps two deployment slots of an app. /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Swaps two deployment slots of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -86459,8 +86963,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteSourceControl object. See example. + /// + /// JSON object that contains the target slot name. See example. /// /// /// Headers that will be added to request. @@ -86471,9 +86975,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -86483,7 +86984,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginSwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -86508,9 +87009,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) + if (slotSwapEntity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); } if (Client.SubscriptionId == null) { @@ -86529,13 +87034,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotWithProduction", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -86551,7 +87056,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -86582,9 +87087,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) + if(slotSwapEntity != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -86608,7 +87113,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -86638,67 +87143,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -86707,25 +87158,284 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Updates the source control configuration of an app. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). + /// Name of the app. /// - /// - /// The Blob URL to store capture file. + /// + /// JSON representation of a SiteSourceControl object. See example. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (siteSourceControl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControl", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Start capturing network packets for the site. + /// + /// + /// Description for Start capturing network packets for the site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -87096,7 +87806,523 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all web, mobile, and API apps in the specified resource group. + /// + /// + /// Description for Gets all web, mobile, and API apps in the specified + /// resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets existing backups of an app. + /// + /// + /// Description for Gets existing backups of an app. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBackupsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBasicPublishingCredentialsPoliciesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBasicPublishingCredentialsPoliciesNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -87109,7 +88335,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -87129,11 +88355,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all web, mobile, and API apps in the specified resource group. + /// List the configurations of an app /// /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. + /// Description for List the configurations of an app /// /// /// The NextLink from the previous successful call to List operation. @@ -87159,7 +88384,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87174,7 +88399,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87268,7 +88493,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -87281,7 +88506,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -87301,10 +88526,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets existing backups of an app. + /// Description for Gets the config reference app settings and status of an app /// /// /// The NextLink from the previous successful call to List operation. @@ -87330,7 +88555,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87345,7 +88570,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferencesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87439,7 +88664,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -87452,7 +88677,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -87472,10 +88697,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the configurations of an app + /// Gets the config reference app settings and status of an app /// /// - /// Description for List the configurations of an app + /// Description for Gets the config reference app settings and status of an app /// /// /// The NextLink from the previous successful call to List operation. @@ -87501,7 +88726,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87516,7 +88741,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferencesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87610,7 +88835,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -87623,7 +88848,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -87643,10 +88868,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the config reference app settings and status of an app + /// Gets a list of web app configuration snapshots identifiers. Each element of + /// the list contains a timestamp and the ID of the snapshot. /// /// - /// Description for Gets the config reference app settings and status of an app + /// 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. /// /// /// The NextLink from the previous successful call to List operation. @@ -87672,7 +88899,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87687,7 +88914,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferencesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87781,7 +89008,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -87794,7 +89021,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -87814,10 +89041,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the config reference app settings and status of an app + /// List continuous web jobs for an app, or a deployment slot. /// /// - /// Description for Gets the config reference app settings and status of an app + /// Description for List continuous web jobs for an app, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -87843,7 +89070,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListContinuousWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87858,7 +89085,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferencesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87952,7 +89179,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -87965,7 +89192,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -87985,12 +89212,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. + /// List deployments for an app, or a deployment slot. /// /// - /// 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. + /// Description for List deployments for an app, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -88016,7 +89241,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDeploymentsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88031,7 +89256,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88125,7 +89350,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -88138,7 +89363,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -88158,10 +89383,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List continuous web jobs for an app, or a deployment slot. + /// Lists ownership identifiers for domain associated with web app. /// /// - /// Description for List continuous web jobs for an app, or a deployment slot. + /// Description for Lists ownership identifiers for domain associated with web + /// app. /// /// /// The NextLink from the previous successful call to List operation. @@ -88187,7 +89413,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListContinuousWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88202,7 +89428,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88296,7 +89522,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -88309,7 +89535,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -88329,10 +89555,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployments for an app, or a deployment slot. + /// List the functions for a web site, or a deployment slot. /// /// - /// Description for List deployments for an app, or a deployment slot. + /// Description for List the functions for a web site, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -88358,7 +89584,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDeploymentsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88373,7 +89599,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctionsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88437,7 +89663,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -88467,7 +89693,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -88480,7 +89706,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -88500,11 +89726,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Lists ownership identifiers for domain associated with web app. + /// Get hostname bindings for an app or a deployment slot. /// /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. + /// Description for Get hostname bindings for an app or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -88530,7 +89755,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListHostNameBindingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88545,7 +89770,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88639,7 +89864,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -88652,7 +89877,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -88672,10 +89897,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the functions for a web site, or a deployment slot. + /// Gets all scale-out instances of an app. /// /// - /// Description for List the functions for a web site, or a deployment slot. + /// Description for Gets all scale-out instances of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -88701,7 +89926,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88716,7 +89941,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88780,7 +90005,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -88810,7 +90035,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -88823,7 +90048,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -88843,10 +90068,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get hostname bindings for an app or a deployment slot. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Get hostname bindings for an app or a deployment slot. + /// 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. /// /// /// The NextLink from the previous successful call to List operation. @@ -88872,7 +90099,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListHostNameBindingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88887,7 +90114,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88951,7 +90178,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -88981,7 +90208,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -88994,7 +90221,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -89014,10 +90241,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Gets all scale-out instances of an app. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -89043,7 +90272,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89058,7 +90287,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89122,7 +90351,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -89152,7 +90381,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -89165,7 +90394,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -89185,12 +90414,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// 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. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -89216,7 +90445,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89231,7 +90460,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89325,7 +90554,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -89338,7 +90567,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -89358,12 +90587,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Gets existing backups of an app. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Gets existing backups of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -89389,7 +90616,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89404,7 +90631,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89417,7 +90644,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -89468,7 +90695,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -89498,7 +90725,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -89511,7 +90738,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -89531,12 +90758,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Gets perfmon counters for web app. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets perfmon counters for web app. /// /// /// The NextLink from the previous successful call to List operation. @@ -89562,7 +90787,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPerfMonCountersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89577,7 +90802,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89641,7 +90866,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -89671,7 +90896,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -89684,7 +90909,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -89704,10 +90929,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Gets existing backups of an app. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The NextLink from the previous successful call to List operation. @@ -89733,7 +90959,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89748,7 +90974,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89761,7 +90987,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -89842,7 +91068,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -89855,7 +91081,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -89875,10 +91101,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets perfmon counters for web app. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Gets perfmon counters for web app. + /// 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. /// /// /// The NextLink from the previous successful call to List operation. @@ -89904,7 +91132,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPerfMonCountersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89919,7 +91147,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89983,7 +91211,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -90013,7 +91241,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -90026,7 +91254,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -90046,11 +91274,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the list of private endpoint connections associated with a site + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Gets the list of private endpoint connections associated - /// with a site + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -90076,7 +91305,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -90091,7 +91320,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -90155,7 +91384,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -90185,7 +91414,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -90198,7 +91427,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -90218,12 +91447,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// 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. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -90249,7 +91478,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -90264,7 +91493,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -90358,7 +91587,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -90371,7 +91600,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -90391,12 +91620,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Get public certificates for an app or a deployment slot. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Get public certificates for an app or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -90422,7 +91649,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPublicCertificatesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -90437,7 +91664,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -90501,7 +91728,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -90531,7 +91758,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -90544,7 +91771,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -90564,12 +91791,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Get list of siteextensions for a web site, or a deployment slot. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Get list of siteextensions for a web site, or a deployment + /// slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -90595,7 +91821,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteExtensionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -90610,7 +91836,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -90704,7 +91930,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -90717,7 +91943,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -90737,10 +91963,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get public certificates for an app or a deployment slot. + /// Gets an app's deployment slots. /// /// - /// Description for Get public certificates for an app or a deployment slot. + /// Description for Gets an app's deployment slots. /// /// /// The NextLink from the previous successful call to List operation. @@ -90766,7 +91992,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPublicCertificatesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -90781,7 +92007,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -90875,179 +92101,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteExtensionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -91060,7 +92114,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -91080,10 +92134,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets an app's deployment slots. + /// Gets existing backups of an app. /// /// - /// Description for Gets an app's deployment slots. + /// Description for Gets existing backups of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -91109,7 +92163,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -91124,7 +92178,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -91218,7 +92272,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -91231,7 +92285,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -91251,10 +92305,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. /// /// - /// Description for Gets existing backups of an app. + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. /// /// /// The NextLink from the previous successful call to List operation. @@ -91280,7 +92336,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBasicPublishingCredentialsPoliciesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -91295,7 +92351,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBasicPublishingCredentialsPoliciesSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -91389,7 +92445,7 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -91402,7 +92458,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs index b40763b12bb1..9878bdb60ca8 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs @@ -783,9 +783,9 @@ public static void Restore(this IWebAppsOperations operations, string resourceGr /// /// Name of the app. /// - public static CsmPublishingCredentialsPoliciesCollection GetBasicPublishingCredentialsPolicies(this IWebAppsOperations operations, string resourceGroupName, string name) + public static IPage ListBasicPublishingCredentialsPolicies(this IWebAppsOperations operations, string resourceGroupName, string name) { - return operations.GetBasicPublishingCredentialsPoliciesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.ListBasicPublishingCredentialsPoliciesAsync(resourceGroupName, name).GetAwaiter().GetResult(); } /// @@ -808,9 +808,9 @@ public static CsmPublishingCredentialsPoliciesCollection GetBasicPublishingCrede /// /// The cancellation token. /// - public static async Task GetBasicPublishingCredentialsPoliciesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListBasicPublishingCredentialsPoliciesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -6412,6 +6412,72 @@ public static void DeleteSwiftVirtualNetwork(this IWebAppsOperations operations, (await operations.DeleteSwiftVirtualNetworkWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnectionWithCheck(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope) + { + return operations.UpdateSwiftVirtualNetworkConnectionWithCheckAsync(resourceGroupName, name, connectionEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateSwiftVirtualNetworkConnectionWithCheckAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets all network features used by the app (or deployment slot, if /// specified). @@ -9568,9 +9634,9 @@ public static void RestoreSlot(this IWebAppsOperations operations, string resour /// /// /// - public static CsmPublishingCredentialsPoliciesCollection GetBasicPublishingCredentialsPoliciesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + public static IPage ListBasicPublishingCredentialsPoliciesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) { - return operations.GetBasicPublishingCredentialsPoliciesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + return operations.ListBasicPublishingCredentialsPoliciesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); } /// @@ -9595,9 +9661,9 @@ public static CsmPublishingCredentialsPoliciesCollection GetBasicPublishingCrede /// /// The cancellation token. /// - public static async Task GetBasicPublishingCredentialsPoliciesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListBasicPublishingCredentialsPoliciesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -15604,6 +15670,80 @@ public static SwiftVirtualNetwork GetSwiftVirtualNetworkConnectionSlot(this IWeb } } + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. + /// + public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot) + { + return operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(resourceGroupName, name, connectionEnvelope, slot).GetAwaiter().GetResult(); + } + + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Deletes a Swift Virtual Network connection from an app (or deployment /// slot). @@ -15659,6 +15799,80 @@ public static void DeleteSwiftVirtualNetworkSlot(this IWebAppsOperations operati (await operations.DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. + /// + public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnectionWithCheckSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot) + { + return operations.UpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(resourceGroupName, name, connectionEnvelope, slot).GetAwaiter().GetResult(); + } + + /// + /// Integrates this Web App with a Virtual Network. This requires 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. + /// + /// + /// Description for Integrates this Web App with a Virtual Network. This + /// requires 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. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets all network features used by the app (or deployment slot, if /// specified). @@ -23880,6 +24094,50 @@ public static IPage ListBackupsNext(this IWebAppsOperations operatio } } + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBasicPublishingCredentialsPoliciesNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.ListBasicPublishingCredentialsPoliciesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBasicPublishingCredentialsPoliciesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBasicPublishingCredentialsPoliciesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List the configurations of an app /// @@ -24834,6 +25092,50 @@ public static IPage ListBackupsSlotNext(this IWebAppsOperations oper } } + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBasicPublishingCredentialsPoliciesSlotNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.ListBasicPublishingCredentialsPoliciesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBasicPublishingCredentialsPoliciesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBasicPublishingCredentialsPoliciesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List the configurations of an app /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs index 0ccd5a99dd44..0b3c63e3d794 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs @@ -107,6 +107,16 @@ public partial class WebSiteManagementClient : ServiceClient public virtual IDomainRegistrationProviderOperations DomainRegistrationProvider { get; private set; } + /// + /// Gets the IAppServiceEnvironmentsOperations. + /// + public virtual IAppServiceEnvironmentsOperations AppServiceEnvironments { get; private set; } + + /// + /// Gets the IAppServicePlansOperations. + /// + public virtual IAppServicePlansOperations AppServicePlans { get; private set; } + /// /// Gets the ICertificatesOperations. /// @@ -127,6 +137,11 @@ public partial class WebSiteManagementClient : ServiceClient public virtual IGlobalModelOperations GlobalModel { get; private set; } + /// + /// Gets the IKubeEnvironmentsOperations. + /// + public virtual IKubeEnvironmentsOperations KubeEnvironments { get; private set; } + /// /// Gets the IProviderOperations. /// @@ -138,9 +153,9 @@ public partial class WebSiteManagementClient : ServiceClient - /// Gets the IWebAppsOperations. + /// Gets the IResourceHealthMetadataOperations. /// - public virtual IWebAppsOperations WebApps { get; private set; } + public virtual IResourceHealthMetadataOperations ResourceHealthMetadata { get; private set; } /// /// Gets the IStaticSitesOperations. @@ -148,19 +163,9 @@ public partial class WebSiteManagementClient : ServiceClient - /// Gets the IAppServiceEnvironmentsOperations. - /// - public virtual IAppServiceEnvironmentsOperations AppServiceEnvironments { get; private set; } - - /// - /// Gets the IAppServicePlansOperations. - /// - public virtual IAppServicePlansOperations AppServicePlans { get; private set; } - - /// - /// Gets the IResourceHealthMetadataOperations. + /// Gets the IWebAppsOperations. /// - public virtual IResourceHealthMetadataOperations ResourceHealthMetadata { get; private set; } + public virtual IWebAppsOperations WebApps { get; private set; } /// /// Initializes a new instance of the WebSiteManagementClient class. @@ -409,19 +414,20 @@ private void Initialize() Domains = new DomainsOperations(this); TopLevelDomains = new TopLevelDomainsOperations(this); DomainRegistrationProvider = new DomainRegistrationProviderOperations(this); + AppServiceEnvironments = new AppServiceEnvironmentsOperations(this); + AppServicePlans = new AppServicePlansOperations(this); Certificates = new CertificatesOperations(this); DeletedWebApps = new DeletedWebAppsOperations(this); Diagnostics = new DiagnosticsOperations(this); GlobalModel = new GlobalModelOperations(this); + KubeEnvironments = new KubeEnvironmentsOperations(this); Provider = new ProviderOperations(this); Recommendations = new RecommendationsOperations(this); - WebApps = new WebAppsOperations(this); - StaticSites = new StaticSitesOperations(this); - AppServiceEnvironments = new AppServiceEnvironmentsOperations(this); - AppServicePlans = new AppServicePlansOperations(this); ResourceHealthMetadata = new ResourceHealthMetadataOperations(this); + StaticSites = new StaticSitesOperations(this); + WebApps = new WebAppsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-12-01"; + ApiVersion = "2021-01-15"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj index 74a26a599397..1bdafe0f8062 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj @@ -7,9 +7,9 @@ Microsoft.Azure.Management.Websites Provides website management capabilities for Microsoft Azure. Microsoft.Azure.Management.Websites - 3.1.1 + 3.1.2 Microsoft Azure website management;website management; - + $(SdkTargetFx) diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs index b846d2da1a76..14088e70e3fa 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ [assembly: AssemblyTitle("Microsoft Azure Web Sites Management Library")] [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Web Sites.")] -[assembly: AssemblyVersion("3.1.1")] -[assembly: AssemblyFileVersion("3.1.1")] +[assembly: AssemblyVersion("3.1.2")] +[assembly: AssemblyFileVersion("3.1.2")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Azure .NET SDK")]