diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs index aafa69a988d34..ac950e2ea00a3 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs @@ -1185,7 +1185,7 @@ internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1240,24 +1240,6 @@ internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) 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); @@ -2092,7 +2074,7 @@ internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2147,24 +2129,6 @@ internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) 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); @@ -2765,10 +2729,11 @@ internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) } /// - /// Verify domain ownership for this certificate order. + /// Resend domain verification email to customer for this certificate order /// /// - /// Description for Verify domain ownership for this certificate order. + /// Resend domain verification ownership email containing steps on how to + /// verify a domain for a given certificate order /// /// /// Name of the resource group to which the resource belongs. @@ -2967,10 +2932,20 @@ internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) } /// - /// Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an issued + /// certificate. /// /// - /// Description for Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an issued + /// certificate. A site seal is a graphic that the certificate purchaser can + /// embed on their web site to show their visitors information about their SSL + /// certificate. If a web site visitor clicks on the site seal image, a pop-up + /// page is displayed that contains detailed information about the SSL + /// certificate. The site seal token is used to link the site seal graphic + /// image to the appropriate certificate details pop-up page display when a + /// user clicks on the site seal. The site seal images are expected to be + /// static images and hosted by the reseller, to minimize delays for customer + /// page load times. /// /// /// Name of the resource group to which the resource belongs. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs index 66512a36d4f3c..4c412abf611f9 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs @@ -736,10 +736,11 @@ public static void ResendEmail(this IAppServiceCertificateOrdersOperations opera } /// - /// Verify domain ownership for this certificate order. + /// Resend domain verification email to customer for this certificate order /// /// - /// Description for Verify domain ownership for this certificate order. + /// Resend domain verification ownership email containing steps on how to + /// verify a domain for a given certificate order /// /// /// The operations group for this extension method. @@ -759,10 +760,11 @@ public static void ResendRequestEmails(this IAppServiceCertificateOrdersOperatio } /// - /// Verify domain ownership for this certificate order. + /// Resend domain verification email to customer for this certificate order /// /// - /// Description for Verify domain ownership for this certificate order. + /// Resend domain verification ownership email containing steps on how to + /// verify a domain for a given certificate order /// /// /// The operations group for this extension method. @@ -785,10 +787,20 @@ public static void ResendRequestEmails(this IAppServiceCertificateOrdersOperatio } /// - /// Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an issued + /// certificate. /// /// - /// Description for Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an issued + /// certificate. A site seal is a graphic that the certificate purchaser can + /// embed on their web site to show their visitors information about their SSL + /// certificate. If a web site visitor clicks on the site seal image, a pop-up + /// page is displayed that contains detailed information about the SSL + /// certificate. The site seal token is used to link the site seal graphic + /// image to the appropriate certificate details pop-up page display when a + /// user clicks on the site seal. The site seal images are expected to be + /// static images and hosted by the reseller, to minimize delays for customer + /// page load times. /// /// /// The operations group for this extension method. @@ -808,10 +820,20 @@ public static SiteSeal RetrieveSiteSeal(this IAppServiceCertificateOrdersOperati } /// - /// Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an issued + /// certificate. /// /// - /// Description for Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an issued + /// certificate. A site seal is a graphic that the certificate purchaser can + /// embed on their web site to show their visitors information about their SSL + /// certificate. If a web site visitor clicks on the site seal image, a pop-up + /// page is displayed that contains detailed information about the SSL + /// certificate. The site seal token is used to link the site seal graphic + /// image to the appropriate certificate details pop-up page display when a + /// user clicks on the site seal. The site seal images are expected to be + /// static images and hosted by the reseller, to minimize delays for customer + /// page load times. /// /// /// The operations group for this extension method. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs index 4c48686441f0e..e4b195f768c6d 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs @@ -3519,7 +3519,7 @@ internal AppServicePlansOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListVnetsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListVnetsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3663,7 +3663,7 @@ internal AppServicePlansOperations(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")) @@ -3676,7 +3676,7 @@ internal AppServicePlansOperations(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) { @@ -3731,7 +3731,7 @@ internal AppServicePlansOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetFromServerFarmWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetFromServerFarmWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3881,7 +3881,7 @@ internal AppServicePlansOperations(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")) @@ -3894,7 +3894,7 @@ internal AppServicePlansOperations(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/AppServicePlansOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs index 023addb2962ba..df4059ded179d 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs @@ -922,7 +922,7 @@ public static object GetServerFarmSkus(this IAppServicePlansOperations operation /// /// Name of the App Service plan. /// - public static IList ListVnets(this IAppServicePlansOperations operations, string resourceGroupName, string name) + public static IList ListVnets(this IAppServicePlansOperations operations, string resourceGroupName, string name) { return operations.ListVnetsAsync(resourceGroupName, name).GetAwaiter().GetResult(); } @@ -946,7 +946,7 @@ public static IList ListVnets(this IAppServicePlansOperations operatio /// /// The cancellation token. /// - public static async Task> ListVnetsAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListVnetsAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListVnetsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) { @@ -972,7 +972,7 @@ public static IList ListVnets(this IAppServicePlansOperations operatio /// /// Name of the Virtual Network. /// - public static VnetInfo GetVnetFromServerFarm(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName) + public static VnetInfoResource GetVnetFromServerFarm(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName) { return operations.GetVnetFromServerFarmAsync(resourceGroupName, name, vnetName).GetAwaiter().GetResult(); } @@ -998,7 +998,7 @@ public static VnetInfo GetVnetFromServerFarm(this IAppServicePlansOperations ope /// /// The cancellation token. /// - public static async Task GetVnetFromServerFarmAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetVnetFromServerFarmAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetVnetFromServerFarmWithHttpMessagesAsync(resourceGroupName, name, vnetName, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs new file mode 100644 index 0000000000000..3c727f604129a --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs @@ -0,0 +1,1632 @@ +// +// 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; + + /// + /// ContainerAppsOperations operations. + /// + internal partial class ContainerAppsOperations : IServiceOperations, IContainerAppsOperations + { + /// + /// Initializes a new instance of the ContainerAppsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ContainerAppsOperations(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 the Container Apps in a given 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/containerApps").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 the Container Apps in a given 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/containerApps").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 Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// 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/containerApps/{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 && (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(); + _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; + } + + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// 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); + } + + /// + /// List secrets for a container app + /// + /// + /// Name of the Container App. + /// + /// + /// 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> ListSecretsWithHttpMessagesAsync(string name, 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"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListSecrets", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + 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) + { + 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; + } + + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + /// + /// 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, ContainerApp containerAppEnvelope, 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 (containerAppEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "containerAppEnvelope"); + } + if (containerAppEnvelope != null) + { + containerAppEnvelope.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("containerAppEnvelope", containerAppEnvelope); + 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/containerApps/{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(containerAppEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(containerAppEnvelope, 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 Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// 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/containerApps/{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 the Container Apps in a given 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 the Container Apps in a given 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/ContainerAppsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperationsExtensions.cs new file mode 100644 index 0000000000000..3cb02207a4ed7 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperationsExtensions.cs @@ -0,0 +1,415 @@ +// +// 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 ContainerAppsOperations. + /// + public static partial class ContainerAppsOperationsExtensions + { + /// + /// Get the Container Apps in a given subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListBySubscription(this IContainerAppsOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Get the Container Apps in a given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IContainerAppsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the Container Apps in a given resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + public static IPage ListByResourceGroup(this IContainerAppsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get the Container Apps in a given 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 IContainerAppsOperations 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 Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + public static ContainerApp Get(this IContainerAppsOperations operations, string resourceGroupName, string name) + { + return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Get the properties of a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + public static ContainerApp CreateOrUpdate(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope) + { + return operations.CreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + public static void Delete(this IContainerAppsOperations operations, string resourceGroupName, string name) + { + operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List secrets for a container app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Container App. + /// + public static SecretsCollection ListSecrets(this IContainerAppsOperations operations, string name) + { + return operations.ListSecretsAsync(name).GetAwaiter().GetResult(); + } + + /// + /// List secrets for a container app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Container App. + /// + /// + /// The cancellation token. + /// + public static async Task ListSecretsAsync(this IContainerAppsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListSecretsWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + public static ContainerApp BeginCreateOrUpdate(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + public static void BeginDelete(this IContainerAppsOperations operations, string resourceGroupName, string name) + { + operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get the Container Apps in a given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBySubscriptionNext(this IContainerAppsOperations operations, string nextPageLink) + { + return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get the Container Apps in a given 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 IContainerAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the Container Apps in a given resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IContainerAppsOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get the Container Apps in a given 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 IContainerAppsOperations 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/ContainerAppsRevisionsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperations.cs new file mode 100644 index 0000000000000..8471861211659 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperations.cs @@ -0,0 +1,1225 @@ +// +// 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; + + /// + /// ContainerAppsRevisionsOperations operations. + /// + internal partial class ContainerAppsRevisionsOperations : IServiceOperations, IContainerAppsRevisionsOperations + { + /// + /// Initializes a new instance of the ContainerAppsRevisionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ContainerAppsRevisionsOperations(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 the Revisions for a given Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App for which Revisions are needed. + /// + /// + /// 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>> ListRevisionsWithHttpMessagesAsync(string resourceGroupName, string containerAppName, 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 (containerAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); + } + 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("containerAppName", containerAppName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListRevisions", 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/containerApps/{containerAppName}/revisions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); + _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 a revision of a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision. + /// + /// + /// 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> GetRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, 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 (containerAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); + } + 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("containerAppName", containerAppName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetRevision", 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/containerApps/{containerAppName}/revisions/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); + _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; + } + + /// + /// Activates a revision for a Container App + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to activate + /// + /// + /// 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 ActivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, 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 (containerAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); + } + 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("containerAppName", containerAppName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ActivateRevision", 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/containerApps/{containerAppName}/revisions/{name}/activate").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); + _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("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) + { + 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; + } + + /// + /// Deactivates a revision for a Container App + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to deactivate + /// + /// + /// 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 DeactivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, 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 (containerAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); + } + 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("containerAppName", containerAppName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeactivateRevision", 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/containerApps/{containerAppName}/revisions/{name}/deactivate").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); + _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("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) + { + 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; + } + + /// + /// Restarts a revision for a Container App + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to restart + /// + /// + /// 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 RestartRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, 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 (containerAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); + } + 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("containerAppName", containerAppName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RestartRevision", 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/containerApps/{containerAppName}/revisions/{name}/restart").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); + _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("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) + { + 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 the Revisions for a given Container 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>> ListRevisionsNextWithHttpMessagesAsync(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, "ListRevisionsNext", 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/ContainerAppsRevisionsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperationsExtensions.cs new file mode 100644 index 0000000000000..0aa6713d80e66 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperationsExtensions.cs @@ -0,0 +1,274 @@ +// +// 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 ContainerAppsRevisionsOperations. + /// + public static partial class ContainerAppsRevisionsOperationsExtensions + { + /// + /// Get the Revisions for a given Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App for which Revisions are needed. + /// + public static IPage ListRevisions(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName) + { + return operations.ListRevisionsAsync(resourceGroupName, containerAppName).GetAwaiter().GetResult(); + } + + /// + /// Get the Revisions for a given Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App for which Revisions are needed. + /// + /// + /// The cancellation token. + /// + public static async Task> ListRevisionsAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListRevisionsWithHttpMessagesAsync(resourceGroupName, containerAppName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a revision of a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision. + /// + public static Revision GetRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) + { + return operations.GetRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); + } + + /// + /// Get a revision of a Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision. + /// + /// + /// The cancellation token. + /// + public static async Task GetRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Activates a revision for a Container App + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to activate + /// + public static void ActivateRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) + { + operations.ActivateRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); + } + + /// + /// Activates a revision for a Container App + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to activate + /// + /// + /// The cancellation token. + /// + public static async Task ActivateRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.ActivateRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deactivates a revision for a Container App + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to deactivate + /// + public static void DeactivateRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) + { + operations.DeactivateRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); + } + + /// + /// Deactivates a revision for a Container App + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to deactivate + /// + /// + /// The cancellation token. + /// + public static async Task DeactivateRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeactivateRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Restarts a revision for a Container App + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to restart + /// + public static void RestartRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) + { + operations.RestartRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); + } + + /// + /// Restarts a revision for a Container App + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to restart + /// + /// + /// The cancellation token. + /// + public static async Task RestartRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RestartRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get the Revisions for a given Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListRevisionsNext(this IContainerAppsRevisionsOperations operations, string nextPageLink) + { + return operations.ListRevisionsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get the Revisions for a given Container App. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListRevisionsNextAsync(this IContainerAppsRevisionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListRevisionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs index bdcc7b0ef1c56..4d5a189067988 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs @@ -2132,7 +2132,7 @@ internal DiagnosticsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteDetectorsWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteDetectorsWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2282,7 +2282,7 @@ internal DiagnosticsOperations(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")) @@ -2295,7 +2295,7 @@ internal DiagnosticsOperations(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) { @@ -2353,7 +2353,7 @@ internal DiagnosticsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2509,7 +2509,7 @@ internal DiagnosticsOperations(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")) @@ -2522,7 +2522,7 @@ internal DiagnosticsOperations(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) { @@ -4489,7 +4489,7 @@ internal DiagnosticsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteDetectorsSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteDetectorsSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4645,7 +4645,7 @@ internal DiagnosticsOperations(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")) @@ -4658,7 +4658,7 @@ internal DiagnosticsOperations(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) { @@ -4719,7 +4719,7 @@ internal DiagnosticsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4881,7 +4881,7 @@ internal DiagnosticsOperations(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")) @@ -4894,7 +4894,7 @@ internal DiagnosticsOperations(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) { @@ -5894,7 +5894,7 @@ internal DiagnosticsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteDetectorsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteDetectorsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6003,7 +6003,7 @@ internal DiagnosticsOperations(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")) @@ -6016,7 +6016,7 @@ internal DiagnosticsOperations(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) { @@ -6578,7 +6578,7 @@ internal DiagnosticsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteDetectorsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteDetectorsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6687,7 +6687,7 @@ internal DiagnosticsOperations(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")) @@ -6700,7 +6700,7 @@ internal DiagnosticsOperations(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/DiagnosticsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs index 7cfac6fdb1b86..730a96ac2198d 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs @@ -555,7 +555,7 @@ public static AnalysisDefinition GetSiteAnalysis(this IDiagnosticsOperations ope /// /// Diagnostic Category /// - public static IPage ListSiteDetectors(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory) + public static IPage ListSiteDetectors(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory) { return operations.ListSiteDetectorsAsync(resourceGroupName, siteName, diagnosticCategory).GetAwaiter().GetResult(); } @@ -581,7 +581,7 @@ public static IPage ListSiteDetectors(this IDiagnosticsOpera /// /// The cancellation token. /// - public static async Task> ListSiteDetectorsAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSiteDetectorsAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListSiteDetectorsWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, null, cancellationToken).ConfigureAwait(false)) { @@ -610,7 +610,7 @@ public static IPage ListSiteDetectors(this IDiagnosticsOpera /// /// Detector Name /// - public static DetectorDefinition GetSiteDetector(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName) + public static DetectorDefinitionResource GetSiteDetector(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName) { return operations.GetSiteDetectorAsync(resourceGroupName, siteName, diagnosticCategory, detectorName).GetAwaiter().GetResult(); } @@ -639,7 +639,7 @@ public static DetectorDefinition GetSiteDetector(this IDiagnosticsOperations ope /// /// The cancellation token. /// - public static async Task GetSiteDetectorAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetSiteDetectorAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetSiteDetectorWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, null, cancellationToken).ConfigureAwait(false)) { @@ -1186,7 +1186,7 @@ public static AnalysisDefinition GetSiteAnalysisSlot(this IDiagnosticsOperations /// /// Slot Name /// - public static IPage ListSiteDetectorsSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot) + public static IPage ListSiteDetectorsSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot) { return operations.ListSiteDetectorsSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot).GetAwaiter().GetResult(); } @@ -1215,7 +1215,7 @@ public static IPage ListSiteDetectorsSlot(this IDiagnosticsO /// /// The cancellation token. /// - public static async Task> ListSiteDetectorsSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSiteDetectorsSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListSiteDetectorsSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, slot, null, cancellationToken).ConfigureAwait(false)) { @@ -1247,7 +1247,7 @@ public static IPage ListSiteDetectorsSlot(this IDiagnosticsO /// /// Slot Name /// - public static DetectorDefinition GetSiteDetectorSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot) + public static DetectorDefinitionResource GetSiteDetectorSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot) { return operations.GetSiteDetectorSlotAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot).GetAwaiter().GetResult(); } @@ -1279,7 +1279,7 @@ public static DetectorDefinition GetSiteDetectorSlot(this IDiagnosticsOperations /// /// The cancellation token. /// - public static async Task GetSiteDetectorSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetSiteDetectorSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetSiteDetectorSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot, null, cancellationToken).ConfigureAwait(false)) { @@ -1541,7 +1541,7 @@ public static IPage ListSiteAnalysesNext(this IDiagnosticsOp /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListSiteDetectorsNext(this IDiagnosticsOperations operations, string nextPageLink) + public static IPage ListSiteDetectorsNext(this IDiagnosticsOperations operations, string nextPageLink) { return operations.ListSiteDetectorsNextAsync(nextPageLink).GetAwaiter().GetResult(); } @@ -1561,7 +1561,7 @@ public static IPage ListSiteDetectorsNext(this IDiagnosticsO /// /// The cancellation token. /// - public static async Task> ListSiteDetectorsNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSiteDetectorsNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListSiteDetectorsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { @@ -1701,7 +1701,7 @@ public static IPage ListSiteAnalysesSlotNext(this IDiagnosti /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListSiteDetectorsSlotNext(this IDiagnosticsOperations operations, string nextPageLink) + public static IPage ListSiteDetectorsSlotNext(this IDiagnosticsOperations operations, string nextPageLink) { return operations.ListSiteDetectorsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); } @@ -1721,7 +1721,7 @@ public static IPage ListSiteDetectorsSlotNext(this IDiagnost /// /// The cancellation token. /// - public static async Task> ListSiteDetectorsSlotNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSiteDetectorsSlotNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListSiteDetectorsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs index 08d58ad3005c4..17ee3d661bef1 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs @@ -2946,6 +2946,212 @@ internal DomainsOperations(WebSiteManagementClient client) return _result; } + /// + /// Transfer out domain to another registrar + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of domain. + /// + /// + /// 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> TransferOutWithHttpMessagesAsync(string resourceGroupName, string domainName, 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 (domainName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + } + 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("domainName", domainName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "TransferOut", 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.DomainRegistration/domains/{domainName}/transferOut").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); + _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; + // 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 != 400) + { + 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 domain. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs index ea9c034cf2401..4781006c0b42a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs @@ -728,6 +728,46 @@ public static void Renew(this IDomainsOperations operations, string resourceGrou (await operations.RenewWithHttpMessagesAsync(resourceGroupName, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Transfer out domain to another registrar + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of domain. + /// + public static Domain TransferOut(this IDomainsOperations operations, string resourceGroupName, string domainName) + { + return operations.TransferOutAsync(resourceGroupName, domainName).GetAwaiter().GetResult(); + } + + /// + /// Transfer out domain to another registrar + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of domain. + /// + /// + /// The cancellation token. + /// + public static async Task TransferOutAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.TransferOutWithHttpMessagesAsync(resourceGroupName, domainName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Creates or updates a domain. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs index ea68b4c9a69ce..7073513eefc52 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs @@ -451,10 +451,12 @@ public partial interface IAppServiceCertificateOrdersOperations /// Task ResendEmailWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Verify domain ownership for this certificate order. + /// Resend domain verification email to customer for this certificate + /// order /// /// - /// Description for Verify domain ownership for this certificate order. + /// Resend domain verification ownership email containing steps on how + /// to verify a domain for a given certificate order /// /// /// Name of the resource group to which the resource belongs. @@ -479,10 +481,21 @@ public partial interface IAppServiceCertificateOrdersOperations /// Task ResendRequestEmailsWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, NameIdentifier nameIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an + /// issued certificate. /// /// - /// Description for Verify domain ownership for this certificate order. + /// This method is used to obtain the site seal information for an + /// issued certificate. A site seal is a graphic that the certificate + /// purchaser can embed on their web site to show their visitors + /// information about their SSL certificate. If a web site visitor + /// clicks on the site seal image, a pop-up page is displayed that + /// contains detailed information about the SSL certificate. The site + /// seal token is used to link the site seal graphic image to the + /// appropriate certificate details pop-up page display when a user + /// clicks on the site seal. The site seal images are expected to be + /// static images and hosted by the reseller, to minimize delays for + /// customer page load times. /// /// /// Name of the resource group to which the resource belongs. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs index 308908b9006c7..ad73ce55fad4c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs @@ -577,7 +577,7 @@ public partial interface IAppServicePlansOperations /// /// Thrown when a required parameter is null /// - Task>> ListVnetsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListVnetsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a Virtual Network associated with an App Service plan. /// @@ -609,7 +609,7 @@ public partial interface IAppServicePlansOperations /// /// Thrown when a required parameter is null /// - Task> GetVnetFromServerFarmWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetVnetFromServerFarmWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a Virtual Network gateway. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs new file mode 100644 index 0000000000000..74cc890d93065 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs @@ -0,0 +1,269 @@ +// +// 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; + + /// + /// ContainerAppsOperations operations. + /// + public partial interface IContainerAppsOperations + { + /// + /// Get the Container Apps in a given 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 the Container Apps in a given 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 Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// 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)); + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + /// + /// 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, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// 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)); + /// + /// List secrets for a container app + /// + /// + /// Name of the Container App. + /// + /// + /// 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> ListSecretsWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create or update a Container App. + /// + /// + /// Description for Create or update a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// + /// + /// 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, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Container App. + /// + /// + /// Description for Delete a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// 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 the Container Apps in a given 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 the Container Apps in a given 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/IContainerAppsRevisionsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsRevisionsOperations.cs new file mode 100644 index 0000000000000..8ee1e8b86c6f7 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsRevisionsOperations.cs @@ -0,0 +1,177 @@ +// +// 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; + + /// + /// ContainerAppsRevisionsOperations operations. + /// + public partial interface IContainerAppsRevisionsOperations + { + /// + /// Get the Revisions for a given Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App for which Revisions are needed. + /// + /// + /// 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>> ListRevisionsWithHttpMessagesAsync(string resourceGroupName, string containerAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a revision of a Container App. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision. + /// + /// + /// 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> GetRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Activates a revision for a Container App + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to activate + /// + /// + /// 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 ActivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deactivates a revision for a Container App + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to deactivate + /// + /// + /// 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 DeactivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Restarts a revision for a Container App + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Container App. + /// + /// + /// Name of the Container App Revision to restart + /// + /// + /// 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 RestartRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the Revisions for a given Container App. + /// + /// + /// 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>> ListRevisionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs index 0c427952c932d..f32bfe677fe31 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs @@ -356,7 +356,7 @@ public partial interface IDiagnosticsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSiteDetectorsWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSiteDetectorsWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Detector /// @@ -390,7 +390,7 @@ public partial interface IDiagnosticsOperations /// /// Thrown when a required parameter is null /// - Task> GetSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Execute Detector /// @@ -723,7 +723,7 @@ public partial interface IDiagnosticsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSiteDetectorsSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSiteDetectorsSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Detector /// @@ -760,7 +760,7 @@ public partial interface IDiagnosticsOperations /// /// Thrown when a required parameter is null /// - Task> GetSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Execute Detector /// @@ -931,7 +931,7 @@ public partial interface IDiagnosticsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSiteDetectorsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSiteDetectorsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List Site Detector Responses /// @@ -1031,6 +1031,6 @@ public partial interface IDiagnosticsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSiteDetectorsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSiteDetectorsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs index e1aebe7efb728..71ccd739de276 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs @@ -448,6 +448,31 @@ public partial interface IDomainsOperations /// Task RenewWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Transfer out domain to another registrar + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of domain. + /// + /// + /// 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> TransferOutWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Creates or updates a domain. /// /// 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 d48729e3932cd..8d77f4eb927a0 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs @@ -758,6 +758,36 @@ public partial interface IWebAppsOperations /// Task> GetAuthSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets site's Authentication / Authorization settings for apps via + /// the V2 format + /// + /// + /// Description for Gets site's Authentication / Authorization settings + /// for apps via the V2 format + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// 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> GetAuthSettingsV2WithoutSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Updates site's Authentication / Authorization settings for apps via /// the V2 format /// @@ -2252,6 +2282,64 @@ public partial interface IWebAppsOperations /// Task> GetMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Invoke onedeploy status API /api/deployments and gets the + /// deployment status for the site + /// + /// + /// Description for Invoke onedeploy status API /api/deployments and + /// gets the deployment status for the site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// 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> GetOneDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Invoke the OneDeploy publish web app extension. + /// + /// + /// Description for Invoke the OneDeploy publish web app extension. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// 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> CreateOneDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List the functions for a web site, or a deployment slot. /// /// @@ -11693,7 +11781,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a virtual network the app (or deployment slot) is connected to /// by name. @@ -11730,7 +11818,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Adds a Virtual Network connection to an app or slot (PUT) or /// updates the connection properties (PATCH). @@ -11770,7 +11858,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a connection from an app (or deployment slot to a named /// virtual network. @@ -11844,7 +11932,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets an app's Virtual Network gateway. /// @@ -12697,7 +12785,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a virtual network the app (or deployment slot) is connected to /// by name. @@ -12730,7 +12818,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Adds a Virtual Network connection to an app or slot (PUT) or /// updates the connection properties (PATCH). @@ -12766,7 +12854,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a connection from an app (or deployment slot to a named /// virtual network. @@ -12832,7 +12920,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets an app's Virtual Network gateway. /// 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 3b43eb7611d80..4adbb7e0a2930 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs @@ -119,6 +119,16 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// ICertificatesOperations Certificates { get; } + /// + /// Gets the IContainerAppsOperations. + /// + IContainerAppsOperations ContainerApps { get; } + + /// + /// Gets the IContainerAppsRevisionsOperations. + /// + IContainerAppsRevisionsOperations ContainerAppsRevisions { get; } + /// /// Gets the IDeletedWebAppsOperations. /// @@ -164,27 +174,6 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// IWebAppsOperations WebApps { get; } - /// - /// Exchange code for GitHub access token for AppService CLI - /// - /// - /// Description for Exchange code for GitHub access token for - /// AppService CLI - /// - /// - /// Code string to exchange for Github Access token - /// - /// - /// State string used for verification. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> GenerateGithubAccessTokenForAppserviceCLIAsyncWithHttpMessagesAsync(string code, string state, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Gets publishing user /// @@ -315,6 +304,17 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, string type, bool? isFqdn = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get custom hostnames under this subscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task>> ListCustomHostNameSitesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets list of available geo regions plus ministamps /// @@ -520,6 +520,20 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// Task>> ListBillingMetersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get custom hostnames under this subscription + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task>> ListCustomHostNameSitesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get a list of available geographical regions. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs new file mode 100644 index 0000000000000..ec3e601a6a728 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs @@ -0,0 +1,22 @@ +// +// 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 +{ + + /// + /// Defines values for ActiveRevisionsMode. + /// + public static class ActiveRevisionsMode + { + public const string Multiple = "multiple"; + public const string Single = "single"; + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs index 7af8c086f3f38..482f69d644e2f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs @@ -10,15 +10,15 @@ 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; - [Rest.Serialization.JsonTransformation] - public partial class AllowedAudiencesValidation : ProxyOnlyResource + /// + /// The configuration settings of the Allowed Audiences validation flow. + /// + public partial class AllowedAudiencesValidation { /// /// Initializes a new instance of the AllowedAudiencesValidation class. @@ -31,12 +31,10 @@ public AllowedAudiencesValidation() /// /// Initializes a new instance of the AllowedAudiencesValidation class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public AllowedAudiencesValidation(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList allowedAudiences = default(IList)) - : base(id, name, kind, type) + /// The configuration settings of the + /// allowed list of audiences from which to validate the JWT + /// token. + public AllowedAudiencesValidation(IList allowedAudiences = default(IList)) { AllowedAudiences = allowedAudiences; CustomInit(); @@ -48,8 +46,10 @@ public AllowedAudiencesValidation() partial void CustomInit(); /// + /// Gets or sets the configuration settings of the allowed list of + /// audiences from which to validate the JWT token. /// - [JsonProperty(PropertyName = "properties.allowedAudiences")] + [JsonProperty(PropertyName = "allowedAudiences")] public IList AllowedAudiences { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs new file mode 100644 index 0000000000000..c7a907bf8b498 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs @@ -0,0 +1,63 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The configuration settings of the Azure Active Directory allowed + /// principals. + /// + public partial class AllowedPrincipals + { + /// + /// Initializes a new instance of the AllowedPrincipals class. + /// + public AllowedPrincipals() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AllowedPrincipals class. + /// + /// The list of the allowed groups. + /// The list of the allowed + /// identities. + public AllowedPrincipals(IList groups = default(IList), IList identities = default(IList)) + { + Groups = groups; + Identities = identities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of the allowed groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Gets or sets the list of the allowed identities. + /// + [JsonProperty(PropertyName = "identities")] + public IList Identities { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs index ded5ddc3c77cf..54ddc2043ed42 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the app registration for providers that /// have app ids and app secrets /// - [Rest.Serialization.JsonTransformation] - public partial class AppRegistration : ProxyOnlyResource + public partial class AppRegistration { /// /// Initializes a new instance of the AppRegistration class. @@ -33,15 +30,10 @@ public AppRegistration() /// /// Initializes a new instance of the AppRegistration class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The App ID of the app used for login. /// The app setting name that /// contains the app secret. - public AppRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string appId = default(string), string appSecretSettingName = default(string)) - : base(id, name, kind, type) + public AppRegistration(string appId = default(string), string appSecretSettingName = default(string)) { AppId = appId; AppSecretSettingName = appSecretSettingName; @@ -56,13 +48,13 @@ public AppRegistration() /// /// Gets or sets the App ID of the app used for login. /// - [JsonProperty(PropertyName = "properties.appId")] + [JsonProperty(PropertyName = "appId")] public string AppId { get; set; } /// /// Gets or sets the app setting name that contains the app secret. /// - [JsonProperty(PropertyName = "properties.appSecretSettingName")] + [JsonProperty(PropertyName = "appSecretSettingName")] public string AppSecretSettingName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs index 312d9255fffd9..58cd6e695e990 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs @@ -67,7 +67,9 @@ public AppServiceEnvironment() /// Flag that displays whether an ASE has /// linux workers or not /// Dedicated Host Count - public AppServiceEnvironment(VirtualNetworkProfile virtualNetwork, ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?)) + /// Whether or not this App Service + /// Environment is zone-redundant. + public AppServiceEnvironment(VirtualNetworkProfile virtualNetwork, ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? zoneRedundant = default(bool?)) { ProvisioningState = provisioningState; Status = status; @@ -84,6 +86,7 @@ public AppServiceEnvironment() UserWhitelistedIpRanges = userWhitelistedIpRanges; HasLinuxWorkers = hasLinuxWorkers; DedicatedHostCount = dedicatedHostCount; + ZoneRedundant = zoneRedundant; CustomInit(); } @@ -189,10 +192,17 @@ public AppServiceEnvironment() public bool? HasLinuxWorkers { get; private set; } /// - /// Gets dedicated Host Count + /// Gets or sets dedicated Host Count /// [JsonProperty(PropertyName = "dedicatedHostCount")] - public int? DedicatedHostCount { get; private set; } + public int? DedicatedHostCount { get; set; } + + /// + /// Gets or sets whether or not this App Service Environment is + /// zone-redundant. + /// + [JsonProperty(PropertyName = "zoneRedundant")] + public bool? ZoneRedundant { get; set; } /// /// Validate the object. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs index 724562c731b2c..261e17cc4c7ae 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs @@ -75,7 +75,9 @@ public AppServiceEnvironmentPatchResource() /// Flag that displays whether an ASE has /// linux workers or not /// Dedicated Host Count - public AppServiceEnvironmentPatchResource(VirtualNetworkProfile virtualNetwork, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?)) + /// Whether or not this App Service + /// Environment is zone-redundant. + public AppServiceEnvironmentPatchResource(VirtualNetworkProfile virtualNetwork, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? zoneRedundant = default(bool?)) : base(id, name, kind, type) { ProvisioningState = provisioningState; @@ -93,6 +95,7 @@ public AppServiceEnvironmentPatchResource() UserWhitelistedIpRanges = userWhitelistedIpRanges; HasLinuxWorkers = hasLinuxWorkers; DedicatedHostCount = dedicatedHostCount; + ZoneRedundant = zoneRedundant; CustomInit(); } @@ -198,10 +201,17 @@ public AppServiceEnvironmentPatchResource() public bool? HasLinuxWorkers { get; private set; } /// - /// Gets dedicated Host Count + /// Gets or sets dedicated Host Count /// [JsonProperty(PropertyName = "properties.dedicatedHostCount")] - public int? DedicatedHostCount { get; private set; } + public int? DedicatedHostCount { get; set; } + + /// + /// Gets or sets whether or not this App Service Environment is + /// zone-redundant. + /// + [JsonProperty(PropertyName = "properties.zoneRedundant")] + public bool? ZoneRedundant { get; set; } /// /// Validate the object. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs index 25cb6fbebdb6b..97d49000082f3 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs @@ -77,7 +77,9 @@ public AppServiceEnvironmentResource() /// Flag that displays whether an ASE has /// linux workers or not /// Dedicated Host Count - public AppServiceEnvironmentResource(string location, VirtualNetworkProfile virtualNetwork, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?)) + /// Whether or not this App Service + /// Environment is zone-redundant. + public AppServiceEnvironmentResource(string location, VirtualNetworkProfile virtualNetwork, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? zoneRedundant = default(bool?)) : base(location, id, name, kind, type, tags) { ProvisioningState = provisioningState; @@ -95,6 +97,7 @@ public AppServiceEnvironmentResource() UserWhitelistedIpRanges = userWhitelistedIpRanges; HasLinuxWorkers = hasLinuxWorkers; DedicatedHostCount = dedicatedHostCount; + ZoneRedundant = zoneRedundant; CustomInit(); } @@ -200,10 +203,17 @@ public AppServiceEnvironmentResource() public bool? HasLinuxWorkers { get; private set; } /// - /// Gets dedicated Host Count + /// Gets or sets dedicated Host Count /// [JsonProperty(PropertyName = "properties.dedicatedHostCount")] - public int? DedicatedHostCount { get; private set; } + public int? DedicatedHostCount { get; set; } + + /// + /// Gets or sets whether or not this App Service Environment is + /// zone-redundant. + /// + [JsonProperty(PropertyName = "properties.zoneRedundant")] + public bool? ZoneRedundant { get; set; } /// /// Validate the object. 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 99df81c6036c4..5fe15c31b85f0 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 @@ -87,7 +87,11 @@ 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?), 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)) + /// If <code>true</code>, this + /// App Service Plan will perform availability zone balancing. + /// If <code>false</code>, this App Service Plan will not + /// perform availability zone balancing. + 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), bool? zoneRedundant = default(bool?), SkuDescription sku = default(SkuDescription), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, kind, type, tags) { WorkerTierName = workerTierName; @@ -111,6 +115,7 @@ public AppServicePlan() TargetWorkerSizeId = targetWorkerSizeId; ProvisioningState = provisioningState; KubeEnvironmentProfile = kubeEnvironmentProfile; + ZoneRedundant = zoneRedundant; Sku = sku; ExtendedLocation = extendedLocation; CustomInit(); @@ -266,6 +271,15 @@ public AppServicePlan() [JsonProperty(PropertyName = "properties.kubeEnvironmentProfile")] public KubeEnvironmentProfile KubeEnvironmentProfile { get; set; } + /// + /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, this + /// App Service Plan will perform availability zone balancing. + /// If &lt;code&gt;false&lt;/code&gt;, this App Service + /// Plan will not perform availability zone balancing. + /// + [JsonProperty(PropertyName = "properties.zoneRedundant")] + public bool? ZoneRedundant { get; set; } + /// /// [JsonProperty(PropertyName = "sku")] 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 418fba09030aa..c9c12ad353ac7 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 @@ -85,7 +85,11 @@ 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?), 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)) + /// If <code>true</code>, this + /// App Service Plan will perform availability zone balancing. + /// If <code>false</code>, this App Service Plan will not + /// perform availability zone balancing. + 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), bool? zoneRedundant = default(bool?)) : base(id, name, kind, type) { WorkerTierName = workerTierName; @@ -109,6 +113,7 @@ public AppServicePlanPatchResource() TargetWorkerSizeId = targetWorkerSizeId; ProvisioningState = provisioningState; KubeEnvironmentProfile = kubeEnvironmentProfile; + ZoneRedundant = zoneRedundant; CustomInit(); } @@ -262,5 +267,14 @@ public AppServicePlanPatchResource() [JsonProperty(PropertyName = "properties.kubeEnvironmentProfile")] public KubeEnvironmentProfile KubeEnvironmentProfile { get; set; } + /// + /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, this + /// App Service Plan will perform availability zone balancing. + /// If &lt;code&gt;false&lt;/code&gt;, this App Service + /// Plan will not perform availability zone balancing. + /// + [JsonProperty(PropertyName = "properties.zoneRedundant")] + public bool? ZoneRedundant { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs index 899a3bad46e90..43a78bbe7c7b7 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the Apple provider. /// - [Rest.Serialization.JsonTransformation] - public partial class Apple : ProxyOnlyResource + public partial class Apple { /// /// Initializes a new instance of the Apple class. @@ -32,10 +29,6 @@ public Apple() /// /// Initializes a new instance of the Apple class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the Apple /// provider should not be enabled despite the set registration; /// otherwise, <code>true</code>. @@ -43,8 +36,7 @@ public Apple() /// registration. /// The configuration settings of the login /// flow. - public Apple(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), AppleRegistration registration = default(AppleRegistration), LoginScopes login = default(LoginScopes)) - : base(id, name, kind, type) + public Apple(bool? enabled = default(bool?), AppleRegistration registration = default(AppleRegistration), LoginScopes login = default(LoginScopes)) { Enabled = enabled; Registration = registration; @@ -62,19 +54,19 @@ public Apple() /// Apple provider should not be enabled despite the set registration; /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the Apple registration. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public AppleRegistration Registration { get; set; } /// /// Gets or sets the configuration settings of the login flow. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public LoginScopes Login { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs index 7de4212f76b34..146ad5b1d8dff 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the registration for the Apple provider /// - [Rest.Serialization.JsonTransformation] - public partial class AppleRegistration : ProxyOnlyResource + public partial class AppleRegistration { /// /// Initializes a new instance of the AppleRegistration class. @@ -32,16 +29,11 @@ public AppleRegistration() /// /// Initializes a new instance of the AppleRegistration class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The Client ID of the app used for /// login. /// The app setting name that /// contains the client secret. - public AppleRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string clientId = default(string), string clientSecretSettingName = default(string)) - : base(id, name, kind, type) + public AppleRegistration(string clientId = default(string), string clientSecretSettingName = default(string)) { ClientId = clientId; ClientSecretSettingName = clientSecretSettingName; @@ -56,13 +48,13 @@ public AppleRegistration() /// /// Gets or sets the Client ID of the app used for login. /// - [JsonProperty(PropertyName = "properties.clientId")] + [JsonProperty(PropertyName = "clientId")] public string ClientId { get; set; } /// /// Gets or sets the app setting name that contains the client secret. /// - [JsonProperty(PropertyName = "properties.clientSecretSettingName")] + [JsonProperty(PropertyName = "clientSecretSettingName")] public string ClientSecretSettingName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs index 57dca6849502e..2e0798e1f3bf5 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs @@ -42,11 +42,13 @@ public AseV3NetworkingConfiguration() /// Resource type. /// Property to enable /// and disable new private endpoint connection creation on ASE - public AseV3NetworkingConfiguration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList windowsOutboundIpAddresses = default(IList), IList linuxOutboundIpAddresses = default(IList), bool? allowNewPrivateEndpointConnections = default(bool?)) + public AseV3NetworkingConfiguration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList windowsOutboundIpAddresses = default(IList), IList linuxOutboundIpAddresses = default(IList), IList externalInboundIpAddresses = default(IList), IList internalInboundIpAddresses = default(IList), bool? allowNewPrivateEndpointConnections = default(bool?)) : base(id, name, kind, type) { WindowsOutboundIpAddresses = windowsOutboundIpAddresses; LinuxOutboundIpAddresses = linuxOutboundIpAddresses; + ExternalInboundIpAddresses = externalInboundIpAddresses; + InternalInboundIpAddresses = internalInboundIpAddresses; AllowNewPrivateEndpointConnections = allowNewPrivateEndpointConnections; CustomInit(); } @@ -66,6 +68,16 @@ public AseV3NetworkingConfiguration() [JsonProperty(PropertyName = "properties.linuxOutboundIpAddresses")] public IList LinuxOutboundIpAddresses { get; private set; } + /// + /// + [JsonProperty(PropertyName = "properties.externalInboundIpAddresses")] + public IList ExternalInboundIpAddresses { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "properties.internalInboundIpAddresses")] + public IList InternalInboundIpAddresses { get; private set; } + /// /// Gets or sets property to enable and disable new private endpoint /// connection creation on ASE diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs index fc7e0949a009c..1a0baed9b5ce2 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the platform of App Service /// Authentication/Authorization. /// - [Rest.Serialization.JsonTransformation] - public partial class AuthPlatform : ProxyOnlyResource + public partial class AuthPlatform { /// /// Initializes a new instance of the AuthPlatform class. @@ -33,10 +30,6 @@ public AuthPlatform() /// /// Initializes a new instance of the AuthPlatform class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>true</code> if the /// Authentication / Authorization feature is enabled for the current /// app; otherwise, <code>false</code>. @@ -48,8 +41,7 @@ public AuthPlatform() /// auth settings if they come from a file. /// If the path is relative, base will the site's root /// directory. - public AuthPlatform(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), string runtimeVersion = default(string), string configFilePath = default(string)) - : base(id, name, kind, type) + public AuthPlatform(bool? enabled = default(bool?), string runtimeVersion = default(string), string configFilePath = default(string)) { Enabled = enabled; RuntimeVersion = runtimeVersion; @@ -67,7 +59,7 @@ public AuthPlatform() /// Authentication / Authorization feature is enabled for the current /// app; otherwise, &lt;code&gt;false&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// @@ -76,7 +68,7 @@ public AuthPlatform() /// The setting in this value can control the behavior of certain /// features in the Authentication / Authorization module. /// - [JsonProperty(PropertyName = "properties.runtimeVersion")] + [JsonProperty(PropertyName = "runtimeVersion")] public string RuntimeVersion { get; set; } /// @@ -84,7 +76,7 @@ public AuthPlatform() /// if they come from a file. /// If the path is relative, base will the site's root directory. /// - [JsonProperty(PropertyName = "properties.configFilePath")] + [JsonProperty(PropertyName = "configFilePath")] public string ConfigFilePath { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs index 4c5adc65d09f1..657115f7de5e8 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the Azure Active directory provider. /// - [Rest.Serialization.JsonTransformation] - public partial class AzureActiveDirectory : ProxyOnlyResource + public partial class AzureActiveDirectory { /// /// Initializes a new instance of the AzureActiveDirectory class. @@ -32,10 +29,6 @@ public AzureActiveDirectory() /// /// Initializes a new instance of the AzureActiveDirectory class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the Azure /// Active Directory provider should not be enabled despite the set /// registration; otherwise, <code>true</code>. @@ -51,8 +44,7 @@ public AzureActiveDirectory() /// This is an internal flag primarily intended to support the Azure /// Management Portal. Users should not /// read or write to this property. - public AzureActiveDirectory(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), AzureActiveDirectoryRegistration registration = default(AzureActiveDirectoryRegistration), AzureActiveDirectoryLogin login = default(AzureActiveDirectoryLogin), AzureActiveDirectoryValidation validation = default(AzureActiveDirectoryValidation), bool? isAutoProvisioned = default(bool?)) - : base(id, name, kind, type) + public AzureActiveDirectory(bool? enabled = default(bool?), AzureActiveDirectoryRegistration registration = default(AzureActiveDirectoryRegistration), AzureActiveDirectoryLogin login = default(AzureActiveDirectoryLogin), AzureActiveDirectoryValidation validation = default(AzureActiveDirectoryValidation), bool? isAutoProvisioned = default(bool?)) { Enabled = enabled; Registration = registration; @@ -73,28 +65,28 @@ public AzureActiveDirectory() /// set registration; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the Azure Active /// Directory app registration. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public AzureActiveDirectoryRegistration Registration { get; set; } /// /// Gets or sets the configuration settings of the Azure Active /// Directory login flow. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public AzureActiveDirectoryLogin Login { get; set; } /// /// Gets or sets the configuration settings of the Azure Active /// Directory token validation flow. /// - [JsonProperty(PropertyName = "properties.validation")] + [JsonProperty(PropertyName = "validation")] public AzureActiveDirectoryValidation Validation { get; set; } /// @@ -104,7 +96,7 @@ public AzureActiveDirectory() /// Management Portal. Users should not /// read or write to this property. /// - [JsonProperty(PropertyName = "properties.isAutoProvisioned")] + [JsonProperty(PropertyName = "isAutoProvisioned")] public bool? IsAutoProvisioned { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs index 5f18bf96b2fe0..8486ec2916c9c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -20,8 +18,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// /// The configuration settings of the Azure Active Directory login flow. /// - [Rest.Serialization.JsonTransformation] - public partial class AzureActiveDirectoryLogin : ProxyOnlyResource + public partial class AzureActiveDirectoryLogin { /// /// Initializes a new instance of the AzureActiveDirectoryLogin class. @@ -34,19 +31,17 @@ public AzureActiveDirectoryLogin() /// /// Initializes a new instance of the AzureActiveDirectoryLogin class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// Login parameters to send to the /// OpenID Connect authorization endpoint when /// a user logs in. Each parameter must be in the form /// "key=value". - public AzureActiveDirectoryLogin(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? disableWWWAuthenticate = default(bool?), IList loginParameters = default(IList)) - : base(id, name, kind, type) + /// <code>true</code> + /// if the www-authenticate provider should be omitted from the + /// request; otherwise, <code>false</code>. + public AzureActiveDirectoryLogin(IList loginParameters = default(IList), bool? disableWWWAuthenticate = default(bool?)) { - DisableWWWAuthenticate = disableWWWAuthenticate; LoginParameters = loginParameters; + DisableWWWAuthenticate = disableWWWAuthenticate; CustomInit(); } @@ -55,18 +50,21 @@ public AzureActiveDirectoryLogin() /// partial void CustomInit(); - /// - /// - [JsonProperty(PropertyName = "properties.disableWWWAuthenticate")] - public bool? DisableWWWAuthenticate { get; set; } - /// /// Gets or sets login parameters to send to the OpenID Connect /// authorization endpoint when /// a user logs in. Each parameter must be in the form "key=value". /// - [JsonProperty(PropertyName = "properties.loginParameters")] + [JsonProperty(PropertyName = "loginParameters")] public IList LoginParameters { get; set; } + /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the + /// www-authenticate provider should be omitted from the request; + /// otherwise, &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "disableWWWAuthenticate")] + public bool? DisableWWWAuthenticate { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs index e8d86b417f10b..b6acd75158393 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the Azure Active Directory app /// registration. /// - [Rest.Serialization.JsonTransformation] - public partial class AzureActiveDirectoryRegistration : ProxyOnlyResource + public partial class AzureActiveDirectoryRegistration { /// /// Initializes a new instance of the AzureActiveDirectoryRegistration @@ -35,10 +32,6 @@ public AzureActiveDirectoryRegistration() /// Initializes a new instance of the AzureActiveDirectoryRegistration /// class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The OpenID Connect Issuer URI that /// represents the entity which issues access tokens for this /// application. @@ -62,13 +55,25 @@ public AzureActiveDirectoryRegistration() /// the client secret, that is the thumbprint of a certificate used for /// signing purposes. This property acts as /// a replacement for the Client Secret. It is also optional. - public AzureActiveDirectoryRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string openIdIssuer = default(string), string clientId = default(string), string clientSecretSettingName = default(string), string clientSecretCertificateThumbprint = default(string)) - : base(id, name, kind, type) + /// An + /// alternative to the client secret thumbprint, that is the subject + /// alternative name of a certificate used for signing purposes. This + /// property acts as + /// a replacement for the Client Secret Certificate Thumbprint. It is + /// also optional. + /// An alternative to the + /// client secret thumbprint, that is the issuer of a certificate used + /// for signing purposes. This property acts as + /// a replacement for the Client Secret Certificate Thumbprint. It is + /// also optional. + public AzureActiveDirectoryRegistration(string openIdIssuer = default(string), string clientId = default(string), string clientSecretSettingName = default(string), string clientSecretCertificateThumbprint = default(string), string clientSecretCertificateSubjectAlternativeName = default(string), string clientSecretCertificateIssuer = default(string)) { OpenIdIssuer = openIdIssuer; ClientId = clientId; ClientSecretSettingName = clientSecretSettingName; ClientSecretCertificateThumbprint = clientSecretCertificateThumbprint; + ClientSecretCertificateSubjectAlternativeName = clientSecretCertificateSubjectAlternativeName; + ClientSecretCertificateIssuer = clientSecretCertificateIssuer; CustomInit(); } @@ -87,7 +92,7 @@ public AzureActiveDirectoryRegistration() /// More information on OpenID Connect Discovery: /// http://openid.net/specs/openid-connect-discovery-1_0.html /// - [JsonProperty(PropertyName = "properties.openIdIssuer")] + [JsonProperty(PropertyName = "openIdIssuer")] public string OpenIdIssuer { get; set; } /// @@ -99,14 +104,14 @@ public AzureActiveDirectoryRegistration() /// More information on OpenID Connect: /// http://openid.net/specs/openid-connect-core-1_0.html /// - [JsonProperty(PropertyName = "properties.clientId")] + [JsonProperty(PropertyName = "clientId")] public string ClientId { get; set; } /// /// Gets or sets the app setting name that contains the client secret /// of the relying party application. /// - [JsonProperty(PropertyName = "properties.clientSecretSettingName")] + [JsonProperty(PropertyName = "clientSecretSettingName")] public string ClientSecretSettingName { get; set; } /// @@ -115,8 +120,28 @@ public AzureActiveDirectoryRegistration() /// property acts as /// a replacement for the Client Secret. It is also optional. /// - [JsonProperty(PropertyName = "properties.clientSecretCertificateThumbprint")] + [JsonProperty(PropertyName = "clientSecretCertificateThumbprint")] public string ClientSecretCertificateThumbprint { get; set; } + /// + /// Gets or sets an alternative to the client secret thumbprint, that + /// is the subject alternative name of a certificate used for signing + /// purposes. This property acts as + /// a replacement for the Client Secret Certificate Thumbprint. It is + /// also optional. + /// + [JsonProperty(PropertyName = "clientSecretCertificateSubjectAlternativeName")] + public string ClientSecretCertificateSubjectAlternativeName { get; set; } + + /// + /// Gets or sets an alternative to the client secret thumbprint, that + /// is the issuer of a certificate used for signing purposes. This + /// property acts as + /// a replacement for the Client Secret Certificate Thumbprint. It is + /// also optional. + /// + [JsonProperty(PropertyName = "clientSecretCertificateIssuer")] + public string ClientSecretCertificateIssuer { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs index 3b81d7a90c8b1..5cb5944d7f1ac 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the Azure Active Directory token /// validation flow. /// - [Rest.Serialization.JsonTransformation] - public partial class AzureActiveDirectoryValidation : ProxyOnlyResource + public partial class AzureActiveDirectoryValidation { /// /// Initializes a new instance of the AzureActiveDirectoryValidation @@ -37,19 +34,17 @@ public AzureActiveDirectoryValidation() /// Initializes a new instance of the AzureActiveDirectoryValidation /// class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The configuration settings of the /// checks that should be made while validating the JWT Claims. /// The list of audiences that can make /// successful authentication/authorization requests. - public AzureActiveDirectoryValidation(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), JwtClaimChecks jwtClaimChecks = default(JwtClaimChecks), IList allowedAudiences = default(IList)) - : base(id, name, kind, type) + /// The configuration settings + /// of the default authorization policy. + public AzureActiveDirectoryValidation(JwtClaimChecks jwtClaimChecks = default(JwtClaimChecks), IList allowedAudiences = default(IList), DefaultAuthorizationPolicy defaultAuthorizationPolicy = default(DefaultAuthorizationPolicy)) { JwtClaimChecks = jwtClaimChecks; AllowedAudiences = allowedAudiences; + DefaultAuthorizationPolicy = defaultAuthorizationPolicy; CustomInit(); } @@ -62,15 +57,22 @@ public AzureActiveDirectoryValidation() /// Gets or sets the configuration settings of the checks that should /// be made while validating the JWT Claims. /// - [JsonProperty(PropertyName = "properties.jwtClaimChecks")] + [JsonProperty(PropertyName = "jwtClaimChecks")] public JwtClaimChecks JwtClaimChecks { get; set; } /// /// Gets or sets the list of audiences that can make successful /// authentication/authorization requests. /// - [JsonProperty(PropertyName = "properties.allowedAudiences")] + [JsonProperty(PropertyName = "allowedAudiences")] public IList AllowedAudiences { get; set; } + /// + /// Gets or sets the configuration settings of the default + /// authorization policy. + /// + [JsonProperty(PropertyName = "defaultAuthorizationPolicy")] + public DefaultAuthorizationPolicy DefaultAuthorizationPolicy { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs index 46b15f3424248..402802981d6a5 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the Azure Static Web Apps provider. /// - [Rest.Serialization.JsonTransformation] - public partial class AzureStaticWebApps : ProxyOnlyResource + public partial class AzureStaticWebApps { /// /// Initializes a new instance of the AzureStaticWebApps class. @@ -32,17 +29,12 @@ public AzureStaticWebApps() /// /// Initializes a new instance of the AzureStaticWebApps class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the Azure /// Static Web Apps provider should not be enabled despite the set /// registration; otherwise, <code>true</code>. /// The configuration settings of the Azure /// Static Web Apps registration. - public AzureStaticWebApps(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), AzureStaticWebAppsRegistration registration = default(AzureStaticWebAppsRegistration)) - : base(id, name, kind, type) + public AzureStaticWebApps(bool? enabled = default(bool?), AzureStaticWebAppsRegistration registration = default(AzureStaticWebAppsRegistration)) { Enabled = enabled; Registration = registration; @@ -60,14 +52,14 @@ public AzureStaticWebApps() /// set registration; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the Azure Static Web /// Apps registration. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public AzureStaticWebAppsRegistration Registration { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs index 7f65e2ba278de..efecde9415301 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the registration for the Azure Static Web /// Apps provider /// - [Rest.Serialization.JsonTransformation] - public partial class AzureStaticWebAppsRegistration : ProxyOnlyResource + public partial class AzureStaticWebAppsRegistration { /// /// Initializes a new instance of the AzureStaticWebAppsRegistration @@ -35,14 +32,9 @@ public AzureStaticWebAppsRegistration() /// Initializes a new instance of the AzureStaticWebAppsRegistration /// class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The Client ID of the app used for /// login. - public AzureStaticWebAppsRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string clientId = default(string)) - : base(id, name, kind, type) + public AzureStaticWebAppsRegistration(string clientId = default(string)) { ClientId = clientId; CustomInit(); @@ -56,7 +48,7 @@ public AzureStaticWebAppsRegistration() /// /// Gets or sets the Client ID of the app used for login. /// - [JsonProperty(PropertyName = "properties.clientId")] + [JsonProperty(PropertyName = "clientId")] public string ClientId { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs index 312e424b75d5b..24de4ad0da649 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the storage of the tokens if blob storage /// is used. /// - [Rest.Serialization.JsonTransformation] - public partial class BlobStorageTokenStore : ProxyOnlyResource + public partial class BlobStorageTokenStore { /// /// Initializes a new instance of the BlobStorageTokenStore class. @@ -33,15 +30,10 @@ public BlobStorageTokenStore() /// /// Initializes a new instance of the BlobStorageTokenStore class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The name of the app setting /// containing the SAS URL of the blob storage containing the /// tokens. - public BlobStorageTokenStore(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string sasUrlSettingName = default(string)) - : base(id, name, kind, type) + public BlobStorageTokenStore(string sasUrlSettingName = default(string)) { SasUrlSettingName = sasUrlSettingName; CustomInit(); @@ -56,7 +48,7 @@ public BlobStorageTokenStore() /// Gets or sets the name of the app setting containing the SAS URL of /// the blob storage containing the tokens. /// - [JsonProperty(PropertyName = "properties.sasUrlSettingName")] + [JsonProperty(PropertyName = "sasUrlSettingName")] public string SasUrlSettingName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs index 53c9e5bc455fd..136b29101b95f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the app registration for providers that /// have client ids and client secrets /// - [Rest.Serialization.JsonTransformation] - public partial class ClientRegistration : ProxyOnlyResource + public partial class ClientRegistration { /// /// Initializes a new instance of the ClientRegistration class. @@ -33,16 +30,11 @@ public ClientRegistration() /// /// Initializes a new instance of the ClientRegistration class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The Client ID of the app used for /// login. /// The app setting name that /// contains the client secret. - public ClientRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string clientId = default(string), string clientSecretSettingName = default(string)) - : base(id, name, kind, type) + public ClientRegistration(string clientId = default(string), string clientSecretSettingName = default(string)) { ClientId = clientId; ClientSecretSettingName = clientSecretSettingName; @@ -57,13 +49,13 @@ public ClientRegistration() /// /// Gets or sets the Client ID of the app used for login. /// - [JsonProperty(PropertyName = "properties.clientId")] + [JsonProperty(PropertyName = "clientId")] public string ClientId { get; set; } /// /// Gets or sets the app setting name that contains the client secret. /// - [JsonProperty(PropertyName = "properties.clientSecretSettingName")] + [JsonProperty(PropertyName = "clientSecretSettingName")] public string ClientSecretSettingName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs new file mode 100644 index 0000000000000..18e87b06e5e88 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs @@ -0,0 +1,95 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Non versioned Container App configuration properties that define the + /// mutable settings of a Container app + /// + public partial class Configuration + { + /// + /// Initializes a new instance of the Configuration class. + /// + public Configuration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Configuration class. + /// + /// Collection of secrets used by a Container + /// app + /// ActiveRevisionsMode controls how + /// active revisions are handled for the Container app: + /// <list><item>Multiple: multiple revisions can be active. + /// If no value if provided, this is the + /// default</item><item>Single: Only one revision can be + /// active at a time. Revision weights can not be used in this + /// mode</item></list>. Possible values include: + /// 'multiple', 'single' + /// Ingress configurations. + /// Collection of private container registry + /// credentials for containers used by the Container app + public Configuration(IList secrets = default(IList), string activeRevisionsMode = default(string), Ingress ingress = default(Ingress), IList registries = default(IList)) + { + Secrets = secrets; + ActiveRevisionsMode = activeRevisionsMode; + Ingress = ingress; + Registries = registries; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets collection of secrets used by a Container app + /// + [JsonProperty(PropertyName = "secrets")] + public IList Secrets { get; set; } + + /// + /// Gets or sets activeRevisionsMode controls how active revisions are + /// handled for the Container app: + /// &lt;list&gt;&lt;item&gt;Multiple: multiple + /// revisions can be active. If no value if provided, this is the + /// default&lt;/item&gt;&lt;item&gt;Single: Only one + /// revision can be active at a time. Revision weights can not be used + /// in this mode&lt;/item&gt;&lt;/list&gt;. Possible + /// values include: 'multiple', 'single' + /// + [JsonProperty(PropertyName = "activeRevisionsMode")] + public string ActiveRevisionsMode { get; set; } + + /// + /// Gets or sets ingress configurations. + /// + [JsonProperty(PropertyName = "ingress")] + public Ingress Ingress { get; set; } + + /// + /// Gets or sets collection of private container registry credentials + /// for containers used by the Container app + /// + [JsonProperty(PropertyName = "registries")] + public IList Registries { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs new file mode 100644 index 0000000000000..97d7641d3cae8 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs @@ -0,0 +1,93 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App container definition. + /// + public partial class Container + { + /// + /// Initializes a new instance of the Container class. + /// + public Container() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Container class. + /// + /// Container image tag. + /// Custom container name. + /// Container start command. + /// Container start command arguments. + /// Container environment variables. + /// Container resource requirements. + public Container(string image = default(string), string name = default(string), IList command = default(IList), IList args = default(IList), IList env = default(IList), ContainerResources resources = default(ContainerResources)) + { + Image = image; + Name = name; + Command = command; + Args = args; + Env = env; + Resources = resources; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets container image tag. + /// + [JsonProperty(PropertyName = "image")] + public string Image { get; set; } + + /// + /// Gets or sets custom container name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets container start command. + /// + [JsonProperty(PropertyName = "command")] + public IList Command { get; set; } + + /// + /// Gets or sets container start command arguments. + /// + [JsonProperty(PropertyName = "args")] + public IList Args { get; set; } + + /// + /// Gets or sets container environment variables. + /// + [JsonProperty(PropertyName = "env")] + public IList Env { get; set; } + + /// + /// Gets or sets container resource requirements. + /// + [JsonProperty(PropertyName = "resources")] + public ContainerResources Resources { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs new file mode 100644 index 0000000000000..4a623248f69c0 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs @@ -0,0 +1,122 @@ +// +// 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; + + /// + /// Container App. + /// + [Rest.Serialization.JsonTransformation] + public partial class ContainerApp : Resource + { + /// + /// Initializes a new instance of the ContainerApp class. + /// + public ContainerApp() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContainerApp class. + /// + /// Resource Location. + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Resource tags. + /// Provisioning state of the Container + /// App. Possible values include: 'InProgress', 'Succeeded', 'Failed', + /// 'Canceled' + /// Resource ID of the Container App's + /// KubeEnvironment. + /// Name of the latest revision of the + /// Container App. + /// Fully Qualified Domain Name of the + /// latest revision of the Container App. + /// Non versioned Container App + /// configuration properties. + /// Container App versioned application + /// definition. + public ContainerApp(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string kubeEnvironmentId = default(string), string latestRevisionName = default(string), string latestRevisionFqdn = default(string), Configuration configuration = default(Configuration), Template template = default(Template)) + : base(location, id, name, kind, type, tags) + { + ProvisioningState = provisioningState; + KubeEnvironmentId = kubeEnvironmentId; + LatestRevisionName = latestRevisionName; + LatestRevisionFqdn = latestRevisionFqdn; + Configuration = configuration; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets provisioning state of the Container App. Possible values + /// include: 'InProgress', 'Succeeded', 'Failed', 'Canceled' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets resource ID of the Container App's KubeEnvironment. + /// + [JsonProperty(PropertyName = "properties.kubeEnvironmentId")] + public string KubeEnvironmentId { get; set; } + + /// + /// Gets name of the latest revision of the Container App. + /// + [JsonProperty(PropertyName = "properties.latestRevisionName")] + public string LatestRevisionName { get; private set; } + + /// + /// Gets fully Qualified Domain Name of the latest revision of the + /// Container App. + /// + [JsonProperty(PropertyName = "properties.latestRevisionFqdn")] + public string LatestRevisionFqdn { get; private set; } + + /// + /// Gets or sets non versioned Container App configuration properties. + /// + [JsonProperty(PropertyName = "properties.configuration")] + public Configuration Configuration { get; set; } + + /// + /// Gets or sets container App versioned application definition. + /// + [JsonProperty(PropertyName = "properties.template")] + public Template Template { 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/ContainerAppProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppProvisioningState.cs new file mode 100644 index 0000000000000..e660bcd4f0a0c --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppProvisioningState.cs @@ -0,0 +1,24 @@ +// +// 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 +{ + + /// + /// Defines values for ContainerAppProvisioningState. + /// + public static class ContainerAppProvisioningState + { + public const string InProgress = "InProgress"; + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Canceled = "Canceled"; + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.cs new file mode 100644 index 0000000000000..d32a26a99e63c --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.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; + + /// + /// Container App Secret. + /// + public partial class ContainerAppSecret + { + /// + /// Initializes a new instance of the ContainerAppSecret class. + /// + public ContainerAppSecret() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContainerAppSecret class. + /// + /// Secret Name. + /// Secret Value. + public ContainerAppSecret(string name = default(string), string value = default(string)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets secret Name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets secret Value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs new file mode 100644 index 0000000000000..2742ff26f47a4 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs @@ -0,0 +1,118 @@ +// +// 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 ContainerAppsConfiguration + { + /// + /// Initializes a new instance of the ContainerAppsConfiguration class. + /// + public ContainerAppsConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContainerAppsConfiguration class. + /// + /// Azure Monitor + /// instrumentation key used by Dapr to export Service to Service + /// communication telemetry + /// IP range in CIDR notation that + /// can be reserved for environment infrastructure IP addresses. It + /// must not overlap with any other Subnet IP ranges. + /// An IP address from the IP range + /// defined by platformReservedCidr that will be reserved for the + /// internal DNS server + /// Resource ID of a subnet + /// for control plane infrastructure components. This subnet must be in + /// the same VNET as the subnet defined in appSubnetResourceId. Must + /// not overlap with the IP range defined in platformReservedCidr, if + /// defined. + /// Resource ID of a subnet for + /// control plane infrastructure components. This subnet must be in the + /// same VNET as the subnet defined in appSubnetResourceId. Must not + /// overlap with the IP range defined in platformReservedCidr, if + /// defined. + /// CIDR notation IP range assigned to + /// the Docker bridge network. It must not overlap with any Subnet IP + /// ranges or the IP range defined in platformReservedCidr, if + /// defined. + public ContainerAppsConfiguration(string daprAIInstrumentationKey = default(string), string platformReservedCidr = default(string), string platformReservedDnsIP = default(string), string controlPlaneSubnetResourceId = default(string), string appSubnetResourceId = default(string), string dockerBridgeCidr = default(string)) + { + DaprAIInstrumentationKey = daprAIInstrumentationKey; + PlatformReservedCidr = platformReservedCidr; + PlatformReservedDnsIP = platformReservedDnsIP; + ControlPlaneSubnetResourceId = controlPlaneSubnetResourceId; + AppSubnetResourceId = appSubnetResourceId; + DockerBridgeCidr = dockerBridgeCidr; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure Monitor instrumentation key used by Dapr to + /// export Service to Service communication telemetry + /// + [JsonProperty(PropertyName = "daprAIInstrumentationKey")] + public string DaprAIInstrumentationKey { get; set; } + + /// + /// Gets or sets IP range in CIDR notation that can be reserved for + /// environment infrastructure IP addresses. It must not overlap with + /// any other Subnet IP ranges. + /// + [JsonProperty(PropertyName = "platformReservedCidr")] + public string PlatformReservedCidr { get; set; } + + /// + /// Gets or sets an IP address from the IP range defined by + /// platformReservedCidr that will be reserved for the internal DNS + /// server + /// + [JsonProperty(PropertyName = "platformReservedDnsIP")] + public string PlatformReservedDnsIP { get; set; } + + /// + /// Gets or sets resource ID of a subnet for control plane + /// infrastructure components. This subnet must be in the same VNET as + /// the subnet defined in appSubnetResourceId. Must not overlap with + /// the IP range defined in platformReservedCidr, if defined. + /// + [JsonProperty(PropertyName = "controlPlaneSubnetResourceId")] + public string ControlPlaneSubnetResourceId { get; set; } + + /// + /// Gets or sets resource ID of a subnet for control plane + /// infrastructure components. This subnet must be in the same VNET as + /// the subnet defined in appSubnetResourceId. Must not overlap with + /// the IP range defined in platformReservedCidr, if defined. + /// + [JsonProperty(PropertyName = "appSubnetResourceId")] + public string AppSubnetResourceId { get; set; } + + /// + /// Gets or sets CIDR notation IP range assigned to the Docker bridge + /// network. It must not overlap with any Subnet IP ranges or the IP + /// range defined in platformReservedCidr, if defined. + /// + [JsonProperty(PropertyName = "dockerBridgeCidr")] + public string DockerBridgeCidr { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.cs new file mode 100644 index 0000000000000..6385c6b328c46 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.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; + + /// + /// Container App container resource requirements. + /// + public partial class ContainerResources + { + /// + /// Initializes a new instance of the ContainerResources class. + /// + public ContainerResources() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContainerResources class. + /// + /// Required CPU in cores, e.g. 0.5 + /// Required memory, e.g. "250Mb" + public ContainerResources(double? cpu = default(double?), string memory = default(string)) + { + Cpu = cpu; + Memory = memory; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required CPU in cores, e.g. 0.5 + /// + [JsonProperty(PropertyName = "cpu")] + public double? Cpu { get; set; } + + /// + /// Gets or sets required memory, e.g. "250Mb" + /// + [JsonProperty(PropertyName = "memory")] + public string Memory { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs index 8c65dc7525917..89a992a8f4d53 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the session cookie's expiration. /// - [Rest.Serialization.JsonTransformation] - public partial class CookieExpiration : ProxyOnlyResource + public partial class CookieExpiration { /// /// Initializes a new instance of the CookieExpiration class. @@ -32,17 +29,12 @@ public CookieExpiration() /// /// Initializes a new instance of the CookieExpiration class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The convention used when determining the /// session cookie's expiration. Possible values include: 'FixedTime', /// 'IdentityProviderDerived' /// The time after the request is made /// when the session cookie should expire. - public CookieExpiration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), CookieExpirationConvention? convention = default(CookieExpirationConvention?), string timeToExpiration = default(string)) - : base(id, name, kind, type) + public CookieExpiration(CookieExpirationConvention? convention = default(CookieExpirationConvention?), string timeToExpiration = default(string)) { Convention = convention; TimeToExpiration = timeToExpiration; @@ -59,14 +51,14 @@ public CookieExpiration() /// cookie's expiration. Possible values include: 'FixedTime', /// 'IdentityProviderDerived' /// - [JsonProperty(PropertyName = "properties.convention")] + [JsonProperty(PropertyName = "convention")] public CookieExpirationConvention? Convention { get; set; } /// /// Gets or sets the time after the request is made when the session /// cookie should expire. /// - [JsonProperty(PropertyName = "properties.timeToExpiration")] + [JsonProperty(PropertyName = "timeToExpiration")] public string TimeToExpiration { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs new file mode 100644 index 0000000000000..7abbdf5c34213 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs @@ -0,0 +1,71 @@ +// +// 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 hostname and its assigned sites + /// + [Rest.Serialization.JsonTransformation] + public partial class CustomHostnameSites : ProxyOnlyResource + { + /// + /// Initializes a new instance of the CustomHostnameSites class. + /// + public CustomHostnameSites() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomHostnameSites class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + public CustomHostnameSites(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string customHostname = default(string), string region = default(string), IList siteResourceIds = default(IList)) + : base(id, name, kind, type) + { + CustomHostname = customHostname; + Region = region; + SiteResourceIds = siteResourceIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.customHostname")] + public string CustomHostname { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.region")] + public string Region { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.siteResourceIds")] + public IList SiteResourceIds { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs index 3a5ff17ecd4b0..9e3e3b998db08 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the custom Open ID Connect provider. /// - [Rest.Serialization.JsonTransformation] - public partial class CustomOpenIdConnectProvider : ProxyOnlyResource + public partial class CustomOpenIdConnectProvider { /// /// Initializes a new instance of the CustomOpenIdConnectProvider @@ -34,10 +31,6 @@ public CustomOpenIdConnectProvider() /// Initializes a new instance of the CustomOpenIdConnectProvider /// class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the custom /// Open ID provider provider should not be enabled; otherwise, /// <code>true</code>. @@ -45,8 +38,7 @@ public CustomOpenIdConnectProvider() /// registration for the custom Open ID Connect provider. /// The configuration settings of the login flow of /// the custom Open ID Connect provider. - public CustomOpenIdConnectProvider(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), OpenIdConnectRegistration registration = default(OpenIdConnectRegistration), OpenIdConnectLogin login = default(OpenIdConnectLogin)) - : base(id, name, kind, type) + public CustomOpenIdConnectProvider(bool? enabled = default(bool?), OpenIdConnectRegistration registration = default(OpenIdConnectRegistration), OpenIdConnectLogin login = default(OpenIdConnectLogin)) { Enabled = enabled; Registration = registration; @@ -64,21 +56,21 @@ public CustomOpenIdConnectProvider() /// custom Open ID provider provider should not be enabled; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the app registration for /// the custom Open ID Connect provider. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public OpenIdConnectRegistration Registration { get; set; } /// /// Gets or sets the configuration settings of the login flow of the /// custom Open ID Connect provider. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public OpenIdConnectLogin Login { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs new file mode 100644 index 0000000000000..ef8c7950ac3ff --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs @@ -0,0 +1,73 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App container Custom scaling rule. + /// + public partial class CustomScaleRule + { + /// + /// Initializes a new instance of the CustomScaleRule class. + /// + public CustomScaleRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomScaleRule class. + /// + /// Type of the custom scale rule + /// eg: azure-servicebus, redis etc. + /// Metadata properties to describe custom scale + /// rule. + /// Authentication secrets for the custom scale + /// rule. + public CustomScaleRule(string type = default(string), IDictionary metadata = default(IDictionary), IList auth = default(IList)) + { + Type = type; + Metadata = metadata; + Auth = auth; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets type of the custom scale rule + /// eg: azure-servicebus, redis etc. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets metadata properties to describe custom scale rule. + /// + [JsonProperty(PropertyName = "metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Gets or sets authentication secrets for the custom scale rule. + /// + [JsonProperty(PropertyName = "auth")] + public IList Auth { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs new file mode 100644 index 0000000000000..c93c37142977c --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs @@ -0,0 +1,78 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App Dapr configuration. + /// + public partial class Dapr + { + /// + /// Initializes a new instance of the Dapr class. + /// + public Dapr() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Dapr class. + /// + /// Boolean indicating if the Dapr side car is + /// enabled + /// Dapr application identifier + /// Port on which the Dapr side car + /// Collection of Dapr components + public Dapr(bool? enabled = default(bool?), string appId = default(string), int? appPort = default(int?), IList components = default(IList)) + { + Enabled = enabled; + AppId = appId; + AppPort = appPort; + Components = components; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets boolean indicating if the Dapr side car is enabled + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets dapr application identifier + /// + [JsonProperty(PropertyName = "appId")] + public string AppId { get; set; } + + /// + /// Gets or sets port on which the Dapr side car + /// + [JsonProperty(PropertyName = "appPort")] + public int? AppPort { get; set; } + + /// + /// Gets or sets collection of Dapr components + /// + [JsonProperty(PropertyName = "components")] + public IList Components { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs new file mode 100644 index 0000000000000..44c345f93ffa6 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs @@ -0,0 +1,77 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Dapr component configuration + /// + public partial class DaprComponent + { + /// + /// Initializes a new instance of the DaprComponent class. + /// + public DaprComponent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DaprComponent class. + /// + /// Component name + /// Component type + /// Component version + /// Component metadata + public DaprComponent(string name = default(string), string type = default(string), string version = default(string), IList metadata = default(IList)) + { + Name = name; + Type = type; + Version = version; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets component name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets component type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets component version + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or sets component metadata + /// + [JsonProperty(PropertyName = "metadata")] + public IList Metadata { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs new file mode 100644 index 0000000000000..8192119a780c4 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs @@ -0,0 +1,69 @@ +// +// 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; + + /// + /// Container App Dapr component metadata. + /// + public partial class DaprMetadata + { + /// + /// Initializes a new instance of the DaprMetadata class. + /// + public DaprMetadata() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DaprMetadata class. + /// + /// Metadata property name. + /// Metadata property value. + /// Name of the Container App secret from which + /// to pull the metadata property value. + public DaprMetadata(string name = default(string), string value = default(string), string secretRef = default(string)) + { + Name = name; + Value = value; + SecretRef = secretRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata property name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets metadata property value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets name of the Container App secret from which to pull + /// the metadata property value. + /// + [JsonProperty(PropertyName = "secretRef")] + public string SecretRef { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs new file mode 100644 index 0000000000000..4127dc17ef27f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs @@ -0,0 +1,66 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The configuration settings of the Azure Active Directory default + /// authorization policy. + /// + public partial class DefaultAuthorizationPolicy + { + /// + /// Initializes a new instance of the DefaultAuthorizationPolicy class. + /// + public DefaultAuthorizationPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DefaultAuthorizationPolicy class. + /// + /// The configuration settings of the + /// Azure Active Directory allowed principals. + /// The configuration settings of the + /// Azure Active Directory allowed applications. + public DefaultAuthorizationPolicy(AllowedPrincipals allowedPrincipals = default(AllowedPrincipals), IList allowedApplications = default(IList)) + { + AllowedPrincipals = allowedPrincipals; + AllowedApplications = allowedApplications; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the configuration settings of the Azure Active + /// Directory allowed principals. + /// + [JsonProperty(PropertyName = "allowedPrincipals")] + public AllowedPrincipals AllowedPrincipals { get; set; } + + /// + /// Gets or sets the configuration settings of the Azure Active + /// Directory allowed applications. + /// + [JsonProperty(PropertyName = "allowedApplications")] + public IList AllowedApplications { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs index bcccb400ddc88..19ffd3d12c0d9 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Class representing detector definition /// - [Rest.Serialization.JsonTransformation] - public partial class DetectorDefinition : ProxyOnlyResource + public partial class DetectorDefinition { /// /// Initializes a new instance of the DetectorDefinition class. @@ -32,17 +29,12 @@ public DetectorDefinition() /// /// Initializes a new instance of the DetectorDefinition class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// Display name of the detector /// Description of the detector /// Detector Rank /// Flag representing whether detector is /// enabled or not. - public DetectorDefinition(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string displayName = default(string), string description = default(string), double? rank = default(double?), bool? isEnabled = default(bool?)) - : base(id, name, kind, type) + public DetectorDefinition(string displayName = default(string), string description = default(string), double? rank = default(double?), bool? isEnabled = default(bool?)) { DisplayName = displayName; Description = description; @@ -59,25 +51,25 @@ public DetectorDefinition() /// /// Gets display name of the detector /// - [JsonProperty(PropertyName = "properties.displayName")] + [JsonProperty(PropertyName = "displayName")] public string DisplayName { get; private set; } /// /// Gets description of the detector /// - [JsonProperty(PropertyName = "properties.description")] + [JsonProperty(PropertyName = "description")] public string Description { get; private set; } /// /// Gets detector Rank /// - [JsonProperty(PropertyName = "properties.rank")] + [JsonProperty(PropertyName = "rank")] public double? Rank { get; private set; } /// /// Gets flag representing whether detector is enabled or not. /// - [JsonProperty(PropertyName = "properties.isEnabled")] + [JsonProperty(PropertyName = "isEnabled")] public bool? IsEnabled { get; private set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs new file mode 100644 index 0000000000000..2823dba0e9c56 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs @@ -0,0 +1,84 @@ +// +// 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 detector definition + /// + [Rest.Serialization.JsonTransformation] + public partial class DetectorDefinitionResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the DetectorDefinitionResource class. + /// + public DetectorDefinitionResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DetectorDefinitionResource class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Display name of the detector + /// Description of the detector + /// Detector Rank + /// Flag representing whether detector is + /// enabled or not. + public DetectorDefinitionResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string displayName = default(string), string description = default(string), double? rank = default(double?), bool? isEnabled = default(bool?)) + : base(id, name, kind, type) + { + DisplayName = displayName; + Description = description; + Rank = rank; + IsEnabled = isEnabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets display name of the detector + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; private set; } + + /// + /// Gets description of the detector + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; private set; } + + /// + /// Gets detector Rank + /// + [JsonProperty(PropertyName = "properties.rank")] + public double? Rank { get; private set; } + + /// + /// Gets flag representing whether detector is enabled or not. + /// + [JsonProperty(PropertyName = "properties.isEnabled")] + public bool? IsEnabled { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs new file mode 100644 index 0000000000000..60ae58fea6f18 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs @@ -0,0 +1,24 @@ +// +// 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 +{ + + /// + /// Defines values for EnterpriseGradeCdnStatus. + /// + public static class EnterpriseGradeCdnStatus + { + public const string Enabled = "Enabled"; + public const string Enabling = "Enabling"; + public const string Disabled = "Disabled"; + public const string Disabling = "Disabling"; + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs new file mode 100644 index 0000000000000..11ec9fd56d634 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs @@ -0,0 +1,69 @@ +// +// 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; + + /// + /// Container App container environment variable. + /// + public partial class EnvironmentVar + { + /// + /// Initializes a new instance of the EnvironmentVar class. + /// + public EnvironmentVar() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnvironmentVar class. + /// + /// Environment variable name. + /// Non-secret environment variable value. + /// Name of the Container App secret from which + /// to pull the environment variable value. + public EnvironmentVar(string name = default(string), string value = default(string), string secretRef = default(string)) + { + Name = name; + Value = value; + SecretRef = secretRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets environment variable name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets non-secret environment variable value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets name of the Container App secret from which to pull + /// the environment variable value. + /// + [JsonProperty(PropertyName = "secretRef")] + public string SecretRef { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs index d4452c070a909..2b2a84aac2bce 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs @@ -35,14 +35,18 @@ public ErrorEntity() /// Message template. /// Parameters for the template. /// Inner errors. + /// Error Details. + /// The error target. /// Basic error code. /// Any details of the error. - public ErrorEntity(string extendedCode = default(string), string messageTemplate = default(string), IList parameters = default(IList), IList innerErrors = default(IList), string code = default(string), string message = default(string)) + public ErrorEntity(string extendedCode = default(string), string messageTemplate = default(string), IList parameters = default(IList), IList innerErrors = default(IList), IList details = default(IList), string target = default(string), string code = default(string), string message = default(string)) { ExtendedCode = extendedCode; MessageTemplate = messageTemplate; Parameters = parameters; InnerErrors = innerErrors; + Details = details; + Target = target; Code = code; Message = message; CustomInit(); @@ -77,6 +81,18 @@ public ErrorEntity() [JsonProperty(PropertyName = "innerErrors")] public IList InnerErrors { get; set; } + /// + /// Gets or sets error Details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + + /// + /// Gets or sets the error target. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + /// /// Gets or sets basic error code. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs index 2cab9bdfebc6b..69d8edcdb57ff 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the Facebook provider. /// - [Rest.Serialization.JsonTransformation] - public partial class Facebook : ProxyOnlyResource + public partial class Facebook { /// /// Initializes a new instance of the Facebook class. @@ -32,10 +29,6 @@ public Facebook() /// /// Initializes a new instance of the Facebook class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the /// Facebook provider should not be enabled despite the set /// registration; otherwise, <code>true</code>. @@ -45,8 +38,7 @@ public Facebook() /// used while logging in. /// The configuration settings of the login /// flow. - public Facebook(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), AppRegistration registration = default(AppRegistration), string graphApiVersion = default(string), LoginScopes login = default(LoginScopes)) - : base(id, name, kind, type) + public Facebook(bool? enabled = default(bool?), AppRegistration registration = default(AppRegistration), string graphApiVersion = default(string), LoginScopes login = default(LoginScopes)) { Enabled = enabled; Registration = registration; @@ -66,27 +58,27 @@ public Facebook() /// registration; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the app registration for /// the Facebook provider. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public AppRegistration Registration { get; set; } /// /// Gets or sets the version of the Facebook api to be used while /// logging in. /// - [JsonProperty(PropertyName = "properties.graphApiVersion")] + [JsonProperty(PropertyName = "graphApiVersion")] public string GraphApiVersion { get; set; } /// /// Gets or sets the configuration settings of the login flow. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public LoginScopes Login { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs index 405d456abb74e..9615258c10d51 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the storage of the tokens if a file /// system is used. /// - [Rest.Serialization.JsonTransformation] - public partial class FileSystemTokenStore : ProxyOnlyResource + public partial class FileSystemTokenStore { /// /// Initializes a new instance of the FileSystemTokenStore class. @@ -33,14 +30,9 @@ public FileSystemTokenStore() /// /// Initializes a new instance of the FileSystemTokenStore class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The directory in which the tokens will be /// stored. - public FileSystemTokenStore(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string directory = default(string)) - : base(id, name, kind, type) + public FileSystemTokenStore(string directory = default(string)) { Directory = directory; CustomInit(); @@ -54,7 +46,7 @@ public FileSystemTokenStore() /// /// Gets or sets the directory in which the tokens will be stored. /// - [JsonProperty(PropertyName = "properties.directory")] + [JsonProperty(PropertyName = "directory")] public string Directory { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs index bd53d61ffe310..337f4b4b21b60 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of a forward proxy used to make the /// requests. /// - [Rest.Serialization.JsonTransformation] - public partial class ForwardProxy : ProxyOnlyResource + public partial class ForwardProxy { /// /// Initializes a new instance of the ForwardProxy class. @@ -33,10 +30,6 @@ public ForwardProxy() /// /// Initializes a new instance of the ForwardProxy class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The convention used to determine the url /// of the request made. Possible values include: 'NoProxy', /// 'Standard', 'Custom' @@ -44,8 +37,7 @@ public ForwardProxy() /// containing the host of the request. /// The name of the header /// containing the scheme of the request. - public ForwardProxy(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ForwardProxyConvention? convention = default(ForwardProxyConvention?), string customHostHeaderName = default(string), string customProtoHeaderName = default(string)) - : base(id, name, kind, type) + public ForwardProxy(ForwardProxyConvention? convention = default(ForwardProxyConvention?), string customHostHeaderName = default(string), string customProtoHeaderName = default(string)) { Convention = convention; CustomHostHeaderName = customHostHeaderName; @@ -63,21 +55,21 @@ public ForwardProxy() /// request made. Possible values include: 'NoProxy', 'Standard', /// 'Custom' /// - [JsonProperty(PropertyName = "properties.convention")] + [JsonProperty(PropertyName = "convention")] public ForwardProxyConvention? Convention { get; set; } /// /// Gets or sets the name of the header containing the host of the /// request. /// - [JsonProperty(PropertyName = "properties.customHostHeaderName")] + [JsonProperty(PropertyName = "customHostHeaderName")] public string CustomHostHeaderName { get; set; } /// /// Gets or sets the name of the header containing the scheme of the /// request. /// - [JsonProperty(PropertyName = "properties.customProtoHeaderName")] + [JsonProperty(PropertyName = "customProtoHeaderName")] public string CustomProtoHeaderName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs index 01a3ecabe7bb1..dce8ae3cddcda 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the GitHub provider. /// - [Rest.Serialization.JsonTransformation] - public partial class GitHub : ProxyOnlyResource + public partial class GitHub { /// /// Initializes a new instance of the GitHub class. @@ -32,10 +29,6 @@ public GitHub() /// /// Initializes a new instance of the GitHub class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the GitHub /// provider should not be enabled despite the set registration; /// otherwise, <code>true</code>. @@ -43,8 +36,7 @@ public GitHub() /// registration for the GitHub provider. /// The configuration settings of the login /// flow. - public GitHub(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes)) - : base(id, name, kind, type) + public GitHub(bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes)) { Enabled = enabled; Registration = registration; @@ -62,20 +54,20 @@ public GitHub() /// GitHub provider should not be enabled despite the set registration; /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the app registration for /// the GitHub provider. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public ClientRegistration Registration { get; set; } /// /// Gets or sets the configuration settings of the login flow. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public LoginScopes Login { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs index 10a361a698314..65a1db2c32595 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings that determines the validation flow of users /// using App Service Authentication/Authorization. /// - [Rest.Serialization.JsonTransformation] - public partial class GlobalValidation : ProxyOnlyResource + public partial class GlobalValidation { /// /// Initializes a new instance of the GlobalValidation class. @@ -35,10 +32,6 @@ public GlobalValidation() /// /// Initializes a new instance of the GlobalValidation class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>true</code> /// if the authentication flow is required any request is made; /// otherwise, <code>false</code>. @@ -53,8 +46,7 @@ public GlobalValidation() /// action is set to "RedirectToLoginPage". /// The paths for which unauthenticated /// flow would not be redirected to the login page. - public GlobalValidation(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? requireAuthentication = default(bool?), UnauthenticatedClientActionV2? unauthenticatedClientAction = default(UnauthenticatedClientActionV2?), string redirectToProvider = default(string), IList excludedPaths = default(IList)) - : base(id, name, kind, type) + public GlobalValidation(bool? requireAuthentication = default(bool?), UnauthenticatedClientActionV2? unauthenticatedClientAction = default(UnauthenticatedClientActionV2?), string redirectToProvider = default(string), IList excludedPaths = default(IList)) { RequireAuthentication = requireAuthentication; UnauthenticatedClientAction = unauthenticatedClientAction; @@ -73,7 +65,7 @@ public GlobalValidation() /// authentication flow is required any request is made; otherwise, /// &lt;code&gt;false&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.requireAuthentication")] + [JsonProperty(PropertyName = "requireAuthentication")] public bool? RequireAuthentication { get; set; } /// @@ -81,7 +73,7 @@ public GlobalValidation() /// attempts to access the app. Possible values include: /// 'RedirectToLoginPage', 'AllowAnonymous', 'Return401', 'Return403' /// - [JsonProperty(PropertyName = "properties.unauthenticatedClientAction")] + [JsonProperty(PropertyName = "unauthenticatedClientAction")] public UnauthenticatedClientActionV2? UnauthenticatedClientAction { get; set; } /// @@ -91,14 +83,14 @@ public GlobalValidation() /// and the unauthenticated client /// action is set to "RedirectToLoginPage". /// - [JsonProperty(PropertyName = "properties.redirectToProvider")] + [JsonProperty(PropertyName = "redirectToProvider")] public string RedirectToProvider { get; set; } /// /// Gets or sets the paths for which unauthenticated flow would not be /// redirected to the login page. /// - [JsonProperty(PropertyName = "properties.excludedPaths")] + [JsonProperty(PropertyName = "excludedPaths")] public IList ExcludedPaths { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs index 88a648867d734..b5312ed9d3150 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the Google provider. /// - [Rest.Serialization.JsonTransformation] - public partial class Google : ProxyOnlyResource + public partial class Google { /// /// Initializes a new instance of the Google class. @@ -32,10 +29,6 @@ public Google() /// /// Initializes a new instance of the Google class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the Google /// provider should not be enabled despite the set registration; /// otherwise, <code>true</code>. @@ -45,8 +38,7 @@ public Google() /// flow. /// The configuration settings of the Azure /// Active Directory token validation flow. - public Google(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes), AllowedAudiencesValidation validation = default(AllowedAudiencesValidation)) - : base(id, name, kind, type) + public Google(bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes), AllowedAudiencesValidation validation = default(AllowedAudiencesValidation)) { Enabled = enabled; Registration = registration; @@ -65,27 +57,27 @@ public Google() /// Google provider should not be enabled despite the set registration; /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the app registration for /// the Google provider. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public ClientRegistration Registration { get; set; } /// /// Gets or sets the configuration settings of the login flow. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public LoginScopes Login { get; set; } /// /// Gets or sets the configuration settings of the Azure Active /// Directory token validation flow. /// - [JsonProperty(PropertyName = "properties.validation")] + [JsonProperty(PropertyName = "validation")] public AllowedAudiencesValidation Validation { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs new file mode 100644 index 0000000000000..49284b8b03052 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs @@ -0,0 +1,63 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App container Custom scaling rule. + /// + public partial class HttpScaleRule + { + /// + /// Initializes a new instance of the HttpScaleRule class. + /// + public HttpScaleRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HttpScaleRule class. + /// + /// Metadata properties to describe http scale + /// rule. + /// Authentication secrets for the custom scale + /// rule. + public HttpScaleRule(IDictionary metadata = default(IDictionary), IList auth = default(IList)) + { + Metadata = metadata; + Auth = auth; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata properties to describe http scale rule. + /// + [JsonProperty(PropertyName = "metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Gets or sets authentication secrets for the custom scale rule. + /// + [JsonProperty(PropertyName = "auth")] + public IList Auth { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs index e57e53390fcd6..1f52e35038f37 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -20,8 +18,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// authorization requests made against App Service /// Authentication/Authorization. /// - [Rest.Serialization.JsonTransformation] - public partial class HttpSettings : ProxyOnlyResource + public partial class HttpSettings { /// /// Initializes a new instance of the HttpSettings class. @@ -34,10 +31,6 @@ public HttpSettings() /// /// Initializes a new instance of the HttpSettings class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the /// authentication/authorization responses not having the HTTPS scheme /// are permissible; otherwise, <code>true</code>. @@ -45,8 +38,7 @@ public HttpSettings() /// requests. /// The configuration settings of a forward /// proxy used to make the requests. - public HttpSettings(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? requireHttps = default(bool?), HttpSettingsRoutes routes = default(HttpSettingsRoutes), ForwardProxy forwardProxy = default(ForwardProxy)) - : base(id, name, kind, type) + public HttpSettings(bool? requireHttps = default(bool?), HttpSettingsRoutes routes = default(HttpSettingsRoutes), ForwardProxy forwardProxy = default(ForwardProxy)) { RequireHttps = requireHttps; Routes = routes; @@ -65,20 +57,20 @@ public HttpSettings() /// are permissible; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.requireHttps")] + [JsonProperty(PropertyName = "requireHttps")] public bool? RequireHttps { get; set; } /// /// Gets or sets the configuration settings of the paths HTTP requests. /// - [JsonProperty(PropertyName = "properties.routes")] + [JsonProperty(PropertyName = "routes")] public HttpSettingsRoutes Routes { get; set; } /// /// Gets or sets the configuration settings of a forward proxy used to /// make the requests. /// - [JsonProperty(PropertyName = "properties.forwardProxy")] + [JsonProperty(PropertyName = "forwardProxy")] public ForwardProxy ForwardProxy { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs index 92ac617b5368a..93693d8f9f037 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the paths HTTP requests. /// - [Rest.Serialization.JsonTransformation] - public partial class HttpSettingsRoutes : ProxyOnlyResource + public partial class HttpSettingsRoutes { /// /// Initializes a new instance of the HttpSettingsRoutes class. @@ -32,14 +29,9 @@ public HttpSettingsRoutes() /// /// Initializes a new instance of the HttpSettingsRoutes class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The prefix that should precede all the /// authentication/authorization paths. - public HttpSettingsRoutes(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string apiPrefix = default(string)) - : base(id, name, kind, type) + public HttpSettingsRoutes(string apiPrefix = default(string)) { ApiPrefix = apiPrefix; CustomInit(); @@ -54,7 +46,7 @@ public HttpSettingsRoutes() /// Gets or sets the prefix that should precede all the /// authentication/authorization paths. /// - [JsonProperty(PropertyName = "properties.apiPrefix")] + [JsonProperty(PropertyName = "apiPrefix")] public string ApiPrefix { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs index df08efecfb759..ec87d3a0f13b7 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of each of the identity providers used to /// configure App Service Authentication/Authorization. /// - [Rest.Serialization.JsonTransformation] - public partial class IdentityProviders : ProxyOnlyResource + public partial class IdentityProviders { /// /// Initializes a new instance of the IdentityProviders class. @@ -35,10 +32,6 @@ public IdentityProviders() /// /// Initializes a new instance of the IdentityProviders class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The configuration settings of /// the Azure Active directory provider. /// The configuration settings of the Facebook @@ -47,30 +40,29 @@ public IdentityProviders() /// provider. /// The configuration settings of the Google /// provider. - /// The configuration settings of the Twitter - /// provider. - /// The map of the name of - /// the alias of each custom Open ID Connect provider to the - /// configuration settings of the custom Open ID Connect - /// provider. /// The configuration settings of /// the legacy Microsoft Account provider. + /// The configuration settings of the Twitter + /// provider. /// The configuration settings of the Apple /// provider. /// The configuration settings of the /// Azure Static Web Apps provider. - public IdentityProviders(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), Facebook facebook = default(Facebook), GitHub gitHub = default(GitHub), Google google = default(Google), Twitter twitter = default(Twitter), IDictionary customOpenIdConnectProviders = default(IDictionary), LegacyMicrosoftAccount legacyMicrosoftAccount = default(LegacyMicrosoftAccount), Apple apple = default(Apple), AzureStaticWebApps azureStaticWebApps = default(AzureStaticWebApps)) - : base(id, name, kind, type) + /// The map of the name of + /// the alias of each custom Open ID Connect provider to the + /// configuration settings of the custom Open ID Connect + /// provider. + public IdentityProviders(AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), Facebook facebook = default(Facebook), GitHub gitHub = default(GitHub), Google google = default(Google), LegacyMicrosoftAccount legacyMicrosoftAccount = default(LegacyMicrosoftAccount), Twitter twitter = default(Twitter), Apple apple = default(Apple), AzureStaticWebApps azureStaticWebApps = default(AzureStaticWebApps), IDictionary customOpenIdConnectProviders = default(IDictionary)) { AzureActiveDirectory = azureActiveDirectory; Facebook = facebook; GitHub = gitHub; Google = google; - Twitter = twitter; - CustomOpenIdConnectProviders = customOpenIdConnectProviders; LegacyMicrosoftAccount = legacyMicrosoftAccount; + Twitter = twitter; Apple = apple; AzureStaticWebApps = azureStaticWebApps; + CustomOpenIdConnectProviders = customOpenIdConnectProviders; CustomInit(); } @@ -83,60 +75,60 @@ public IdentityProviders() /// Gets or sets the configuration settings of the Azure Active /// directory provider. /// - [JsonProperty(PropertyName = "properties.azureActiveDirectory")] + [JsonProperty(PropertyName = "azureActiveDirectory")] public AzureActiveDirectory AzureActiveDirectory { get; set; } /// /// Gets or sets the configuration settings of the Facebook provider. /// - [JsonProperty(PropertyName = "properties.facebook")] + [JsonProperty(PropertyName = "facebook")] public Facebook Facebook { get; set; } /// /// Gets or sets the configuration settings of the GitHub provider. /// - [JsonProperty(PropertyName = "properties.gitHub")] + [JsonProperty(PropertyName = "gitHub")] public GitHub GitHub { get; set; } /// /// Gets or sets the configuration settings of the Google provider. /// - [JsonProperty(PropertyName = "properties.google")] + [JsonProperty(PropertyName = "google")] public Google Google { get; set; } - /// - /// Gets or sets the configuration settings of the Twitter provider. - /// - [JsonProperty(PropertyName = "properties.twitter")] - public Twitter Twitter { get; set; } - - /// - /// Gets or sets the map of the name of the alias of each custom Open - /// ID Connect provider to the - /// configuration settings of the custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "properties.customOpenIdConnectProviders")] - public IDictionary CustomOpenIdConnectProviders { get; set; } - /// /// Gets or sets the configuration settings of the legacy Microsoft /// Account provider. /// - [JsonProperty(PropertyName = "properties.legacyMicrosoftAccount")] + [JsonProperty(PropertyName = "legacyMicrosoftAccount")] public LegacyMicrosoftAccount LegacyMicrosoftAccount { get; set; } + /// + /// Gets or sets the configuration settings of the Twitter provider. + /// + [JsonProperty(PropertyName = "twitter")] + public Twitter Twitter { get; set; } + /// /// Gets or sets the configuration settings of the Apple provider. /// - [JsonProperty(PropertyName = "properties.apple")] + [JsonProperty(PropertyName = "apple")] public Apple Apple { get; set; } /// /// Gets or sets the configuration settings of the Azure Static Web /// Apps provider. /// - [JsonProperty(PropertyName = "properties.azureStaticWebApps")] + [JsonProperty(PropertyName = "azureStaticWebApps")] public AzureStaticWebApps AzureStaticWebApps { get; set; } + /// + /// Gets or sets the map of the name of the alias of each custom Open + /// ID Connect provider to the + /// configuration settings of the custom Open ID Connect provider. + /// + [JsonProperty(PropertyName = "customOpenIdConnectProviders")] + public IDictionary CustomOpenIdConnectProviders { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs new file mode 100644 index 0000000000000..bf7e851b957df --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs @@ -0,0 +1,100 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App Ingress configuration. + /// + public partial class Ingress + { + /// + /// Initializes a new instance of the Ingress class. + /// + public Ingress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Ingress class. + /// + /// Hostname. + /// Bool indicating if app exposes an external + /// http endpoint + /// Target Port in containers for traffic from + /// ingress + /// Ingress transport protocol. Possible values + /// include: 'auto', 'http', 'http2' + /// Bool indicating if HTTP connections to + /// is allowed. If set to false HTTP connections are automatically + /// redirected to HTTPS connections + public Ingress(string fqdn = default(string), bool? external = default(bool?), int? targetPort = default(int?), string transport = default(string), IList traffic = default(IList), bool? allowInsecure = default(bool?)) + { + Fqdn = fqdn; + External = external; + TargetPort = targetPort; + Transport = transport; + Traffic = traffic; + AllowInsecure = allowInsecure; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets hostname. + /// + [JsonProperty(PropertyName = "fqdn")] + public string Fqdn { get; private set; } + + /// + /// Gets or sets bool indicating if app exposes an external http + /// endpoint + /// + [JsonProperty(PropertyName = "external")] + public bool? External { get; set; } + + /// + /// Gets or sets target Port in containers for traffic from ingress + /// + [JsonProperty(PropertyName = "targetPort")] + public int? TargetPort { get; set; } + + /// + /// Gets or sets ingress transport protocol. Possible values include: + /// 'auto', 'http', 'http2' + /// + [JsonProperty(PropertyName = "transport")] + public string Transport { get; set; } + + /// + /// + [JsonProperty(PropertyName = "traffic")] + public IList Traffic { get; set; } + + /// + /// Gets or sets bool indicating if HTTP connections to is allowed. If + /// set to false HTTP connections are automatically redirected to HTTPS + /// connections + /// + [JsonProperty(PropertyName = "allowInsecure")] + public bool? AllowInsecure { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs new file mode 100644 index 0000000000000..045099b2a92fa --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs @@ -0,0 +1,23 @@ +// +// 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 +{ + + /// + /// Defines values for IngressTransportMethod. + /// + public static class IngressTransportMethod + { + public const string Auto = "auto"; + public const string Http = "http"; + public const string Http2 = "http2"; + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs index 509b9ba414058..987d77ff1840a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the checks that should be made while /// validating the JWT Claims. /// - [Rest.Serialization.JsonTransformation] - public partial class JwtClaimChecks : ProxyOnlyResource + public partial class JwtClaimChecks { /// /// Initializes a new instance of the JwtClaimChecks class. @@ -35,15 +32,10 @@ public JwtClaimChecks() /// /// Initializes a new instance of the JwtClaimChecks class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The list of the allowed groups. /// The list of the allowed /// client applications. - public JwtClaimChecks(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList allowedGroups = default(IList), IList allowedClientApplications = default(IList)) - : base(id, name, kind, type) + public JwtClaimChecks(IList allowedGroups = default(IList), IList allowedClientApplications = default(IList)) { AllowedGroups = allowedGroups; AllowedClientApplications = allowedClientApplications; @@ -58,13 +50,13 @@ public JwtClaimChecks() /// /// Gets or sets the list of the allowed groups. /// - [JsonProperty(PropertyName = "properties.allowedGroups")] + [JsonProperty(PropertyName = "allowedGroups")] public IList AllowedGroups { get; set; } /// /// Gets or sets the list of the allowed client applications. /// - [JsonProperty(PropertyName = "properties.allowedClientApplications")] + [JsonProperty(PropertyName = "allowedClientApplications")] public IList AllowedClientApplications { get; set; } } 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 index 17a2f2ac7f9c7..f51515869ecf8 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs @@ -52,6 +52,9 @@ public KubeEnvironment() /// Default Domain Name for the /// cluster /// Static IP of the KubeEnvironment + /// Type of Kubernetes Environment. Only + /// supported for Container App Environments with value as + /// Managed /// Cluster configuration which /// determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -60,7 +63,10 @@ public KubeEnvironment() /// 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)) + /// Cluster configuration for + /// Container Apps Environments to configure Dapr Instrumentation Key + /// and VNET Configuration + 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), string environmentType = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), ContainerAppsConfiguration containerAppsConfiguration = default(ContainerAppsConfiguration), string aksResourceID = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, kind, type, tags) { ProvisioningState = provisioningState; @@ -68,8 +74,10 @@ public KubeEnvironment() InternalLoadBalancerEnabled = internalLoadBalancerEnabled; DefaultDomain = defaultDomain; StaticIp = staticIp; + EnvironmentType = environmentType; ArcConfiguration = arcConfiguration; AppLogsConfiguration = appLogsConfiguration; + ContainerAppsConfiguration = containerAppsConfiguration; AksResourceID = aksResourceID; ExtendedLocation = extendedLocation; CustomInit(); @@ -115,6 +123,13 @@ public KubeEnvironment() [JsonProperty(PropertyName = "properties.staticIp")] public string StaticIp { get; set; } + /// + /// Gets or sets type of Kubernetes Environment. Only supported for + /// Container App Environments with value as Managed + /// + [JsonProperty(PropertyName = "properties.environmentType")] + public string EnvironmentType { get; set; } + /// /// Gets or sets cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -132,6 +147,13 @@ public KubeEnvironment() [JsonProperty(PropertyName = "properties.appLogsConfiguration")] public AppLogsConfiguration AppLogsConfiguration { get; set; } + /// + /// Gets or sets cluster configuration for Container Apps Environments + /// to configure Dapr Instrumentation Key and VNET Configuration + /// + [JsonProperty(PropertyName = "properties.containerAppsConfiguration")] + public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } + /// /// [JsonProperty(PropertyName = "properties.aksResourceID")] 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 index b68076067de1f..bb870d44def5a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs @@ -58,7 +58,10 @@ public KubeEnvironmentPatchResource() /// 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)) + /// Cluster configuration for + /// Container Apps Environments to configure Dapr Instrumentation Key + /// and VNET Configuration + 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), ContainerAppsConfiguration containerAppsConfiguration = default(ContainerAppsConfiguration), string aksResourceID = default(string)) : base(id, name, kind, type) { ProvisioningState = provisioningState; @@ -68,6 +71,7 @@ public KubeEnvironmentPatchResource() StaticIp = staticIp; ArcConfiguration = arcConfiguration; AppLogsConfiguration = appLogsConfiguration; + ContainerAppsConfiguration = containerAppsConfiguration; AksResourceID = aksResourceID; CustomInit(); } @@ -129,6 +133,13 @@ public KubeEnvironmentPatchResource() [JsonProperty(PropertyName = "properties.appLogsConfiguration")] public AppLogsConfiguration AppLogsConfiguration { get; set; } + /// + /// Gets or sets cluster configuration for Container Apps Environments + /// to configure Dapr Instrumentation Key and VNET Configuration + /// + [JsonProperty(PropertyName = "properties.containerAppsConfiguration")] + public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } + /// /// [JsonProperty(PropertyName = "properties.aksResourceID")] diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs index 44d19dd1bcfe4..40b3d2973b884 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the legacy Microsoft Account provider. /// - [Rest.Serialization.JsonTransformation] - public partial class LegacyMicrosoftAccount : ProxyOnlyResource + public partial class LegacyMicrosoftAccount { /// /// Initializes a new instance of the LegacyMicrosoftAccount class. @@ -32,10 +29,6 @@ public LegacyMicrosoftAccount() /// /// Initializes a new instance of the LegacyMicrosoftAccount class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the legacy /// Microsoft Account provider should not be enabled despite the set /// registration; otherwise, <code>true</code>. @@ -45,8 +38,7 @@ public LegacyMicrosoftAccount() /// flow. /// The configuration settings of the legacy /// Microsoft Account provider token validation flow. - public LegacyMicrosoftAccount(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes), AllowedAudiencesValidation validation = default(AllowedAudiencesValidation)) - : base(id, name, kind, type) + public LegacyMicrosoftAccount(bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes), AllowedAudiencesValidation validation = default(AllowedAudiencesValidation)) { Enabled = enabled; Registration = registration; @@ -66,27 +58,27 @@ public LegacyMicrosoftAccount() /// set registration; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the app registration for /// the legacy Microsoft Account provider. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public ClientRegistration Registration { get; set; } /// /// Gets or sets the configuration settings of the login flow. /// - [JsonProperty(PropertyName = "properties.login")] + [JsonProperty(PropertyName = "login")] public LoginScopes Login { get; set; } /// /// Gets or sets the configuration settings of the legacy Microsoft /// Account provider token validation flow. /// - [JsonProperty(PropertyName = "properties.validation")] + [JsonProperty(PropertyName = "validation")] public AllowedAudiencesValidation Validation { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs index f88dd3ce8e9b2..8a207a74c728f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the login flow of users using App Service /// Authentication/Authorization. /// - [Rest.Serialization.JsonTransformation] - public partial class Login : ProxyOnlyResource + public partial class Login { /// /// Initializes a new instance of the Login class. @@ -35,10 +32,6 @@ public Login() /// /// Initializes a new instance of the Login class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The routes that specify the endpoints used for /// login and logout requests. /// The configuration settings of the token @@ -58,8 +51,7 @@ public Login() /// session cookie's expiration. /// The configuration settings of the nonce used in /// the login flow. - public Login(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), LoginRoutes routes = default(LoginRoutes), TokenStore tokenStore = default(TokenStore), bool? preserveUrlFragmentsForLogins = default(bool?), IList allowedExternalRedirectUrls = default(IList), CookieExpiration cookieExpiration = default(CookieExpiration), Nonce nonce = default(Nonce)) - : base(id, name, kind, type) + public Login(LoginRoutes routes = default(LoginRoutes), TokenStore tokenStore = default(TokenStore), bool? preserveUrlFragmentsForLogins = default(bool?), IList allowedExternalRedirectUrls = default(IList), CookieExpiration cookieExpiration = default(CookieExpiration), Nonce nonce = default(Nonce)) { Routes = routes; TokenStore = tokenStore; @@ -79,13 +71,13 @@ public Login() /// Gets or sets the routes that specify the endpoints used for login /// and logout requests. /// - [JsonProperty(PropertyName = "properties.routes")] + [JsonProperty(PropertyName = "routes")] public LoginRoutes Routes { get; set; } /// /// Gets or sets the configuration settings of the token store. /// - [JsonProperty(PropertyName = "properties.tokenStore")] + [JsonProperty(PropertyName = "tokenStore")] public TokenStore TokenStore { get; set; } /// @@ -93,7 +85,7 @@ public Login() /// fragments from the request are preserved after the login request is /// made; otherwise, &lt;code&gt;false&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.preserveUrlFragmentsForLogins")] + [JsonProperty(PropertyName = "preserveUrlFragmentsForLogins")] public bool? PreserveUrlFragmentsForLogins { get; set; } /// @@ -105,21 +97,21 @@ public Login() /// Note that URLs within the current domain are always implicitly /// allowed. /// - [JsonProperty(PropertyName = "properties.allowedExternalRedirectUrls")] + [JsonProperty(PropertyName = "allowedExternalRedirectUrls")] public IList AllowedExternalRedirectUrls { get; set; } /// /// Gets or sets the configuration settings of the session cookie's /// expiration. /// - [JsonProperty(PropertyName = "properties.cookieExpiration")] + [JsonProperty(PropertyName = "cookieExpiration")] public CookieExpiration CookieExpiration { get; set; } /// /// Gets or sets the configuration settings of the nonce used in the /// login flow. /// - [JsonProperty(PropertyName = "properties.nonce")] + [JsonProperty(PropertyName = "nonce")] public Nonce Nonce { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs index 34b86a866e141..a2a1c6a282a2b 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The routes that specify the endpoints used for login and logout /// requests. /// - [Rest.Serialization.JsonTransformation] - public partial class LoginRoutes : ProxyOnlyResource + public partial class LoginRoutes { /// /// Initializes a new instance of the LoginRoutes class. @@ -33,14 +30,9 @@ public LoginRoutes() /// /// Initializes a new instance of the LoginRoutes class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The endpoint at which a logout request /// should be made. - public LoginRoutes(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string logoutEndpoint = default(string)) - : base(id, name, kind, type) + public LoginRoutes(string logoutEndpoint = default(string)) { LogoutEndpoint = logoutEndpoint; CustomInit(); @@ -54,7 +46,7 @@ public LoginRoutes() /// /// Gets or sets the endpoint at which a logout request should be made. /// - [JsonProperty(PropertyName = "properties.logoutEndpoint")] + [JsonProperty(PropertyName = "logoutEndpoint")] public string LogoutEndpoint { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs index 6c64485bc850e..ad066f1a7e3e7 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the login flow, including the scopes that /// should be requested. /// - [Rest.Serialization.JsonTransformation] - public partial class LoginScopes : ProxyOnlyResource + public partial class LoginScopes { /// /// Initializes a new instance of the LoginScopes class. @@ -35,14 +32,9 @@ public LoginScopes() /// /// Initializes a new instance of the LoginScopes class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// A list of the scopes that should be requested /// while authenticating. - public LoginScopes(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList scopes = default(IList)) - : base(id, name, kind, type) + public LoginScopes(IList scopes = default(IList)) { Scopes = scopes; CustomInit(); @@ -57,7 +49,7 @@ public LoginScopes() /// Gets or sets a list of the scopes that should be requested while /// authenticating. /// - [JsonProperty(PropertyName = "properties.scopes")] + [JsonProperty(PropertyName = "scopes")] public IList Scopes { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs index 97bf46e1c018b..4549983159150 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the nonce used in the login flow. /// - [Rest.Serialization.JsonTransformation] - public partial class Nonce : ProxyOnlyResource + public partial class Nonce { /// /// Initializes a new instance of the Nonce class. @@ -32,17 +29,12 @@ public Nonce() /// /// Initializes a new instance of the Nonce class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the /// nonce should not be validated while completing the login flow; /// otherwise, <code>true</code>. /// The time after the request is /// made when the nonce should expire. - public Nonce(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? validateNonce = default(bool?), string nonceExpirationInterval = default(string)) - : base(id, name, kind, type) + public Nonce(bool? validateNonce = default(bool?), string nonceExpirationInterval = default(string)) { ValidateNonce = validateNonce; NonceExpirationInterval = nonceExpirationInterval; @@ -59,14 +51,14 @@ public Nonce() /// nonce should not be validated while completing the login flow; /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.validateNonce")] + [JsonProperty(PropertyName = "validateNonce")] public bool? ValidateNonce { get; set; } /// /// Gets or sets the time after the request is made when the nonce /// should expire. /// - [JsonProperty(PropertyName = "properties.nonceExpirationInterval")] + [JsonProperty(PropertyName = "nonceExpirationInterval")] public string NonceExpirationInterval { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs index 18a8ac948d82e..0520f3fcd5ef2 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The authentication client credentials of the custom Open ID Connect /// provider. /// - [Rest.Serialization.JsonTransformation] - public partial class OpenIdConnectClientCredential : ProxyOnlyResource + public partial class OpenIdConnectClientCredential { /// /// Initializes a new instance of the OpenIdConnectClientCredential @@ -35,16 +32,11 @@ public OpenIdConnectClientCredential() /// Initializes a new instance of the OpenIdConnectClientCredential /// class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The method that should be used to authenticate /// the user. Possible values include: 'ClientSecretPost' /// The app setting that contains /// the client secret for the custom Open ID Connect provider. - public OpenIdConnectClientCredential(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ClientCredentialMethod? method = default(ClientCredentialMethod?), string clientSecretSettingName = default(string)) - : base(id, name, kind, type) + public OpenIdConnectClientCredential(ClientCredentialMethod? method = default(ClientCredentialMethod?), string clientSecretSettingName = default(string)) { Method = method; ClientSecretSettingName = clientSecretSettingName; @@ -60,14 +52,14 @@ public OpenIdConnectClientCredential() /// Gets or sets the method that should be used to authenticate the /// user. Possible values include: 'ClientSecretPost' /// - [JsonProperty(PropertyName = "properties.method")] + [JsonProperty(PropertyName = "method")] public ClientCredentialMethod? Method { get; set; } /// /// Gets or sets the app setting that contains the client secret for /// the custom Open ID Connect provider. /// - [JsonProperty(PropertyName = "properties.clientSecretSettingName")] + [JsonProperty(PropertyName = "clientSecretSettingName")] public string ClientSecretSettingName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs index 70fddef9457aa..b3a82561a3666 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the endpoints used for the custom Open ID /// Connect provider. /// - [Rest.Serialization.JsonTransformation] - public partial class OpenIdConnectConfig : ProxyOnlyResource + public partial class OpenIdConnectConfig { /// /// Initializes a new instance of the OpenIdConnectConfig class. @@ -33,10 +30,6 @@ public OpenIdConnectConfig() /// /// Initializes a new instance of the OpenIdConnectConfig class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The endpoint to be used to make /// an authorization request. /// The endpoint to be used to request a @@ -46,8 +39,7 @@ public OpenIdConnectConfig() /// necessary to validate the token. /// The endpoint that /// contains all the configuration endpoints for the provider. - public OpenIdConnectConfig(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string authorizationEndpoint = default(string), string tokenEndpoint = default(string), string issuer = default(string), string certificationUri = default(string), string wellKnownOpenIdConfiguration = default(string)) - : base(id, name, kind, type) + public OpenIdConnectConfig(string authorizationEndpoint = default(string), string tokenEndpoint = default(string), string issuer = default(string), string certificationUri = default(string), string wellKnownOpenIdConfiguration = default(string)) { AuthorizationEndpoint = authorizationEndpoint; TokenEndpoint = tokenEndpoint; @@ -66,33 +58,33 @@ public OpenIdConnectConfig() /// Gets or sets the endpoint to be used to make an authorization /// request. /// - [JsonProperty(PropertyName = "properties.authorizationEndpoint")] + [JsonProperty(PropertyName = "authorizationEndpoint")] public string AuthorizationEndpoint { get; set; } /// /// Gets or sets the endpoint to be used to request a token. /// - [JsonProperty(PropertyName = "properties.tokenEndpoint")] + [JsonProperty(PropertyName = "tokenEndpoint")] public string TokenEndpoint { get; set; } /// /// Gets or sets the endpoint that issues the token. /// - [JsonProperty(PropertyName = "properties.issuer")] + [JsonProperty(PropertyName = "issuer")] public string Issuer { get; set; } /// /// Gets or sets the endpoint that provides the keys necessary to /// validate the token. /// - [JsonProperty(PropertyName = "properties.certificationUri")] + [JsonProperty(PropertyName = "certificationUri")] public string CertificationUri { get; set; } /// /// Gets or sets the endpoint that contains all the configuration /// endpoints for the provider. /// - [JsonProperty(PropertyName = "properties.wellKnownOpenIdConfiguration")] + [JsonProperty(PropertyName = "wellKnownOpenIdConfiguration")] public string WellKnownOpenIdConfiguration { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs index cc9c4fecabc82..c796661c1cdec 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -21,8 +19,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the login flow of the custom Open ID /// Connect provider. /// - [Rest.Serialization.JsonTransformation] - public partial class OpenIdConnectLogin : ProxyOnlyResource + public partial class OpenIdConnectLogin { /// /// Initializes a new instance of the OpenIdConnectLogin class. @@ -35,16 +32,11 @@ public OpenIdConnectLogin() /// /// Initializes a new instance of the OpenIdConnectLogin class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The name of the claim that contains the /// users name. /// A list of the scopes that should be requested /// while authenticating. - public OpenIdConnectLogin(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string nameClaimType = default(string), IList scopes = default(IList)) - : base(id, name, kind, type) + public OpenIdConnectLogin(string nameClaimType = default(string), IList scopes = default(IList)) { NameClaimType = nameClaimType; Scopes = scopes; @@ -59,14 +51,14 @@ public OpenIdConnectLogin() /// /// Gets or sets the name of the claim that contains the users name. /// - [JsonProperty(PropertyName = "properties.nameClaimType")] + [JsonProperty(PropertyName = "nameClaimType")] public string NameClaimType { get; set; } /// /// Gets or sets a list of the scopes that should be requested while /// authenticating. /// - [JsonProperty(PropertyName = "properties.scopes")] + [JsonProperty(PropertyName = "scopes")] public IList Scopes { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs index f9ae80692d1ab..aa3caa98ff4eb 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the app registration for the custom Open /// ID Connect provider. /// - [Rest.Serialization.JsonTransformation] - public partial class OpenIdConnectRegistration : ProxyOnlyResource + public partial class OpenIdConnectRegistration { /// /// Initializes a new instance of the OpenIdConnectRegistration class. @@ -33,10 +30,6 @@ public OpenIdConnectRegistration() /// /// Initializes a new instance of the OpenIdConnectRegistration class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The client id of the custom Open ID Connect /// provider. /// The authentication credentials of @@ -44,8 +37,7 @@ public OpenIdConnectRegistration() /// The configuration settings /// of the endpoints used for the custom Open ID Connect /// provider. - public OpenIdConnectRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string clientId = default(string), OpenIdConnectClientCredential clientCredential = default(OpenIdConnectClientCredential), OpenIdConnectConfig openIdConnectConfiguration = default(OpenIdConnectConfig)) - : base(id, name, kind, type) + public OpenIdConnectRegistration(string clientId = default(string), OpenIdConnectClientCredential clientCredential = default(OpenIdConnectClientCredential), OpenIdConnectConfig openIdConnectConfiguration = default(OpenIdConnectConfig)) { ClientId = clientId; ClientCredential = clientCredential; @@ -61,21 +53,21 @@ public OpenIdConnectRegistration() /// /// Gets or sets the client id of the custom Open ID Connect provider. /// - [JsonProperty(PropertyName = "properties.clientId")] + [JsonProperty(PropertyName = "clientId")] public string ClientId { get; set; } /// /// Gets or sets the authentication credentials of the custom Open ID /// Connect provider. /// - [JsonProperty(PropertyName = "properties.clientCredential")] + [JsonProperty(PropertyName = "clientCredential")] public OpenIdConnectClientCredential ClientCredential { get; set; } /// /// Gets or sets the configuration settings of the endpoints used for /// the custom Open ID Connect provider. /// - [JsonProperty(PropertyName = "properties.openIdConnectConfiguration")] + [JsonProperty(PropertyName = "openIdConnectConfiguration")] public OpenIdConnectConfig OpenIdConnectConfiguration { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs new file mode 100644 index 0000000000000..b466657a5a11f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs @@ -0,0 +1,70 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App container Azure Queue based scaling rule. + /// + public partial class QueueScaleRule + { + /// + /// Initializes a new instance of the QueueScaleRule class. + /// + public QueueScaleRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QueueScaleRule class. + /// + /// Queue name. + /// Queue length. + /// Authentication secrets for the queue scale + /// rule. + public QueueScaleRule(string queueName = default(string), int? queueLength = default(int?), IList auth = default(IList)) + { + QueueName = queueName; + QueueLength = queueLength; + Auth = auth; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets queue name. + /// + [JsonProperty(PropertyName = "queueName")] + public string QueueName { get; set; } + + /// + /// Gets or sets queue length. + /// + [JsonProperty(PropertyName = "queueLength")] + public int? QueueLength { get; set; } + + /// + /// Gets or sets authentication secrets for the queue scale rule. + /// + [JsonProperty(PropertyName = "auth")] + public IList Auth { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs new file mode 100644 index 0000000000000..f0cc83620c25d --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs @@ -0,0 +1,69 @@ +// +// 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; + + /// + /// Container App Private Registry + /// + public partial class RegistryCredentials + { + /// + /// Initializes a new instance of the RegistryCredentials class. + /// + public RegistryCredentials() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RegistryCredentials class. + /// + /// Container Registry Server + /// Container Registry Username + /// The name of the Secret that + /// contains the registry login password + public RegistryCredentials(string server = default(string), string username = default(string), string passwordSecretRef = default(string)) + { + Server = server; + Username = username; + PasswordSecretRef = passwordSecretRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets container Registry Server + /// + [JsonProperty(PropertyName = "server")] + public string Server { get; set; } + + /// + /// Gets or sets container Registry Username + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Gets or sets the name of the Secret that contains the registry + /// login password + /// + [JsonProperty(PropertyName = "passwordSecretRef")] + public string PasswordSecretRef { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs new file mode 100644 index 0000000000000..839721b59b922 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs @@ -0,0 +1,157 @@ +// +// 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; + + /// + /// Container App Revision. + /// + [Rest.Serialization.JsonTransformation] + public partial class Revision : Resource + { + /// + /// Initializes a new instance of the Revision class. + /// + public Revision() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Revision class. + /// + /// Resource Location. + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Resource tags. + /// Timestamp describing when the revision + /// was created + /// by controller + /// Fully qualified domain name of the + /// revision + /// Container App Revision Template with all + /// possible settings and the + /// defaults if user did not provide them. The defaults are populated + /// as they were at the creation time + /// Boolean describing if the Revision is + /// Active + /// Number of pods currently running for this + /// revision + /// Traffic weight assigned to this + /// revision + /// Optional Field - Platform Error + /// Message + /// Current health State of the revision. + /// Possible values include: 'Healthy', 'Unhealthy', 'None' + /// Current provisioning State of the + /// revision. Possible values include: 'Provisioning', 'Provisioned', + /// 'Failed', 'Deprovisioning', 'Deprovisioned' + public Revision(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.DateTime? createdTime = default(System.DateTime?), string fqdn = default(string), Template template = default(Template), bool? active = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), string provisioningError = default(string), string healthState = default(string), string provisioningState = default(string)) + : base(location, id, name, kind, type, tags) + { + CreatedTime = createdTime; + Fqdn = fqdn; + Template = template; + Active = active; + Replicas = replicas; + TrafficWeight = trafficWeight; + ProvisioningError = provisioningError; + HealthState = healthState; + ProvisioningState = provisioningState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets timestamp describing when the revision was created + /// by controller + /// + [JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime { get; private set; } + + /// + /// Gets fully qualified domain name of the revision + /// + [JsonProperty(PropertyName = "properties.fqdn")] + public string Fqdn { get; private set; } + + /// + /// Gets container App Revision Template with all possible settings and + /// the + /// defaults if user did not provide them. The defaults are populated + /// as they were at the creation time + /// + [JsonProperty(PropertyName = "properties.template")] + public Template Template { get; private set; } + + /// + /// Gets boolean describing if the Revision is Active + /// + [JsonProperty(PropertyName = "properties.active")] + public bool? Active { get; private set; } + + /// + /// Gets number of pods currently running for this revision + /// + [JsonProperty(PropertyName = "properties.replicas")] + public int? Replicas { get; private set; } + + /// + /// Gets traffic weight assigned to this revision + /// + [JsonProperty(PropertyName = "properties.trafficWeight")] + public int? TrafficWeight { get; private set; } + + /// + /// Gets optional Field - Platform Error Message + /// + [JsonProperty(PropertyName = "properties.provisioningError")] + public string ProvisioningError { get; private set; } + + /// + /// Gets current health State of the revision. Possible values include: + /// 'Healthy', 'Unhealthy', 'None' + /// + [JsonProperty(PropertyName = "properties.healthState")] + public string HealthState { get; private set; } + + /// + /// Gets current provisioning State of the revision. Possible values + /// include: 'Provisioning', 'Provisioned', 'Failed', 'Deprovisioning', + /// 'Deprovisioned' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private 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/RevisionHealthState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionHealthState.cs new file mode 100644 index 0000000000000..cff421706e541 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionHealthState.cs @@ -0,0 +1,23 @@ +// +// 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 +{ + + /// + /// Defines values for RevisionHealthState. + /// + public static class RevisionHealthState + { + public const string Healthy = "Healthy"; + public const string Unhealthy = "Unhealthy"; + public const string None = "None"; + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs new file mode 100644 index 0000000000000..7160dda110bb3 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs @@ -0,0 +1,25 @@ +// +// 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 +{ + + /// + /// Defines values for RevisionProvisioningState. + /// + public static class RevisionProvisioningState + { + public const string Provisioning = "Provisioning"; + public const string Provisioned = "Provisioned"; + public const string Failed = "Failed"; + public const string Deprovisioning = "Deprovisioning"; + public const string Deprovisioned = "Deprovisioned"; + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs new file mode 100644 index 0000000000000..38da820128714 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs @@ -0,0 +1,72 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App scaling configurations. + /// + public partial class Scale + { + /// + /// Initializes a new instance of the Scale class. + /// + public Scale() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Scale class. + /// + /// Optional. Minimum number of container + /// replicas. + /// Optional. Maximum number of container + /// replicas. Defaults to 10 if not set. + /// Scaling rules. + public Scale(int? minReplicas = default(int?), int? maxReplicas = default(int?), IList rules = default(IList)) + { + MinReplicas = minReplicas; + MaxReplicas = maxReplicas; + Rules = rules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional. Minimum number of container replicas. + /// + [JsonProperty(PropertyName = "minReplicas")] + public int? MinReplicas { get; set; } + + /// + /// Gets or sets optional. Maximum number of container replicas. + /// Defaults to 10 if not set. + /// + [JsonProperty(PropertyName = "maxReplicas")] + public int? MaxReplicas { get; set; } + + /// + /// Gets or sets scaling rules. + /// + [JsonProperty(PropertyName = "rules")] + public IList Rules { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs new file mode 100644 index 0000000000000..af5c098ac90be --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs @@ -0,0 +1,75 @@ +// +// 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; + + /// + /// Container App container scaling rule. + /// + public partial class ScaleRule + { + /// + /// Initializes a new instance of the ScaleRule class. + /// + public ScaleRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScaleRule class. + /// + /// Scale Rule Name + /// Azure Queue based scaling. + /// Custom scale rule. + /// HTTP requests based scaling. + public ScaleRule(string name = default(string), QueueScaleRule azureQueue = default(QueueScaleRule), CustomScaleRule custom = default(CustomScaleRule), HttpScaleRule http = default(HttpScaleRule)) + { + Name = name; + AzureQueue = azureQueue; + Custom = custom; + Http = http; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets scale Rule Name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets azure Queue based scaling. + /// + [JsonProperty(PropertyName = "azureQueue")] + public QueueScaleRule AzureQueue { get; set; } + + /// + /// Gets or sets custom scale rule. + /// + [JsonProperty(PropertyName = "custom")] + public CustomScaleRule Custom { get; set; } + + /// + /// Gets or sets HTTP requests based scaling. + /// + [JsonProperty(PropertyName = "http")] + public HttpScaleRule Http { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs new file mode 100644 index 0000000000000..ad8cc49bd56ad --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs @@ -0,0 +1,62 @@ +// +// 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; + + /// + /// Auth Secrets for Container App Scale Rule + /// + public partial class ScaleRuleAuth + { + /// + /// Initializes a new instance of the ScaleRuleAuth class. + /// + public ScaleRuleAuth() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScaleRuleAuth class. + /// + /// Name of the Container App secret from which + /// to pull the auth params. + /// Trigger Parameter that uses the + /// secret + public ScaleRuleAuth(string secretRef = default(string), string triggerParameter = default(string)) + { + SecretRef = secretRef; + TriggerParameter = triggerParameter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the Container App secret from which to pull + /// the auth params. + /// + [JsonProperty(PropertyName = "secretRef")] + public string SecretRef { get; set; } + + /// + /// Gets or sets trigger Parameter that uses the secret + /// + [JsonProperty(PropertyName = "triggerParameter")] + public string TriggerParameter { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.cs new file mode 100644 index 0000000000000..9d084b32c2745 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.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; + + /// + /// Container App Secret. + /// + public partial class Secret + { + /// + /// Initializes a new instance of the Secret class. + /// + public Secret() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Secret class. + /// + /// Secret Name. + /// Secret Value. + public Secret(string name = default(string), string value = default(string)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets secret Name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets secret Value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs new file mode 100644 index 0000000000000..1d6c2763e6193 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs @@ -0,0 +1,67 @@ +// +// 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 Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App Secrets Collection ARM resource. + /// + public partial class SecretsCollection + { + /// + /// Initializes a new instance of the SecretsCollection class. + /// + public SecretsCollection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SecretsCollection class. + /// + /// Collection of resources. + public SecretsCollection(IList value) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets collection of resources. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs index 01182698e4156..5126311bab83c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs @@ -70,7 +70,11 @@ public StaticSiteARMResource() /// registered with the static site /// The provider that submitted the last /// deployment to the primary environment of the static site. - public StaticSiteARMResource(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string defaultHostname = default(string), string repositoryUrl = default(string), string branch = default(string), IList customDomains = default(IList), string repositoryToken = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties), IList privateEndpointConnections = default(IList), StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), StaticSiteTemplateOptions templateProperties = default(StaticSiteTemplateOptions), string contentDistributionEndpoint = default(string), string keyVaultReferenceIdentity = default(string), IList userProvidedFunctionApps = default(IList), string provider = default(string), SkuDescription sku = default(SkuDescription), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) + /// State indicating the status + /// of the enterprise grade CDN serving traffic to the static web app. + /// Possible values include: 'Enabled', 'Enabling', 'Disabled', + /// 'Disabling' + public StaticSiteARMResource(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string defaultHostname = default(string), string repositoryUrl = default(string), string branch = default(string), IList customDomains = default(IList), string repositoryToken = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties), IList privateEndpointConnections = default(IList), StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), StaticSiteTemplateOptions templateProperties = default(StaticSiteTemplateOptions), string contentDistributionEndpoint = default(string), string keyVaultReferenceIdentity = default(string), IList userProvidedFunctionApps = default(IList), string provider = default(string), string enterpriseGradeCdnStatus = default(string), SkuDescription sku = default(SkuDescription), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) : base(location, id, name, kind, type, tags) { DefaultHostname = defaultHostname; @@ -87,6 +91,7 @@ public StaticSiteARMResource() KeyVaultReferenceIdentity = keyVaultReferenceIdentity; UserProvidedFunctionApps = userProvidedFunctionApps; Provider = provider; + EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; Sku = sku; Identity = identity; CustomInit(); @@ -181,11 +186,19 @@ public StaticSiteARMResource() public IList UserProvidedFunctionApps { get; private set; } /// - /// Gets the provider that submitted the last deployment to the primary - /// environment of the static site. + /// Gets or sets the provider that submitted the last deployment to the + /// primary environment of the static site. /// [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; private set; } + public string Provider { get; set; } + + /// + /// Gets or sets state indicating the status of the enterprise grade + /// CDN serving traffic to the static web app. Possible values include: + /// 'Enabled', 'Enabling', 'Disabled', 'Disabling' + /// + [JsonProperty(PropertyName = "properties.enterpriseGradeCdnStatus")] + public string EnterpriseGradeCdnStatus { get; set; } /// /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs index c7c8eb15aff93..9daaabe8e430a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs @@ -68,7 +68,11 @@ public StaticSitePatchResource() /// registered with the static site /// The provider that submitted the last /// deployment to the primary environment of the static site. - public StaticSitePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string defaultHostname = default(string), string repositoryUrl = default(string), string branch = default(string), IList customDomains = default(IList), string repositoryToken = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties), IList privateEndpointConnections = default(IList), StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), StaticSiteTemplateOptions templateProperties = default(StaticSiteTemplateOptions), string contentDistributionEndpoint = default(string), string keyVaultReferenceIdentity = default(string), IList userProvidedFunctionApps = default(IList), string provider = default(string)) + /// State indicating the status + /// of the enterprise grade CDN serving traffic to the static web app. + /// Possible values include: 'Enabled', 'Enabling', 'Disabled', + /// 'Disabling' + public StaticSitePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string defaultHostname = default(string), string repositoryUrl = default(string), string branch = default(string), IList customDomains = default(IList), string repositoryToken = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties), IList privateEndpointConnections = default(IList), StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), StaticSiteTemplateOptions templateProperties = default(StaticSiteTemplateOptions), string contentDistributionEndpoint = default(string), string keyVaultReferenceIdentity = default(string), IList userProvidedFunctionApps = default(IList), string provider = default(string), string enterpriseGradeCdnStatus = default(string)) : base(id, name, kind, type) { DefaultHostname = defaultHostname; @@ -85,6 +89,7 @@ public StaticSitePatchResource() KeyVaultReferenceIdentity = keyVaultReferenceIdentity; UserProvidedFunctionApps = userProvidedFunctionApps; Provider = provider; + EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; CustomInit(); } @@ -177,11 +182,19 @@ public StaticSitePatchResource() public IList UserProvidedFunctionApps { get; private set; } /// - /// Gets the provider that submitted the last deployment to the primary - /// environment of the static site. + /// Gets or sets the provider that submitted the last deployment to the + /// primary environment of the static site. /// [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; private set; } + public string Provider { get; set; } + + /// + /// Gets or sets state indicating the status of the enterprise grade + /// CDN serving traffic to the static web app. Possible values include: + /// 'Enabled', 'Enabling', 'Disabled', 'Disabling' + /// + [JsonProperty(PropertyName = "properties.enterpriseGradeCdnStatus")] + public string EnterpriseGradeCdnStatus { get; set; } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs new file mode 100644 index 0000000000000..5273e17a81ba0 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs @@ -0,0 +1,84 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Container App versioned application definition. + /// Defines the desired state of an immutable revision. + /// Any changes to this section Will result in a new revision being created + /// + public partial class Template + { + /// + /// Initializes a new instance of the Template class. + /// + public Template() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Template class. + /// + /// User friendly suffix that is appended + /// to the revision name + /// List of container definitions for the + /// Container App. + /// Scaling properties for the Container + /// App. + /// Dapr configuration for the Container + /// App. + public Template(string revisionSuffix = default(string), IList containers = default(IList), Scale scale = default(Scale), Dapr dapr = default(Dapr)) + { + RevisionSuffix = revisionSuffix; + Containers = containers; + Scale = scale; + Dapr = dapr; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user friendly suffix that is appended to the revision + /// name + /// + [JsonProperty(PropertyName = "revisionSuffix")] + public string RevisionSuffix { get; set; } + + /// + /// Gets or sets list of container definitions for the Container App. + /// + [JsonProperty(PropertyName = "containers")] + public IList Containers { get; set; } + + /// + /// Gets or sets scaling properties for the Container App. + /// + [JsonProperty(PropertyName = "scale")] + public Scale Scale { get; set; } + + /// + /// Gets or sets dapr configuration for the Container App. + /// + [JsonProperty(PropertyName = "dapr")] + public Dapr Dapr { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs index 3bab06bd3ab37..37abd536aaa53 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the token store. /// - [Rest.Serialization.JsonTransformation] - public partial class TokenStore : ProxyOnlyResource + public partial class TokenStore { /// /// Initializes a new instance of the TokenStore class. @@ -32,10 +29,6 @@ public TokenStore() /// /// Initializes a new instance of the TokenStore class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>true</code> to durably /// store platform-specific security tokens that are obtained during /// login flows; otherwise, <code>false</code>. @@ -47,8 +40,7 @@ public TokenStore() /// of the tokens if a file system is used. /// The configuration settings of the /// storage of the tokens if blob storage is used. - public TokenStore(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), double? tokenRefreshExtensionHours = default(double?), FileSystemTokenStore fileSystem = default(FileSystemTokenStore), BlobStorageTokenStore azureBlobStorage = default(BlobStorageTokenStore)) - : base(id, name, kind, type) + public TokenStore(bool? enabled = default(bool?), double? tokenRefreshExtensionHours = default(double?), FileSystemTokenStore fileSystem = default(FileSystemTokenStore), BlobStorageTokenStore azureBlobStorage = default(BlobStorageTokenStore)) { Enabled = enabled; TokenRefreshExtensionHours = tokenRefreshExtensionHours; @@ -69,7 +61,7 @@ public TokenStore() /// &lt;code&gt;false&lt;/code&gt;. /// The default is &lt;code&gt;false&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// @@ -77,21 +69,21 @@ public TokenStore() /// that a session token can be used to /// call the token refresh API. The default is 72 hours. /// - [JsonProperty(PropertyName = "properties.tokenRefreshExtensionHours")] + [JsonProperty(PropertyName = "tokenRefreshExtensionHours")] public double? TokenRefreshExtensionHours { get; set; } /// /// Gets or sets the configuration settings of the storage of the /// tokens if a file system is used. /// - [JsonProperty(PropertyName = "properties.fileSystem")] + [JsonProperty(PropertyName = "fileSystem")] public FileSystemTokenStore FileSystem { get; set; } /// /// Gets or sets the configuration settings of the storage of the /// tokens if blob storage is used. /// - [JsonProperty(PropertyName = "properties.azureBlobStorage")] + [JsonProperty(PropertyName = "azureBlobStorage")] public BlobStorageTokenStore AzureBlobStorage { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs new file mode 100644 index 0000000000000..c097f640232e5 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs @@ -0,0 +1,69 @@ +// +// 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; + + /// + /// Traffic weight assigned to a revision + /// + public partial class TrafficWeight + { + /// + /// Initializes a new instance of the TrafficWeight class. + /// + public TrafficWeight() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrafficWeight class. + /// + /// Name of a revision + /// Traffic weight assigned to a revision + /// Indicates that the traffic weight + /// belongs to a latest stable revision + public TrafficWeight(string revisionName = default(string), int? weight = default(int?), bool? latestRevision = default(bool?)) + { + RevisionName = revisionName; + Weight = weight; + LatestRevision = latestRevision; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of a revision + /// + [JsonProperty(PropertyName = "revisionName")] + public string RevisionName { get; set; } + + /// + /// Gets or sets traffic weight assigned to a revision + /// + [JsonProperty(PropertyName = "weight")] + public int? Weight { get; set; } + + /// + /// Gets or sets indicates that the traffic weight belongs to a latest + /// stable revision + /// + [JsonProperty(PropertyName = "latestRevision")] + public bool? LatestRevision { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs index 976e997acb803..a79fef356dc4b 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// Triggered Web Job Run Information. /// - [Rest.Serialization.JsonTransformation] - public partial class TriggeredJobRun : ProxyOnlyResource + public partial class TriggeredJobRun { /// /// Initializes a new instance of the TriggeredJobRun class. @@ -32,10 +29,6 @@ public TriggeredJobRun() /// /// Initializes a new instance of the TriggeredJobRun class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// Job ID. /// Job name. /// Job status. Possible values include: @@ -48,8 +41,7 @@ public TriggeredJobRun() /// Job URL. /// Job name. /// Job trigger. - public TriggeredJobRun(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string webJobId = default(string), string webJobName = default(string), TriggeredWebJobStatus? status = default(TriggeredWebJobStatus?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string duration = default(string), string outputUrl = default(string), string errorUrl = default(string), string url = default(string), string jobName = default(string), string trigger = default(string)) - : base(id, name, kind, type) + public TriggeredJobRun(string webJobId = default(string), string webJobName = default(string), TriggeredWebJobStatus? status = default(TriggeredWebJobStatus?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string duration = default(string), string outputUrl = default(string), string errorUrl = default(string), string url = default(string), string jobName = default(string), string trigger = default(string)) { WebJobId = webJobId; WebJobName = webJobName; @@ -73,68 +65,68 @@ public TriggeredJobRun() /// /// Gets or sets job ID. /// - [JsonProperty(PropertyName = "properties.web_job_id")] + [JsonProperty(PropertyName = "web_job_id")] public string WebJobId { get; set; } /// /// Gets or sets job name. /// - [JsonProperty(PropertyName = "properties.web_job_name")] + [JsonProperty(PropertyName = "web_job_name")] public string WebJobName { get; set; } /// /// Gets or sets job status. Possible values include: 'Success', /// 'Failed', 'Error' /// - [JsonProperty(PropertyName = "properties.status")] + [JsonProperty(PropertyName = "status")] public TriggeredWebJobStatus? Status { get; set; } /// /// Gets or sets start time. /// - [JsonProperty(PropertyName = "properties.start_time")] + [JsonProperty(PropertyName = "start_time")] public System.DateTime? StartTime { get; set; } /// /// Gets or sets end time. /// - [JsonProperty(PropertyName = "properties.end_time")] + [JsonProperty(PropertyName = "end_time")] public System.DateTime? EndTime { get; set; } /// /// Gets or sets job duration. /// - [JsonProperty(PropertyName = "properties.duration")] + [JsonProperty(PropertyName = "duration")] public string Duration { get; set; } /// /// Gets or sets output URL. /// - [JsonProperty(PropertyName = "properties.output_url")] + [JsonProperty(PropertyName = "output_url")] public string OutputUrl { get; set; } /// /// Gets or sets error URL. /// - [JsonProperty(PropertyName = "properties.error_url")] + [JsonProperty(PropertyName = "error_url")] public string ErrorUrl { get; set; } /// /// Gets or sets job URL. /// - [JsonProperty(PropertyName = "properties.url")] + [JsonProperty(PropertyName = "url")] public string Url { get; set; } /// /// Gets or sets job name. /// - [JsonProperty(PropertyName = "properties.job_name")] + [JsonProperty(PropertyName = "job_name")] public string JobName { get; set; } /// /// Gets or sets job trigger. /// - [JsonProperty(PropertyName = "properties.trigger")] + [JsonProperty(PropertyName = "trigger")] public string Trigger { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs index 32d8b05a116ac..75b4126e49b3a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs @@ -10,16 +10,13 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; /// /// The configuration settings of the Twitter provider. /// - [Rest.Serialization.JsonTransformation] - public partial class Twitter : ProxyOnlyResource + public partial class Twitter { /// /// Initializes a new instance of the Twitter class. @@ -32,17 +29,12 @@ public Twitter() /// /// Initializes a new instance of the Twitter class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// <code>false</code> if the Twitter /// provider should not be enabled despite the set registration; /// otherwise, <code>true</code>. /// The configuration settings of the app /// registration for the Twitter provider. - public Twitter(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), TwitterRegistration registration = default(TwitterRegistration)) - : base(id, name, kind, type) + public Twitter(bool? enabled = default(bool?), TwitterRegistration registration = default(TwitterRegistration)) { Enabled = enabled; Registration = registration; @@ -60,14 +52,14 @@ public Twitter() /// registration; otherwise, /// &lt;code&gt;true&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.enabled")] + [JsonProperty(PropertyName = "enabled")] public bool? Enabled { get; set; } /// /// Gets or sets the configuration settings of the app registration for /// the Twitter provider. /// - [JsonProperty(PropertyName = "properties.registration")] + [JsonProperty(PropertyName = "registration")] public TwitterRegistration Registration { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs index 466cd1f256f8a..9ff08bb3bcd81 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -19,8 +17,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// The configuration settings of the app registration for the Twitter /// provider. /// - [Rest.Serialization.JsonTransformation] - public partial class TwitterRegistration : ProxyOnlyResource + public partial class TwitterRegistration { /// /// Initializes a new instance of the TwitterRegistration class. @@ -33,10 +30,6 @@ public TwitterRegistration() /// /// Initializes a new instance of the TwitterRegistration class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The OAuth 1.0a consumer key of the /// Twitter application used for sign-in. /// This setting is required for enabling Twitter Sign-In. @@ -45,8 +38,7 @@ public TwitterRegistration() /// The app setting name that /// contains the OAuth 1.0a consumer secret of the Twitter /// application used for sign-in. - public TwitterRegistration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string consumerKey = default(string), string consumerSecretSettingName = default(string)) - : base(id, name, kind, type) + public TwitterRegistration(string consumerKey = default(string), string consumerSecretSettingName = default(string)) { ConsumerKey = consumerKey; ConsumerSecretSettingName = consumerSecretSettingName; @@ -64,7 +56,7 @@ public TwitterRegistration() /// This setting is required for enabling Twitter Sign-In. /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in /// - [JsonProperty(PropertyName = "properties.consumerKey")] + [JsonProperty(PropertyName = "consumerKey")] public string ConsumerKey { get; set; } /// @@ -72,7 +64,7 @@ public TwitterRegistration() /// consumer secret of the Twitter /// application used for sign-in. /// - [JsonProperty(PropertyName = "properties.consumerSecretSettingName")] + [JsonProperty(PropertyName = "consumerSecretSettingName")] public string ConsumerSecretSettingName { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs index 9105621d291ea..d2ddf8a0f85e3 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.WebSites.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -20,8 +18,7 @@ namespace Microsoft.Azure.Management.WebSites.Models /// /// Virtual Network information contract. /// - [Rest.Serialization.JsonTransformation] - public partial class VnetInfo : ProxyOnlyResource + public partial class VnetInfo { /// /// Initializes a new instance of the VnetInfo class. @@ -34,10 +31,6 @@ public VnetInfo() /// /// Initializes a new instance of the VnetInfo class. /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. /// The Virtual Network's resource /// ID. /// The client certificate @@ -55,8 +48,7 @@ public VnetInfo() /// addresses. /// Flag that is used to denote if this is VNET /// injection - public VnetInfo(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetResourceId = default(string), string certThumbprint = default(string), string certBlob = default(string), IList routes = default(IList), bool? resyncRequired = default(bool?), string dnsServers = default(string), bool? isSwift = default(bool?)) - : base(id, name, kind, type) + public VnetInfo(string vnetResourceId = default(string), string certThumbprint = default(string), string certBlob = default(string), IList routes = default(IList), bool? resyncRequired = default(bool?), string dnsServers = default(string), bool? isSwift = default(bool?)) { VnetResourceId = vnetResourceId; CertThumbprint = certThumbprint; @@ -76,13 +68,13 @@ public VnetInfo() /// /// Gets or sets the Virtual Network's resource ID. /// - [JsonProperty(PropertyName = "properties.vnetResourceId")] + [JsonProperty(PropertyName = "vnetResourceId")] public string VnetResourceId { get; set; } /// /// Gets the client certificate thumbprint. /// - [JsonProperty(PropertyName = "properties.certThumbprint")] + [JsonProperty(PropertyName = "certThumbprint")] public string CertThumbprint { get; private set; } /// @@ -90,13 +82,13 @@ public VnetInfo() /// key of the private key used to authenticate a /// Point-To-Site VPN connection. /// - [JsonProperty(PropertyName = "properties.certBlob")] + [JsonProperty(PropertyName = "certBlob")] public string CertBlob { get; set; } /// /// Gets the routes that this Virtual Network connection uses. /// - [JsonProperty(PropertyName = "properties.routes")] + [JsonProperty(PropertyName = "routes")] public IList Routes { get; private set; } /// @@ -104,20 +96,20 @@ public VnetInfo() /// required; otherwise, /// &lt;code&gt;false&lt;/code&gt;. /// - [JsonProperty(PropertyName = "properties.resyncRequired")] + [JsonProperty(PropertyName = "resyncRequired")] public bool? ResyncRequired { get; private set; } /// /// Gets or sets DNS servers to be used by this Virtual Network. This /// should be a comma-separated list of IP addresses. /// - [JsonProperty(PropertyName = "properties.dnsServers")] + [JsonProperty(PropertyName = "dnsServers")] public string DnsServers { get; set; } /// /// Gets or sets flag that is used to denote if this is VNET injection /// - [JsonProperty(PropertyName = "properties.isSwift")] + [JsonProperty(PropertyName = "isSwift")] public bool? IsSwift { get; set; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs new file mode 100644 index 0000000000000..a5be2d141a932 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs @@ -0,0 +1,124 @@ +// +// 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; + + /// + /// Virtual Network information ARM resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class VnetInfoResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the VnetInfoResource class. + /// + public VnetInfoResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VnetInfoResource class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// The Virtual Network's resource + /// ID. + /// The client certificate + /// thumbprint. + /// A certificate file (.cer) blob containing + /// the public key of the private key used to authenticate a + /// Point-To-Site VPN connection. + /// The routes that this Virtual Network + /// connection uses. + /// <code>true</code> if a + /// resync is required; otherwise, + /// <code>false</code>. + /// DNS servers to be used by this Virtual + /// Network. This should be a comma-separated list of IP + /// addresses. + /// Flag that is used to denote if this is VNET + /// injection + public VnetInfoResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetResourceId = default(string), string certThumbprint = default(string), string certBlob = default(string), IList routes = default(IList), bool? resyncRequired = default(bool?), string dnsServers = default(string), bool? isSwift = default(bool?)) + : base(id, name, kind, type) + { + VnetResourceId = vnetResourceId; + CertThumbprint = certThumbprint; + CertBlob = certBlob; + Routes = routes; + ResyncRequired = resyncRequired; + DnsServers = dnsServers; + IsSwift = isSwift; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Virtual Network's resource ID. + /// + [JsonProperty(PropertyName = "properties.vnetResourceId")] + public string VnetResourceId { get; set; } + + /// + /// Gets the client certificate thumbprint. + /// + [JsonProperty(PropertyName = "properties.certThumbprint")] + public string CertThumbprint { get; private set; } + + /// + /// Gets or sets a certificate file (.cer) blob containing the public + /// key of the private key used to authenticate a + /// Point-To-Site VPN connection. + /// + [JsonProperty(PropertyName = "properties.certBlob")] + public string CertBlob { get; set; } + + /// + /// Gets the routes that this Virtual Network connection uses. + /// + [JsonProperty(PropertyName = "properties.routes")] + public IList Routes { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if a resync is + /// required; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.resyncRequired")] + public bool? ResyncRequired { get; private set; } + + /// + /// Gets or sets DNS servers to be used by this Virtual Network. This + /// should be a comma-separated list of IP addresses. + /// + [JsonProperty(PropertyName = "properties.dnsServers")] + public string DnsServers { get; set; } + + /// + /// Gets or sets flag that is used to denote if this is VNET injection + /// + [JsonProperty(PropertyName = "properties.isSwift")] + public bool? IsSwift { get; set; } + + } +} 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 35c6e8e27f9b5..713503bcfab65 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,54 +19,45 @@ public static IEnumerable> ApiInfo_WebSiteManageme { return new Tuple[] { - 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"), + new Tuple("CertificateRegistration", "AppServiceCertificateOrders", "2021-03-01"), + new Tuple("CertificateRegistration", "CertificateOrdersDiagnostics", "2021-03-01"), + new Tuple("CertificateRegistration", "CertificateRegistrationProvider", "2021-03-01"), + new Tuple("DomainRegistration", "DomainRegistrationProvider", "2021-03-01"), + new Tuple("DomainRegistration", "Domains", "2021-03-01"), + new Tuple("DomainRegistration", "TopLevelDomains", "2021-03-01"), + new Tuple("Web", "AppServiceEnvironments", "2021-03-01"), + new Tuple("Web", "AppServicePlans", "2021-03-01"), + new Tuple("Web", "Certificates", "2021-03-01"), + new Tuple("Web", "CheckNameAvailability", "2021-03-01"), + new Tuple("Web", "ContainerApps", "2021-03-01"), + new Tuple("Web", "ContainerAppsRevisions", "2021-03-01"), + new Tuple("Web", "DeletedWebApps", "2021-03-01"), + new Tuple("Web", "Diagnostics", "2021-03-01"), + new Tuple("Web", "GetPublishingUser", "2021-03-01"), + new Tuple("Web", "GetSourceControl", "2021-03-01"), + new Tuple("Web", "GetSubscriptionDeploymentLocations", "2021-03-01"), + new Tuple("Web", "Global", "2021-03-01"), + new Tuple("Web", "KubeEnvironments", "2021-03-01"), + new Tuple("Web", "ListBillingMeters", "2021-03-01"), + new Tuple("Web", "ListCustomHostNameSites", "2021-03-01"), + new Tuple("Web", "ListGeoRegions", "2021-03-01"), + new Tuple("Web", "ListPremierAddOnOffers", "2021-03-01"), + new Tuple("Web", "ListSiteIdentifiersAssignedToHostName", "2021-03-01"), + new Tuple("Web", "ListSkus", "2021-03-01"), + new Tuple("Web", "ListSourceControls", "2021-03-01"), + new Tuple("Web", "Provider", "2021-03-01"), + new Tuple("Web", "Recommendations", "2021-03-01"), + new Tuple("Web", "ResourceHealthMetadata", "2021-03-01"), + new Tuple("Web", "StaticSites", "2021-03-01"), + new Tuple("Web", "UpdatePublishingUser", "2021-03-01"), + new Tuple("Web", "UpdateSourceControl", "2021-03-01"), + new Tuple("Web", "Validate", "2021-03-01"), + new Tuple("Web", "VerifyHostingEnvironmentVnet", "2021-03-01"), + new Tuple("Web", "WebApps", "2021-03-01"), + new Tuple("WebSiteManagementClient", "Move", "2021-03-01"), + new Tuple("WebSiteManagementClient", "ValidateMove", "2021-03-01"), }.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 --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 = "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 beae94064edb7..bb6e9a3c706b1 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs @@ -4839,21 +4839,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates site's Authentication / Authorization settings for apps via the V2 + /// Gets site's Authentication / Authorization settings for apps via the V2 /// format /// /// - /// Description for Updates site's Authentication / Authorization settings for + /// Description for Gets site's Authentication / Authorization settings for /// apps via the V2 format /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -4876,7 +4873,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAuthSettingsV2WithoutSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4901,10 +4898,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteAuthSettingsV2 == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettingsV2"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -4922,9 +4915,8 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteAuthSettingsV2", siteAuthSettingsV2); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2WithoutSecrets", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -4944,7 +4936,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) @@ -4975,12 +4967,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteAuthSettingsV2 != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettingsV2, 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) { @@ -5064,18 +5050,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets site's Authentication / Authorization settings for apps via the V2 + /// Updates site's Authentication / Authorization settings for apps via the V2 /// format /// /// - /// Description for Gets site's Authentication / Authorization settings for + /// Description for Updates site's Authentication / Authorization settings for /// apps via the V2 format /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. + /// + /// + /// Auth settings associated with web app. /// /// /// Headers that will be added to request. @@ -5098,7 +5087,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5123,6 +5112,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteAuthSettingsV2 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettingsV2"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5140,12 +5133,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("siteAuthSettingsV2", siteAuthSettingsV2); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsV2", 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/authsettingsV2/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2").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)); @@ -5161,7 +5155,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) @@ -5192,6 +5186,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteAuthSettingsV2 != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettingsV2, 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) { @@ -5275,10 +5275,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the Azure storage account configurations of an app. + /// Gets site's Authentication / Authorization settings for apps via the V2 + /// format /// /// - /// Description for Updates the Azure storage account configurations of an app. + /// Description for Gets site's Authentication / Authorization settings for + /// apps via the V2 format /// /// /// Name of the resource group to which the resource belongs. @@ -5286,9 +5288,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Azure storage accounts of the app. - /// /// /// Headers that will be added to request. /// @@ -5310,7 +5309,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5335,10 +5334,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (azureStorageAccounts == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "azureStorageAccounts"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5356,13 +5351,12 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("azureStorageAccounts", azureStorageAccounts); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAzureStorageAccounts", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2", 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/azurestorageaccounts").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/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)); @@ -5378,7 +5372,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) @@ -5409,12 +5403,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(azureStorageAccounts != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(azureStorageAccounts, 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) { @@ -5465,7 +5453,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")) @@ -5478,7 +5466,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) { @@ -5498,10 +5486,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Azure storage account configurations of an app. + /// Updates the Azure storage account configurations of an app. /// /// - /// Description for Gets the Azure storage account configurations of an app. + /// Description for Updates the Azure storage account configurations of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -5509,6 +5497,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Azure storage accounts of the app. + /// /// /// Headers that will be added to request. /// @@ -5530,7 +5521,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5555,6 +5546,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (azureStorageAccounts == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "azureStorageAccounts"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5572,12 +5567,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("azureStorageAccounts", azureStorageAccounts); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAzureStorageAccounts", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAzureStorageAccounts", 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/azurestorageaccounts/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts").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)); @@ -5593,7 +5589,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) @@ -5624,6 +5620,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(azureStorageAccounts != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(azureStorageAccounts, 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) { @@ -5707,10 +5709,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the backup configuration of an app. + /// Gets the Azure storage account configurations of an app. /// /// - /// Description for Updates the backup configuration of an app. + /// Description for Gets the Azure storage account configurations of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -5718,9 +5720,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Edited backup configuration. - /// /// /// Headers that will be added to request. /// @@ -5742,7 +5741,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5767,14 +5766,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - 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"); @@ -5792,13 +5783,12 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateBackupConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListAzureStorageAccounts", 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/backup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/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)); @@ -5814,7 +5804,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) @@ -5845,12 +5835,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) { @@ -5901,7 +5885,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")) @@ -5914,7 +5898,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) { @@ -5934,10 +5918,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes the backup configuration of an app. + /// Updates the backup configuration of an app. /// /// - /// Description for Deletes the backup configuration of an app. + /// Description for Updates the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -5945,6 +5929,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Edited backup configuration. + /// /// /// Headers that will be added to request. /// @@ -5954,6 +5941,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 /// @@ -5963,7 +5953,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5988,6 +5978,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + 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"); @@ -6005,8 +6003,9 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateBackupConfiguration", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -6026,7 +6025,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) @@ -6057,6 +6056,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) { @@ -6107,13 +6112,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); @@ -6122,10 +6145,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the backup configuration of an app. + /// Deletes the backup configuration of an app. /// /// - /// Description for Gets the backup configuration of an app. + /// Description for Deletes the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -6142,9 +6165,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 /// @@ -6154,7 +6174,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6197,11 +6217,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupConfiguration", 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/backup/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup").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)); @@ -6217,7 +6237,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) @@ -6298,31 +6318,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); @@ -6331,10 +6333,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the config reference app settings and status of an app + /// Gets the backup configuration of an app. /// /// - /// Description for Gets the config reference app settings and status of an app + /// Description for Gets the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -6363,7 +6365,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6406,11 +6408,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferences", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetBackupConfiguration", 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/configreferences/appsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/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)); @@ -6426,7 +6428,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) @@ -6507,7 +6509,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")) @@ -6520,7 +6522,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) { @@ -6540,10 +6542,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the config reference and status of an app + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets the config reference and status of an app + /// Description for Gets the config reference app settings and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -6551,9 +6553,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// App Setting key name. - /// /// /// Headers that will be added to request. /// @@ -6575,7 +6574,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6600,10 +6599,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (appSettingKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettingKey"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -6621,16 +6616,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("appSettingKey", appSettingKey); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingKeyVaultReference", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferences", 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/configreferences/appsettings/{appSettingKey}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{appSettingKey}", System.Uri.EscapeDataString(appSettingKey)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -6725,7 +6718,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")) @@ -6738,7 +6731,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) { @@ -6758,10 +6751,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the config reference app settings and status of an app + /// Gets the config reference and status of an app /// /// - /// Description for Gets the config reference app settings and status of an app + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -6769,6 +6762,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// App Setting key name. + /// /// /// Headers that will be added to request. /// @@ -6790,7 +6786,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6815,6 +6811,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (appSettingKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "appSettingKey"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -6832,14 +6832,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("appSettingKey", appSettingKey); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferences", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingKeyVaultReference", 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/configreferences/connectionstrings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{appSettingKey}", System.Uri.EscapeDataString(appSettingKey)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -6934,7 +6936,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")) @@ -6947,7 +6949,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) { @@ -6967,10 +6969,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the config reference and status of an app + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets the config reference and status of an app + /// Description for Gets the config reference app settings and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -6978,8 +6980,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// /// /// Headers that will be added to request. /// @@ -7001,7 +7001,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7026,10 +7026,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (connectionStringKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStringKey"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -7047,16 +7043,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("connectionStringKey", connectionStringKey); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReference", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferences", 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/configreferences/connectionstrings/{connectionStringKey}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{connectionStringKey}", System.Uri.EscapeDataString(connectionStringKey)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -7151,7 +7145,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")) @@ -7164,7 +7158,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) { @@ -7184,10 +7178,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the connection strings of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Replaces the connection strings of an app. + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -7195,8 +7189,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Connection strings of the app or deployment slot. See example. + /// /// /// /// Headers that will be added to request. @@ -7219,7 +7212,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7244,9 +7237,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (connectionStrings == null) + if (connectionStringKey == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStrings"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionStringKey"); } if (Client.SubscriptionId == null) { @@ -7265,15 +7258,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("connectionStrings", connectionStrings); + tracingParameters.Add("connectionStringKey", connectionStringKey); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConnectionStrings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReference", 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/connectionstrings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{connectionStringKey}", System.Uri.EscapeDataString(connectionStringKey)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -7287,7 +7281,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) @@ -7318,12 +7312,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionStrings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionStrings, 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) { @@ -7374,7 +7362,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")) @@ -7387,7 +7375,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) { @@ -7407,10 +7395,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the connection strings of an app. + /// Replaces the connection strings of an app. /// /// - /// Description for Gets the connection strings of an app. + /// Description for Replaces the connection strings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -7418,6 +7406,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Connection strings of the app or deployment slot. See example. + /// /// /// Headers that will be added to request. /// @@ -7439,7 +7430,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7464,6 +7455,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (connectionStrings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionStrings"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -7481,12 +7476,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("connectionStrings", connectionStrings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConnectionStrings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateConnectionStrings", 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/connectionstrings/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings").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)); @@ -7502,7 +7498,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) @@ -7533,6 +7529,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionStrings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionStrings, 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) { @@ -7616,10 +7618,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the logging configuration of an app. + /// Gets the connection strings of an app. /// /// - /// Description for Gets the logging configuration of an app. + /// Description for Gets the connection strings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -7648,7 +7650,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDiagnosticLogsConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7691,11 +7693,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticLogsConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConnectionStrings", 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/logs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/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)); @@ -7711,7 +7713,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) @@ -7792,7 +7794,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")) @@ -7805,7 +7807,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) { @@ -7825,10 +7827,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the logging configuration of an app. + /// Gets the logging configuration of an app. /// /// - /// Description for Updates the logging configuration of an app. + /// Description for Gets the logging configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -7836,10 +7838,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// /// /// Headers that will be added to request. /// @@ -7861,7 +7859,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateDiagnosticLogsConfigWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDiagnosticLogsConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7886,14 +7884,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteLogsConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteLogsConfig"); - } - if (siteLogsConfig != null) - { - siteLogsConfig.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -7911,9 +7901,8 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteLogsConfig", siteLogsConfig); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDiagnosticLogsConfig", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticLogsConfiguration", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -7933,7 +7922,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) @@ -7964,12 +7953,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteLogsConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteLogsConfig, 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) { @@ -8053,10 +8036,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the metadata of an app. + /// Updates the logging configuration of an app. /// /// - /// Description for Replaces the metadata of an app. + /// Description for Updates the logging configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -8064,8 +8047,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Edited metadata of the app or deployment slot. See example. + /// + /// A SiteLogsConfig JSON object that contains the logging configuration to + /// change in the "properties" property. /// /// /// Headers that will be added to request. @@ -8088,7 +8072,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateMetadataWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateDiagnosticLogsConfigWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8113,9 +8097,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (metadata == null) + if (siteLogsConfig == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteLogsConfig"); + } + if (siteLogsConfig != null) + { + siteLogsConfig.Validate(); } if (Client.SubscriptionId == null) { @@ -8134,13 +8122,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("metadata", metadata); + tracingParameters.Add("siteLogsConfig", siteLogsConfig); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadata", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateDiagnosticLogsConfig", 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/metadata").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs").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)); @@ -8187,9 +8175,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(metadata != null) + if(siteLogsConfig != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadata, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteLogsConfig, 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"); } @@ -8243,7 +8231,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")) @@ -8256,7 +8244,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) { @@ -8276,10 +8264,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the metadata of an app. + /// Replaces the metadata of an app. /// /// - /// Description for Gets the metadata of an app. + /// Description for Replaces the metadata of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -8287,6 +8275,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Edited metadata of the app or deployment slot. See example. + /// /// /// Headers that will be added to request. /// @@ -8308,7 +8299,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListMetadataWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateMetadataWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8333,6 +8324,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (metadata == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -8350,12 +8345,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("metadata", metadata); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetadata", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadata", 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/metadata/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata").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)); @@ -8371,7 +8367,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) @@ -8402,6 +8398,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(metadata != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadata, 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) { @@ -8485,10 +8487,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an app. + /// Gets the metadata of an app. /// /// - /// Description for Gets the Git/FTP publishing credentials of an app. + /// Description for Gets the metadata of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -8497,34 +8499,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginListPublishingCredentialsWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// /// Headers that will be added to request. /// /// @@ -8545,7 +8519,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListMetadataWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8570,14 +8544,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (pushSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "pushSettings"); - } - if (pushSettings != null) - { - pushSettings.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -8595,13 +8561,12 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("pushSettings", pushSettings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSitePushSettings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMetadata", 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/pushsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/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)); @@ -8617,7 +8582,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) @@ -8648,12 +8613,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(pushSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pushSettings, 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) { @@ -8704,7 +8663,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")) @@ -8717,7 +8676,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) { @@ -8737,10 +8696,35 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Push settings associated with web app. + /// Gets the Git/FTP publishing credentials of an app. /// /// - /// Description for Gets the Push settings associated with web app. + /// Description for Gets the Git/FTP publishing credentials of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginListPublishingCredentialsWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates the Push settings associated with web app. + /// + /// + /// Description for Updates the Push settings associated with web app. /// /// /// Name of the resource group to which the resource belongs. @@ -8748,6 +8732,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of web app. /// + /// + /// Push settings associated with web app. + /// /// /// Headers that will be added to request. /// @@ -8769,7 +8756,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8794,6 +8781,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (pushSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pushSettings"); + } + if (pushSettings != null) + { + pushSettings.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -8811,12 +8806,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("pushSettings", pushSettings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSitePushSettings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSitePushSettings", 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/pushsettings/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings").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)); @@ -8832,7 +8828,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) @@ -8863,6 +8859,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(pushSettings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pushSettings, 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) { @@ -8946,18 +8948,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the names of app settings and connection strings that stick to the - /// slot (not swapped). + /// Gets the Push settings associated with web app. /// /// - /// Description for Gets the names of app settings and connection strings that - /// stick to the slot (not swapped). + /// Description for Gets the Push settings associated with web app. /// /// /// 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. @@ -8980,7 +8980,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9023,11 +9023,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotConfigurationNames", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSitePushSettings", 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/slotConfigNames").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/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)); @@ -9043,7 +9043,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) @@ -9124,7 +9124,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")) @@ -9137,7 +9137,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) { @@ -9157,12 +9157,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the names of application settings and connection string that remain - /// with the slot during swap operation. + /// Gets the names of app settings and connection strings that stick to the + /// slot (not swapped). /// /// - /// Description for Updates the names of application settings and connection - /// string that remain with the slot during swap operation. + /// Description for Gets the names of app settings and connection strings that + /// stick to the slot (not swapped). /// /// /// Name of the resource group to which the resource belongs. @@ -9170,9 +9170,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Names of application settings and connection strings. See example. - /// /// /// Headers that will be added to request. /// @@ -9194,7 +9191,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9219,10 +9216,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotConfigNames == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotConfigNames"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -9240,9 +9233,8 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotConfigNames", slotConfigNames); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSlotConfigurationNames", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotConfigurationNames", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -9262,7 +9254,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) @@ -9293,12 +9285,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotConfigNames != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotConfigNames, 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) { @@ -9382,12 +9368,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the configuration of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. + /// Updates the names of application settings and connection string that remain + /// with the slot during swap operation. /// /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. + /// Description for Updates the names of application settings and connection + /// string that remain with the slot during swap operation. /// /// /// Name of the resource group to which the resource belongs. @@ -9395,6 +9381,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Names of application settings and connection strings. See example. + /// /// /// Headers that will be added to request. /// @@ -9416,7 +9405,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9441,6 +9430,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (slotConfigNames == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slotConfigNames"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -9458,12 +9451,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("slotConfigNames", slotConfigNames); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSlotConfigurationNames", 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/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames").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)); @@ -9479,7 +9473,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) @@ -9510,6 +9504,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(slotConfigNames != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotConfigNames, 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) { @@ -9560,7 +9560,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")) @@ -9573,7 +9573,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) { @@ -9593,10 +9593,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the configuration of an app. + /// Gets the configuration of an app, such as platform version and bitness, + /// default documents, virtual applications, Always On, etc. /// /// - /// Description for Updates the configuration of an app. + /// Description for Gets the configuration of an app, such as platform version + /// and bitness, default documents, virtual applications, Always On, etc. /// /// /// Name of the resource group to which the resource belongs. @@ -9604,9 +9606,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteConfig object. See example. - /// /// /// Headers that will be added to request. /// @@ -9628,7 +9627,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9653,14 +9652,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); - } - if (siteConfig != null) - { - siteConfig.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -9678,9 +9669,8 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteConfig", siteConfig); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetConfiguration", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -9700,7 +9690,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) @@ -9731,12 +9721,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, 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) { @@ -9855,7 +9839,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9884,6 +9868,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); } + if (siteConfig != null) + { + siteConfig.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -9903,7 +9891,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("siteConfig", siteConfig); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfiguration", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -9923,7 +9911,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) @@ -10043,12 +10031,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. + /// Updates the configuration 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. + /// Description for Updates the configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -10056,6 +10042,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// JSON representation of a SiteConfig object. See example. + /// /// /// Headers that will be added to request. /// @@ -10077,7 +10066,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationSnapshotInfoWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -10102,6 +10091,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteConfig == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -10119,12 +10112,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("siteConfig", siteConfig); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfo", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateConfiguration", 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/web/snapshots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/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)); @@ -10140,7 +10134,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) @@ -10171,6 +10165,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteConfig != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, 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) { @@ -10221,7 +10221,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")) @@ -10234,7 +10234,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) { @@ -10254,11 +10254,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a snapshot of the configuration of an app at a previous point in time. + /// 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 a snapshot of the configuration of an app at a - /// previous point in time. + /// 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. /// /// /// Name of the resource group to which the resource belongs. @@ -10266,9 +10267,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The ID of the snapshot to read. - /// /// /// Headers that will be added to request. /// @@ -10290,7 +10288,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationSnapshotInfoWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -10315,10 +10313,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -10336,16 +10330,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSnapshot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfo", 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/web/snapshots/{snapshotId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -10440,7 +10432,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")) @@ -10453,7 +10445,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) { @@ -10473,10 +10465,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Reverts the configuration of an app to a previous snapshot. + /// Gets a snapshot of the configuration of an app at a previous point in time. /// /// - /// Description for Reverts the configuration of an app to a previous snapshot. + /// Description for Gets a snapshot of the configuration of an app at a + /// previous point in time. /// /// /// Name of the resource group to which the resource belongs. @@ -10496,6 +10489,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 /// @@ -10505,7 +10501,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RecoverSiteConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -10553,11 +10549,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RecoverSiteConfigurationSnapshot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSnapshot", 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/web/snapshots/{snapshotId}/recover").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); @@ -10574,7 +10570,222 @@ 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) + { + _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; + } + + /// + /// Reverts the configuration of an app to a previous snapshot. + /// + /// + /// Description for Reverts the configuration of an app to a previous snapshot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// The ID of the snapshot to read. + /// + /// + /// 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 RecoverSiteConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, 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 (snapshotId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); + } + 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("snapshotId", snapshotId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RecoverSiteConfigurationSnapshot", 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/web/snapshots/{snapshotId}/recover").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); + _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) @@ -11365,7 +11576,223 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJob", 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}/continuouswebjobs/{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) + { + _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 && (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(); + _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; + } + + /// + /// Delete a continuous web job by its ID for an app, or a deployment slot. + /// + /// + /// Description for Delete a continuous web job by its ID for an app, or a + /// deployment slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Name of Web Job. + /// + /// + /// 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 DeleteContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, 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 (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } + 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("webJobName", webJobName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -11386,7 +11813,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) @@ -11437,7 +11864,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 @@ -11467,31 +11894,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); @@ -11500,11 +11909,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. + /// Start a continuous web job for an app, or a deployment slot. /// /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. + /// Description for Start a continuous web job for an app, or a deployment + /// slot. /// /// /// Name of the resource group to which the resource belongs. @@ -11533,7 +11942,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StartContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11581,11 +11990,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJob", 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}/continuouswebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start").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)); @@ -11602,7 +12011,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -11653,7 +12062,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 @@ -11698,11 +12107,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start a continuous web job for an app, or a deployment slot. + /// Stop a continuous web job for an app, or a deployment slot. /// /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. + /// Description for Stop a continuous web job for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -11731,7 +12139,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StartContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11779,11 +12187,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJob", 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}/continuouswebjobs/{webJobName}/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop").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)); @@ -11896,19 +12304,229 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Stop a continuous web job for an app, or a deployment slot. + /// List deployments for an app, or a deployment slot. /// /// - /// Description for Stop a continuous web job for an app, or a deployment slot. + /// Description for List deployments for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// 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>> ListDeploymentsWithHttpMessagesAsync(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, "ListDeployments", 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}/deployments").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; + } + + /// + /// Get a deployment by its ID for an app, or a deployment slot. + /// + /// + /// Description for Get a deployment by its ID for an app, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Deployment ID. /// /// /// Headers that will be added to request. @@ -11919,6 +12537,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 /// @@ -11928,7 +12549,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11953,9 +12574,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (Client.SubscriptionId == null) { @@ -11974,16 +12595,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDeployment", 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}/continuouswebjobs/{webJobName}/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{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) @@ -11997,7 +12618,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) @@ -12048,7 +12669,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 @@ -12078,13 +12699,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); @@ -12093,10 +12732,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployments for an app, or a deployment slot. + /// Create a deployment for an app, or a deployment slot. /// /// - /// Description for List deployments for an app, or a deployment slot. + /// Description for Create a deployment for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -12104,6 +12743,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// ID of an existing deployment. + /// + /// + /// Deployment details. + /// /// /// Headers that will be added to request. /// @@ -12125,7 +12770,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDeploymentsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12150,6 +12795,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } + if (deployment == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -12167,14 +12820,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("id", id); + tracingParameters.Add("deployment", deployment); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeployments", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateDeployment", 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}/deployments").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _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) @@ -12188,7 +12844,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) @@ -12219,6 +12875,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(deployment != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployment, 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) { @@ -12269,7 +12931,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")) @@ -12282,7 +12944,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) { @@ -12302,10 +12964,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a deployment by its ID for an app, or a deployment slot. + /// Delete a deployment by its ID for an app, or a deployment slot. /// /// - /// Description for Get a deployment by its ID for an app, or a deployment + /// Description for Delete a deployment by its ID for an app, or a deployment /// slot. /// /// @@ -12326,9 +12988,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 /// @@ -12338,7 +12997,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12386,7 +13045,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeployment", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteDeployment", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -12407,7 +13066,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) @@ -12458,7 +13117,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 @@ -12488,31 +13147,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); @@ -12521,10 +13162,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create a deployment for an app, or a deployment slot. + /// List deployment log for specific deployment for an app, or a deployment + /// slot. /// /// - /// Description for Create a deployment for an app, or a deployment slot. + /// Description for List deployment log for specific deployment for an app, or + /// a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -12533,10 +13176,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// ID of an existing deployment. - /// - /// - /// Deployment details. + /// The ID of a specific deployment. This is the value of the name property in + /// the JSON response from "GET /api/sites/{siteName}/deployments". /// /// /// Headers that will be added to request. @@ -12559,7 +13200,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListDeploymentLogWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12588,10 +13229,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "id"); } - if (deployment == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -12610,13 +13247,12 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("id", id); - tracingParameters.Add("deployment", deployment); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateDeployment", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLog", 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}/deployments/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); @@ -12633,7 +13269,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) @@ -12664,12 +13300,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(deployment != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployment, 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) { @@ -12753,11 +13383,14 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a deployment by its ID for an app, or a deployment slot. + /// Discovers an existing app backup that can be restored from a blob in Azure + /// storage. Use this to get information about the databases stored in a + /// backup. /// /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. + /// Description for Discovers an existing app backup that can be restored from + /// a blob in Azure storage. Use this to get information about the databases + /// stored in a backup. /// /// /// Name of the resource group to which the resource belongs. @@ -12765,8 +13398,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Deployment ID. + /// + /// A RestoreRequest object that includes Azure storage URL and blog name for + /// discovery of backup. /// /// /// Headers that will be added to request. @@ -12777,6 +13411,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 /// @@ -12786,7 +13423,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> DiscoverBackupWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12811,9 +13448,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (Client.SubscriptionId == null) { @@ -12832,16 +13473,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDeployment", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DiscoverBackup", 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}/deployments/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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) @@ -12855,7 +13495,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -12886,6 +13526,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) { @@ -12906,7 +13552,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 @@ -12936,13 +13582,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); @@ -12951,12 +13615,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. + /// Lists ownership identifiers for domain associated with web app. /// /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. + /// Description for Lists ownership identifiers for domain associated with web + /// app. /// /// /// Name of the resource group to which the resource belongs. @@ -12964,10 +13627,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// /// /// Headers that will be added to request. /// @@ -12989,7 +13648,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListDeploymentLogWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDomainOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13014,10 +13673,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -13035,16 +13690,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLog", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiers", 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}/deployments/{id}/log").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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) @@ -13139,7 +13792,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")) @@ -13152,7 +13805,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) { @@ -13172,14 +13825,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. + /// Get domain ownership identifier for web app. /// /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. + /// Description for Get domain ownership identifier for web app. /// /// /// Name of the resource group to which the resource belongs. @@ -13187,9 +13836,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. + /// + /// Name of domain ownership identifier. /// /// /// Headers that will be added to request. @@ -13212,7 +13860,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> DiscoverBackupWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13237,13 +13885,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) + if (domainOwnershipIdentifierName == null) { - request.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); } if (Client.SubscriptionId == null) { @@ -13262,15 +13906,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); + tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DiscoverBackup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifier", 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}/discoverbackup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -13284,7 +13929,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) @@ -13315,12 +13960,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) { @@ -13371,7 +14010,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")) @@ -13384,7 +14023,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) { @@ -13404,11 +14043,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Lists ownership identifiers for domain associated with web app. + /// Creates a domain ownership identifier for web app, or updates an existing + /// ownership identifier. /// /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. + /// Description for Creates a domain ownership identifier for web app, or + /// updates an existing ownership identifier. /// /// /// Name of the resource group to which the resource belongs. @@ -13416,6 +14056,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of domain ownership identifier. + /// + /// + /// A JSON representation of the domain ownership properties. + /// /// /// Headers that will be added to request. /// @@ -13437,7 +14083,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDomainOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13462,6 +14108,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (domainOwnershipIdentifierName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + } + if (domainOwnershipIdentifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -13479,14 +14133,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); + tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiers", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifier", 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}/domainOwnershipIdentifiers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -13500,7 +14157,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) @@ -13531,6 +14188,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(domainOwnershipIdentifier != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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) { @@ -13581,7 +14244,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")) @@ -13594,7 +14257,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) { @@ -13614,10 +14277,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get domain ownership identifier for web app. + /// Deletes a domain ownership identifier for a web app. /// /// - /// Description for Get domain ownership identifier for web app. + /// Description for Deletes a domain ownership identifier for a web app. /// /// /// Name of the resource group to which the resource belongs. @@ -13637,9 +14300,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 /// @@ -13649,7 +14309,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13697,7 +14357,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifier", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifier", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -13718,7 +14378,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) @@ -13769,7 +14429,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 @@ -13799,31 +14459,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); @@ -13872,7 +14514,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13925,7 +14567,7 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifier", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifier", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -13946,7 +14588,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("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -14066,19 +14708,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a domain ownership identifier for a web app. + /// Get the status of the last MSDeploy operation. /// /// - /// Description for Deletes a domain ownership identifier for a web app. + /// Description for Get the status of the last MSDeploy operation. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -14089,6 +14728,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 /// @@ -14098,7 +14740,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMSDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -14123,10 +14765,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -14144,16 +14782,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifier", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployStatus", 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}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").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("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -14167,7 +14803,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) @@ -14218,7 +14854,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 @@ -14248,13 +14884,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); @@ -14263,24 +14917,44 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// - /// - /// Name of domain ownership identifier. + /// + /// Details of MSDeploy operation /// - /// - /// A JSON representation of the domain ownership properties. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the MSDeploy Log for the last MSDeploy operation. + /// + /// + /// Description for Get the MSDeploy Log for the last MSDeploy operation. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. /// /// /// Headers that will be added to request. @@ -14303,7 +14977,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -14328,14 +15002,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -14353,17 +15019,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifier", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployLog", 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}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -14377,7 +15040,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("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -14408,12 +15071,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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) { @@ -14434,7 +15091,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 @@ -14464,7 +15121,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")) @@ -14477,7 +15134,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) { @@ -14497,10 +15154,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the status of the last MSDeploy operation. + /// Invoke onedeploy status API /api/deployments and gets the deployment status + /// for the site /// /// - /// Description for Get the status of the last MSDeploy operation. + /// Description for Invoke onedeploy status API /api/deployments and gets the + /// deployment status for the site /// /// /// Name of the resource group to which the resource belongs. @@ -14529,7 +15188,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMSDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetOneDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -14572,11 +15231,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployStatus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetOneDeployStatus", 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}/extensions/onedeploy").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)); @@ -14673,7 +15332,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")) @@ -14686,7 +15345,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) { @@ -14706,38 +15365,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Invoke the OneDeploy publish web app extension. /// /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. + /// Description for Invoke the OneDeploy publish web app extension. /// /// /// Name of the resource group to which the resource belongs. @@ -14766,7 +15397,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOneDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -14809,11 +15440,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployLog", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOneDeployOperation", 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/log").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy").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)); @@ -14829,7 +15460,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) @@ -14880,7 +15511,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 @@ -14910,7 +15541,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")) @@ -14923,7 +15554,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) { @@ -71278,7 +71909,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>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71428,7 +72059,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")) @@ -71441,7 +72072,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) { @@ -71502,7 +72133,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> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71658,7 +72289,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")) @@ -71671,7 +72302,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) { @@ -71735,7 +72366,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> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71902,7 +72533,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")) @@ -71915,7 +72546,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) { @@ -72188,7 +72819,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> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72355,7 +72986,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")) @@ -72368,7 +72999,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) { @@ -77482,7 +78113,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>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77626,7 +78257,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")) @@ -77639,7 +78270,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) { @@ -77696,7 +78327,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> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77846,7 +78477,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")) @@ -77859,7 +78490,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) { @@ -77919,7 +78550,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> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78080,7 +78711,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")) @@ -78093,7 +78724,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) { @@ -78352,7 +78983,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> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78513,7 +79144,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")) @@ -78526,7 +79157,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 9878bdb60ca87..094ff8397e424 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs @@ -1258,6 +1258,56 @@ public static SiteAuthSettings GetAuthSettings(this IWebAppsOperations operation } } + /// + /// Gets site's Authentication / Authorization settings for apps via the V2 + /// format + /// + /// + /// Description for Gets site's Authentication / Authorization settings for + /// apps via the V2 format + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + public static SiteAuthSettingsV2 GetAuthSettingsV2WithoutSecrets(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.GetAuthSettingsV2WithoutSecretsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets site's Authentication / Authorization settings for apps via the V2 + /// format + /// + /// + /// Description for Gets site's Authentication / Authorization settings for + /// apps via the V2 format + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// The cancellation token. + /// + public static async Task GetAuthSettingsV2WithoutSecretsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAuthSettingsV2WithoutSecretsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Updates site's Authentication / Authorization settings for apps via the V2 /// format @@ -3737,6 +3787,102 @@ public static MSDeployLog GetMSDeployLog(this IWebAppsOperations operations, str } } + /// + /// Invoke onedeploy status API /api/deployments and gets the deployment status + /// for the site + /// + /// + /// Description for Invoke onedeploy status API /api/deployments and gets the + /// deployment status for the site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + public static object GetOneDeployStatus(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.GetOneDeployStatusAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Invoke onedeploy status API /api/deployments and gets the deployment status + /// for the site + /// + /// + /// Description for Invoke onedeploy status API /api/deployments and gets the + /// deployment status for the site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// The cancellation token. + /// + public static async Task GetOneDeployStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetOneDeployStatusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Invoke the OneDeploy publish web app extension. + /// + /// + /// Description for Invoke the OneDeploy publish web app extension. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + public static object CreateOneDeployOperation(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.CreateOneDeployOperationAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Invoke the OneDeploy publish web app extension. + /// + /// + /// Description for Invoke the OneDeploy publish web app extension. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOneDeployOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOneDeployOperationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List the functions for a web site, or a deployment slot. /// @@ -19767,7 +19913,7 @@ public static void RunTriggeredWebJobSlot(this IWebAppsOperations operations, st /// Name of the deployment slot. If a slot is not specified, the API will get /// virtual network connections for the production slot. /// - public static IList ListVnetConnectionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + public static IList ListVnetConnectionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) { return operations.ListVnetConnectionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); } @@ -19795,7 +19941,7 @@ public static IList ListVnetConnectionsSlot(this IWebAppsOperations op /// /// The cancellation token. /// - public static async Task> ListVnetConnectionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListVnetConnectionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListVnetConnectionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) { @@ -19827,7 +19973,7 @@ public static IList ListVnetConnectionsSlot(this IWebAppsOperations op /// Name of the deployment slot. If a slot is not specified, the API will get /// the named virtual network for the production slot. /// - public static VnetInfo GetVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot) + public static VnetInfoResource GetVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot) { return operations.GetVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot).GetAwaiter().GetResult(); } @@ -19859,7 +20005,7 @@ public static VnetInfo GetVnetConnectionSlot(this IWebAppsOperations operations, /// /// The cancellation token. /// - public static async Task GetVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, slot, null, cancellationToken).ConfigureAwait(false)) { @@ -19894,7 +20040,7 @@ public static VnetInfo GetVnetConnectionSlot(this IWebAppsOperations operations, /// Name of the deployment slot. If a slot is not specified, the API will add /// or update connections for the production slot. /// - public static VnetInfo CreateOrUpdateVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot) + public static VnetInfoResource CreateOrUpdateVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot) { return operations.CreateOrUpdateVnetConnectionSlotAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot).GetAwaiter().GetResult(); } @@ -19929,7 +20075,7 @@ public static VnetInfo CreateOrUpdateVnetConnectionSlot(this IWebAppsOperations /// /// The cancellation token. /// - public static async Task CreateOrUpdateVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) { @@ -20025,7 +20171,7 @@ public static void DeleteVnetConnectionSlot(this IWebAppsOperations operations, /// Name of the deployment slot. If a slot is not specified, the API will add /// or update connections for the production slot. /// - public static VnetInfo UpdateVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot) + public static VnetInfoResource UpdateVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot) { return operations.UpdateVnetConnectionSlotAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot).GetAwaiter().GetResult(); } @@ -20060,7 +20206,7 @@ public static VnetInfo UpdateVnetConnectionSlot(this IWebAppsOperations operatio /// /// The cancellation token. /// - public static async Task UpdateVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) { @@ -21463,7 +21609,7 @@ public static void RunTriggeredWebJob(this IWebAppsOperations operations, string /// /// Name of the app. /// - public static IList ListVnetConnections(this IWebAppsOperations operations, string resourceGroupName, string name) + public static IList ListVnetConnections(this IWebAppsOperations operations, string resourceGroupName, string name) { return operations.ListVnetConnectionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); } @@ -21487,7 +21633,7 @@ public static IList ListVnetConnections(this IWebAppsOperations operat /// /// The cancellation token. /// - public static async Task> ListVnetConnectionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListVnetConnectionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListVnetConnectionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) { @@ -21515,7 +21661,7 @@ public static IList ListVnetConnections(this IWebAppsOperations operat /// /// Name of the virtual network. /// - public static VnetInfo GetVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName) + public static VnetInfoResource GetVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName) { return operations.GetVnetConnectionAsync(resourceGroupName, name, vnetName).GetAwaiter().GetResult(); } @@ -21543,7 +21689,7 @@ public static VnetInfo GetVnetConnection(this IWebAppsOperations operations, str /// /// The cancellation token. /// - public static async Task GetVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, null, cancellationToken).ConfigureAwait(false)) { @@ -21574,7 +21720,7 @@ public static VnetInfo GetVnetConnection(this IWebAppsOperations operations, str /// /// Properties of the Virtual Network connection. See example. /// - public static VnetInfo CreateOrUpdateVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope) + public static VnetInfoResource CreateOrUpdateVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope) { return operations.CreateOrUpdateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope).GetAwaiter().GetResult(); } @@ -21605,7 +21751,7 @@ public static VnetInfo CreateOrUpdateVnetConnection(this IWebAppsOperations oper /// /// The cancellation token. /// - public static async Task CreateOrUpdateVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) { @@ -21689,7 +21835,7 @@ public static void DeleteVnetConnection(this IWebAppsOperations operations, stri /// /// Properties of the Virtual Network connection. See example. /// - public static VnetInfo UpdateVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope) + public static VnetInfoResource UpdateVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope) { return operations.UpdateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope).GetAwaiter().GetResult(); } @@ -21720,7 +21866,7 @@ public static VnetInfo UpdateVnetConnection(this IWebAppsOperations operations, /// /// The cancellation token. /// - public static async Task UpdateVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) { 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 0b3c63e3d794c..68cf93c515dce 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs @@ -122,6 +122,16 @@ public partial class WebSiteManagementClient : ServiceClient public virtual ICertificatesOperations Certificates { get; private set; } + /// + /// Gets the IContainerAppsOperations. + /// + public virtual IContainerAppsOperations ContainerApps { get; private set; } + + /// + /// Gets the IContainerAppsRevisionsOperations. + /// + public virtual IContainerAppsRevisionsOperations ContainerAppsRevisions { get; private set; } + /// /// Gets the IDeletedWebAppsOperations. /// @@ -417,6 +427,8 @@ private void Initialize() AppServiceEnvironments = new AppServiceEnvironmentsOperations(this); AppServicePlans = new AppServicePlansOperations(this); Certificates = new CertificatesOperations(this); + ContainerApps = new ContainerAppsOperations(this); + ContainerAppsRevisions = new ContainerAppsRevisionsOperations(this); DeletedWebApps = new DeletedWebAppsOperations(this); Diagnostics = new DiagnosticsOperations(this); GlobalModel = new GlobalModelOperations(this); @@ -427,7 +439,7 @@ private void Initialize() StaticSites = new StaticSitesOperations(this); WebApps = new WebAppsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-01-15"; + ApiVersion = "2021-03-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -462,17 +474,11 @@ private void Initialize() DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } /// - /// Exchange code for GitHub access token for AppService CLI + /// Gets publishing user /// /// - /// Description for Exchange code for GitHub access token for AppService CLI + /// Description for Gets publishing user /// - /// - /// Code string to exchange for Github Access token - /// - /// - /// State string used for verification. - /// /// /// Headers that will be added to request. /// @@ -494,26 +500,12 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> GenerateGithubAccessTokenForAppserviceCLIAsyncWithHttpMessagesAsync(string code, string state, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPublishingUserWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); } - if (code == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "code"); - } - if (state == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "state"); - } - AppserviceGithubTokenRequest request = new AppserviceGithubTokenRequest(); - if (code != null || state != null) - { - request.Code = code; - request.State = state; - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -521,13 +513,12 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateGithubAccessTokenForAppserviceCLIAsync", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPublishingUser", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/publishingUsers/web").ToString(); List _queryParameters = new List(); if (ApiVersion != null) { @@ -540,7 +531,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -571,12 +562,6 @@ private void Initialize() // Serialize Request string _requestContent = null; - if(request != null) - { - _requestContent = SafeJsonConvert.SerializeObject(request, 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 (Credentials != null) { @@ -627,7 +612,7 @@ private void Initialize() 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")) @@ -640,7 +625,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); } catch (JsonException ex) { @@ -660,11 +645,14 @@ private void Initialize() } /// - /// Gets publishing user + /// Updates publishing user /// /// - /// Description for Gets publishing user + /// Description for Updates publishing user /// + /// + /// Details of publishing user + /// /// /// Headers that will be added to request. /// @@ -686,8 +674,16 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> GetPublishingUserWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdatePublishingUserWithHttpMessagesAsync(User userDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (userDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "userDetails"); + } + if (userDetails != null) + { + userDetails.Validate(); + } if (ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); @@ -699,8 +695,9 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("userDetails", userDetails); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPublishingUser", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdatePublishingUser", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; @@ -717,7 +714,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -748,6 +745,12 @@ private void Initialize() // Serialize Request string _requestContent = null; + if(userDetails != null) + { + _requestContent = SafeJsonConvert.SerializeObject(userDetails, 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 (Credentials != null) { @@ -831,14 +834,11 @@ private void Initialize() } /// - /// Updates publishing user + /// Gets the source controls available for Azure websites. /// /// - /// Description for Updates publishing user + /// Description for Gets the source controls available for Azure websites. /// - /// - /// Details of publishing user - /// /// /// Headers that will be added to request. /// @@ -860,16 +860,8 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> UpdatePublishingUserWithHttpMessagesAsync(User userDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSourceControlsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (userDetails == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "userDetails"); - } - if (userDetails != null) - { - userDetails.Validate(); - } if (ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); @@ -881,13 +873,12 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("userDetails", userDetails); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePublishingUser", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSourceControls", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/publishingUsers/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols").ToString(); List _queryParameters = new List(); if (ApiVersion != null) { @@ -900,7 +891,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -931,12 +922,6 @@ private void Initialize() // Serialize Request string _requestContent = null; - if(userDetails != null) - { - _requestContent = SafeJsonConvert.SerializeObject(userDetails, 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 (Credentials != null) { @@ -987,7 +972,7 @@ private void Initialize() 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")) @@ -1000,7 +985,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); } catch (JsonException ex) { @@ -1020,11 +1005,14 @@ private void Initialize() } /// - /// Gets the source controls available for Azure websites. + /// Gets source control token /// /// - /// Description for Gets the source controls available for Azure websites. + /// Description for Gets source control token /// + /// + /// Type of source control + /// /// /// Headers that will be added to request. /// @@ -1046,8 +1034,12 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task>> ListSourceControlsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSourceControlWithHttpMessagesAsync(string sourceControlType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (sourceControlType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlType"); + } if (ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); @@ -1059,12 +1051,14 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("sourceControlType", sourceControlType); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSourceControls", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols/{sourceControlType}").ToString(); + _url = _url.Replace("{sourceControlType}", System.Uri.EscapeDataString(sourceControlType)); List _queryParameters = new List(); if (ApiVersion != null) { @@ -1158,7 +1152,7 @@ private void Initialize() 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")) @@ -1171,7 +1165,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); } catch (JsonException ex) { @@ -1191,14 +1185,17 @@ private void Initialize() } /// - /// Gets source control token + /// Updates source control token /// /// - /// Description for Gets source control token + /// Description for Updates source control token /// /// /// Type of source control /// + /// + /// Source control token information + /// /// /// Headers that will be added to request. /// @@ -1220,12 +1217,16 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> GetSourceControlWithHttpMessagesAsync(string sourceControlType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSourceControlWithHttpMessagesAsync(string sourceControlType, SourceControl requestMessage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (sourceControlType == null) { throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlType"); } + if (requestMessage == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "requestMessage"); + } if (ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); @@ -1238,8 +1239,9 @@ private void Initialize() _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("sourceControlType", sourceControlType); + tracingParameters.Add("requestMessage", requestMessage); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; @@ -1257,7 +1259,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -1288,6 +1290,12 @@ private void Initialize() // Serialize Request string _requestContent = null; + if(requestMessage != null) + { + _requestContent = SafeJsonConvert.SerializeObject(requestMessage, 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 (Credentials != null) { @@ -1371,16 +1379,16 @@ private void Initialize() } /// - /// Updates source control token + /// Gets a list of meters for a given location. /// /// - /// Description for Updates source control token + /// Description for Gets a list of meters for a given location. /// - /// - /// Type of source control + /// + /// Azure Location of billable resource /// - /// - /// Source control token information + /// + /// App Service OS type meters used for /// /// /// Headers that will be added to request. @@ -1403,15 +1411,11 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSourceControlWithHttpMessagesAsync(string sourceControlType, SourceControl requestMessage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBillingMetersWithHttpMessagesAsync(string billingLocation = default(string), string osType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (sourceControlType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlType"); - } - if (requestMessage == null) + if (SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "requestMessage"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); } if (ApiVersion == null) { @@ -1424,16 +1428,24 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("sourceControlType", sourceControlType); - tracingParameters.Add("requestMessage", requestMessage); + tracingParameters.Add("billingLocation", billingLocation); + tracingParameters.Add("osType", osType); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBillingMeters", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols/{sourceControlType}").ToString(); - _url = _url.Replace("{sourceControlType}", System.Uri.EscapeDataString(sourceControlType)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); List _queryParameters = new List(); + if (billingLocation != null) + { + _queryParameters.Add(string.Format("billingLocation={0}", System.Uri.EscapeDataString(billingLocation))); + } + if (osType != null) + { + _queryParameters.Add(string.Format("osType={0}", System.Uri.EscapeDataString(osType))); + } if (ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); @@ -1445,7 +1457,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -1476,12 +1488,6 @@ private void Initialize() // Serialize Request string _requestContent = null; - if(requestMessage != null) - { - _requestContent = SafeJsonConvert.SerializeObject(requestMessage, 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 (Credentials != null) { @@ -1532,7 +1538,7 @@ private void Initialize() 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")) @@ -1545,7 +1551,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); } catch (JsonException ex) { @@ -1565,16 +1571,22 @@ private void Initialize() } /// - /// Gets a list of meters for a given location. + /// Check if a resource name is available. /// /// - /// Description for Gets a list of meters for a given location. + /// Description for Check if a resource name is available. /// - /// - /// Azure Location of billable resource + /// + /// Resource name to verify. /// - /// - /// App Service OS type meters used for + /// + /// Resource type used for verification. Possible values include: 'Site', + /// 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', + /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', + /// 'Microsoft.Web/publishingUsers' + /// + /// + /// Is fully qualified domain name. /// /// /// Headers that will be added to request. @@ -1597,7 +1609,7 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task>> ListBillingMetersWithHttpMessagesAsync(string billingLocation = default(string), string osType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, string type, bool? isFqdn = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (SubscriptionId == null) { @@ -1607,6 +1619,21 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "type"); + } + ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); + if (name != null || type != null || isFqdn != null) + { + request.Name = name; + request.Type = type; + request.IsFqdn = isFqdn; + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1614,24 +1641,15 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("billingLocation", billingLocation); - tracingParameters.Add("osType", osType); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBillingMeters", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); List _queryParameters = new List(); - if (billingLocation != null) - { - _queryParameters.Add(string.Format("billingLocation={0}", System.Uri.EscapeDataString(billingLocation))); - } - if (osType != null) - { - _queryParameters.Add(string.Format("osType={0}", System.Uri.EscapeDataString(osType))); - } if (ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); @@ -1643,7 +1661,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -1674,6 +1692,12 @@ private void Initialize() // Serialize Request string _requestContent = null; + if(request != null) + { + _requestContent = SafeJsonConvert.SerializeObject(request, 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 (Credentials != null) { @@ -1724,7 +1748,7 @@ private void Initialize() 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")) @@ -1737,7 +1761,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); } catch (JsonException ex) { @@ -1757,23 +1781,8 @@ private void Initialize() } /// - /// Check if a resource name is available. + /// Get custom hostnames under this subscription /// - /// - /// Description for Check if a resource name is available. - /// - /// - /// Resource name to verify. - /// - /// - /// Resource type used for verification. Possible values include: 'Site', - /// 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', - /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// - /// - /// Is fully qualified domain name. - /// /// /// Headers that will be added to request. /// @@ -1795,7 +1804,7 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, string type, bool? isFqdn = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListCustomHostNameSitesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (SubscriptionId == null) { @@ -1805,21 +1814,6 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (type == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "type"); - } - ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); - if (name != null || type != null || isFqdn != null) - { - request.Name = name; - request.Type = type; - request.IsFqdn = isFqdn; - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1827,13 +1821,12 @@ private void Initialize() { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListCustomHostNameSites", tracingParameters); } // Construct URL var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); List _queryParameters = new List(); if (ApiVersion != null) @@ -1847,7 +1840,7 @@ private void Initialize() // 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) @@ -1878,12 +1871,6 @@ private void Initialize() // Serialize Request string _requestContent = null; - if(request != null) - { - _requestContent = SafeJsonConvert.SerializeObject(request, 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 (Credentials != null) { @@ -1934,7 +1921,7 @@ private void Initialize() 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")) @@ -1947,7 +1934,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); } catch (JsonException ex) { @@ -4044,6 +4031,174 @@ private void Initialize() return _result; } + /// + /// Get custom hostnames under this 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>> ListCustomHostNameSitesNextWithHttpMessagesAsync(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, "ListCustomHostNameSitesNext", 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 a list of available geographical regions. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs index 653d2cddfeee1..4054e381328dd 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs @@ -21,52 +21,6 @@ namespace Microsoft.Azure.Management.WebSites /// public static partial class WebSiteManagementClientExtensions { - /// - /// Exchange code for GitHub access token for AppService CLI - /// - /// - /// Description for Exchange code for GitHub access token for AppService CLI - /// - /// - /// The operations group for this extension method. - /// - /// - /// Code string to exchange for Github Access token - /// - /// - /// State string used for verification. - /// - public static AppserviceGithubToken GenerateGithubAccessTokenForAppserviceCLIAsync(this IWebSiteManagementClient operations, string code, string state) - { - return operations.GenerateGithubAccessTokenForAppserviceCLIAsyncAsync(code, state).GetAwaiter().GetResult(); - } - - /// - /// Exchange code for GitHub access token for AppService CLI - /// - /// - /// Description for Exchange code for GitHub access token for AppService CLI - /// - /// - /// The operations group for this extension method. - /// - /// - /// Code string to exchange for Github Access token - /// - /// - /// State string used for verification. - /// - /// - /// The cancellation token. - /// - public static async Task GenerateGithubAccessTokenForAppserviceCLIAsyncAsync(this IWebSiteManagementClient operations, string code, string state, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GenerateGithubAccessTokenForAppserviceCLIAsyncWithHttpMessagesAsync(code, state, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Gets publishing user /// @@ -365,6 +319,34 @@ public static SourceControl UpdateSourceControl(this IWebSiteManagementClient op } } + /// + /// Get custom hostnames under this subscription + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListCustomHostNameSites(this IWebSiteManagementClient operations) + { + return operations.ListCustomHostNameSitesAsync().GetAwaiter().GetResult(); + } + + /// + /// Get custom hostnames under this subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListCustomHostNameSitesAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListCustomHostNameSitesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets list of available geo regions plus ministamps /// @@ -833,6 +815,40 @@ public static IPage ListBillingMetersNext(this IWebSiteManagementC } } + /// + /// Get custom hostnames under this subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListCustomHostNameSitesNext(this IWebSiteManagementClient operations, string nextPageLink) + { + return operations.ListCustomHostNameSitesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get custom hostnames under this 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> ListCustomHostNameSitesNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListCustomHostNameSitesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get a list of available geographical regions. ///