diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs index dd3bef96890c..ce6e56da299e 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs @@ -1401,10 +1401,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get diagnostic information for an App Service Environment. + /// Get networking configuration of an App Service Environment /// /// - /// Description for Get diagnostic information for an App Service Environment. + /// Description for Get networking configuration of an App Service Environment /// /// /// Name of the resource group to which the resource belongs. @@ -1433,7 +1433,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDiagnosticsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAseV3NetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1476,11 +1476,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDiagnostics", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAseV3NetworkingConfiguration", 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/hostingEnvironments/{name}/diagnostics").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking").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)); @@ -1577,7 +1577,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -1590,7 +1590,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -1610,10 +1610,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get a diagnostics item for an App Service Environment. + /// Update networking configuration of an App Service Environment /// /// - /// Description for Get a diagnostics item for an App Service Environment. + /// Description for Update networking configuration of an App Service + /// Environment /// /// /// Name of the resource group to which the resource belongs. @@ -1621,8 +1622,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Name of the diagnostics item. + /// /// /// /// Headers that will be added to request. @@ -1645,7 +1645,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDiagnosticsItemWithHttpMessagesAsync(string resourceGroupName, string name, string diagnosticsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateAseNetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1670,9 +1670,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (diagnosticsName == null) + if (aseNetworkingConfiguration == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticsName"); + throw new ValidationException(ValidationRules.CannotBeNull, "aseNetworkingConfiguration"); } if (Client.SubscriptionId == null) { @@ -1691,16 +1691,15 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("diagnosticsName", diagnosticsName); + tracingParameters.Add("aseNetworkingConfiguration", aseNetworkingConfiguration); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticsItem", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAseNetworkingConfiguration", 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/hostingEnvironments/{name}/diagnostics/{diagnosticsName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{diagnosticsName}", System.Uri.EscapeDataString(diagnosticsName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -1714,7 +1713,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -1745,6 +1744,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(aseNetworkingConfiguration != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(aseNetworkingConfiguration, 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) { @@ -1795,7 +1800,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -1808,7 +1813,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -1828,12 +1833,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. + /// Get diagnostic information for an App Service Environment. /// /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. + /// Description for Get diagnostic information for an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -1862,7 +1865,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetInboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDiagnosticsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1905,11 +1908,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInboundNetworkDependenciesEndpoints", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDiagnostics", 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/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics").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)); @@ -2006,7 +2009,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -2019,7 +2022,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -2039,10 +2042,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get all multi-role pools. + /// Get a diagnostics item for an App Service Environment. /// /// - /// Description for Get all multi-role pools. + /// Description for Get a diagnostics item for an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -2050,6 +2053,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// + /// + /// Name of the diagnostics item. + /// /// /// Headers that will be added to request. /// @@ -2071,7 +2077,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMultiRolePoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDiagnosticsItemWithHttpMessagesAsync(string resourceGroupName, string name, string diagnosticsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2096,6 +2102,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (diagnosticsName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticsName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2113,14 +2123,16 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("diagnosticsName", diagnosticsName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePools", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticsItem", 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/hostingEnvironments/{name}/multiRolePools").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{diagnosticsName}", System.Uri.EscapeDataString(diagnosticsName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2215,7 +2227,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -2228,7 +2240,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -2248,10 +2260,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get properties of a multi-role pool. + /// Get the network endpoints of all inbound dependencies of an App Service + /// Environment. /// /// - /// Description for Get properties of a multi-role pool. + /// Description for Get the network endpoints of all inbound dependencies of an + /// App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -2280,7 +2294,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetInboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2323,11 +2337,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMultiRolePool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInboundNetworkDependenciesEndpoints", 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/hostingEnvironments/{name}/multiRolePools/default").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints").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)); @@ -2424,7 +2438,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -2437,7 +2451,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -2457,38 +2471,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, multiRolePoolEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create or update a multi-role pool. + /// Get all multi-role pools. /// /// - /// Description for Create or update a multi-role pool. + /// Description for Get all multi-role pools. /// /// /// Name of the resource group to which the resource belongs. @@ -2496,9 +2482,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Properties of the multi-role pool. - /// /// /// Headers that will be added to request. /// @@ -2520,7 +2503,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMultiRolePoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2545,10 +2528,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (multiRolePoolEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "multiRolePoolEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2566,13 +2545,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("multiRolePoolEnvelope", multiRolePoolEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMultiRolePool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePools", 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/hostingEnvironments/{name}/multiRolePools/default").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools").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)); @@ -2588,7 +2566,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -2619,12 +2597,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(multiRolePoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(multiRolePoolEnvelope, 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) { @@ -2645,7 +2617,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2675,7 +2647,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -2688,25 +2660,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2726,12 +2680,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. + /// Get properties of a multi-role pool. /// /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. + /// Description for Get properties of a multi-role pool. /// /// /// Name of the resource group to which the resource belongs. @@ -2739,9 +2691,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Name of the instance in the multi-role pool. - /// /// /// Headers that will be added to request. /// @@ -2763,7 +2712,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMultiRolePoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2788,10 +2737,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instance == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instance"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2809,16 +2754,14 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instance", instance); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePoolInstanceMetricDefinitions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMultiRolePool", 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/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instance}", System.Uri.EscapeDataString(instance)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2913,7 +2856,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -2926,7 +2869,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -2946,11 +2889,38 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get metric definitions for a multi-role pool of an App Service Environment. + /// Create or update a multi-role pool. /// /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. + /// Description for Create or update a multi-role pool. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Properties of the multi-role pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, multiRolePoolEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Create or update a multi-role pool. + /// + /// + /// Description for Create or update a multi-role pool. /// /// /// Name of the resource group to which the resource belongs. @@ -2958,6 +2928,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// + /// + /// Properties of the multi-role pool. + /// /// /// Headers that will be added to request. /// @@ -2979,7 +2952,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMultiRoleMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3004,6 +2977,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (multiRolePoolEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "multiRolePoolEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -3021,12 +2998,13 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("multiRolePoolEnvelope", multiRolePoolEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRoleMetricDefinitions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateMultiRolePool", 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/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default").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)); @@ -3042,7 +3020,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -3073,6 +3051,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(multiRolePoolEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(multiRolePoolEnvelope, 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) { @@ -3093,7 +3077,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3123,7 +3107,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -3136,7 +3120,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -3148,18 +3132,38 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } - if (_shouldTrace) + // Deserialize Response + if ((int)_statusCode == 202) { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// + _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 metric definitions for a specific instance of a multi-role pool of an + /// App Service Environment. + /// /// - /// Description for Get available SKUs for scaling a multi-role pool. + /// Description for Get metric definitions for a specific instance of a + /// multi-role pool of an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -3167,6 +3171,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// + /// + /// Name of the instance in the multi-role pool. + /// /// /// Headers that will be added to request. /// @@ -3188,7 +3195,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMultiRolePoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMultiRolePoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3213,6 +3220,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (instance == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instance"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -3230,14 +3241,16 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("instance", instance); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePoolSkus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePoolInstanceMetricDefinitions", 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/hostingEnvironments/{name}/multiRolePools/default/skus").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{instance}", System.Uri.EscapeDataString(instance)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -3332,7 +3345,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -3345,7 +3358,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -3365,11 +3378,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get usage metrics for a multi-role pool of an App Service Environment. + /// Get metric definitions for a multi-role pool of an App Service Environment. /// /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. + /// Description for Get metric definitions for a multi-role pool of an App + /// Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -3398,7 +3411,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListMultiRoleUsagesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMultiRoleMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3441,11 +3454,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRoleUsages", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMultiRoleMetricDefinitions", 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/hostingEnvironments/{name}/multiRolePools/default/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions").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)); @@ -3542,7 +3555,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -3555,7 +3568,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -3575,11 +3588,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// List all currently running operations on the App Service Environment. + /// Get available SKUs for scaling a multi-role pool. /// /// - /// Description for List all currently running operations on the App Service - /// Environment. + /// Description for Get available SKUs for scaling a multi-role pool. /// /// /// Name of the resource group to which the resource belongs. @@ -3608,7 +3620,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListOperationsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMultiRolePoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3651,11 +3663,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOperations", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePoolSkus", 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/hostingEnvironments/{name}/operations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus").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)); @@ -3752,7 +3764,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -3765,7 +3777,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -3785,12 +3797,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. + /// Get usage metrics for a multi-role pool of an App Service Environment. /// /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. + /// Description for Get usage metrics for a multi-role pool of an App Service + /// Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -3819,7 +3830,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMultiRoleUsagesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3862,11 +3873,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOutboundNetworkDependenciesEndpoints", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMultiRoleUsages", 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/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -3963,7 +3974,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -3976,7 +3987,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -3996,10 +4007,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Reboot all machines in an App Service Environment. + /// List all currently running operations on the App Service Environment. /// /// - /// Description for Reboot all machines in an App Service Environment. + /// Description for List all currently running operations on the App Service + /// Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -4016,6 +4028,9 @@ internal AppServiceEnvironmentsOperations(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 /// @@ -4025,7 +4040,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RebootWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListOperationsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4068,11 +4083,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Reboot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListOperations", 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/hostingEnvironments/{name}/reboot").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations").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)); @@ -4088,7 +4103,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -4139,7 +4154,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -4169,13 +4184,31 @@ internal AppServiceEnvironmentsOperations(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); @@ -4184,35 +4217,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> ResumeWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get all App Service plans in an App Service Environment. + /// Get the network endpoints of all outbound dependencies of an App Service + /// Environment. /// /// - /// Description for Get all App Service plans in an App Service Environment. + /// Description for Get the network endpoints of all outbound dependencies of + /// an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -4241,7 +4251,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAppServicePlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4284,11 +4294,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAppServicePlans", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetOutboundNetworkDependenciesEndpoints", 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/hostingEnvironments/{name}/serverfarms").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints").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)); @@ -4385,7 +4395,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -4398,7 +4408,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -4418,10 +4428,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get all apps in an App Service Environment. + /// Gets the list of private endpoints associated with a hosting environment /// /// - /// Description for Get all apps in an App Service Environment. + /// Description for Gets the list of private endpoints associated with a + /// hosting environment /// /// /// Name of the resource group to which the resource belongs. @@ -4429,9 +4440,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Comma separated list of app properties to include. - /// /// /// Headers that will be added to request. /// @@ -4453,7 +4461,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, string propertiesToInclude = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4495,21 +4503,16 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("propertiesToInclude", propertiesToInclude); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebApps", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionList", 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/hostingEnvironments/{name}/sites").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections").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 (propertiesToInclude != null) - { - _queryParameters.Add(string.Format("propertiesToInclude={0}", System.Uri.EscapeDataString(propertiesToInclude))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -4602,7 +4605,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -4615,7 +4618,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -4635,35 +4638,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> SuspendWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginSuspendWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get global usage metrics of an App Service Environment. + /// Gets a private endpoint connection /// /// - /// Description for Get global usage metrics of an App Service Environment. + /// Description for Gets a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -4671,11 +4649,8 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - /// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + /// + /// Name of the private endpoint connection. /// /// /// Headers that will be added to request. @@ -4698,7 +4673,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4723,6 +4698,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -4740,21 +4719,18 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("filter", filter); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsages", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", 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/hostingEnvironments/{name}/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -4847,7 +4823,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -4860,7 +4836,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -4880,10 +4856,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get all worker pools of an App Service Environment. + /// Approves or rejects a private endpoint connection /// /// - /// Description for Get all worker pools of an App Service Environment. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -4891,28 +4867,1641 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// + /// + /// + /// + /// /// - /// Headers that will be added to request. + /// 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 - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWorkerPoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPrivateLinkResourcesWithHttpMessagesAsync(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, "GetPrivateLinkResources", 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/hostingEnvironments/{name}/privateLinkResources").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; + } + + /// + /// Reboot all machines in an App Service Environment. + /// + /// + /// Description for Reboot all machines in an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task RebootWithHttpMessagesAsync(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, "Reboot", 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/hostingEnvironments/{name}/reboot").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("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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Resume an App Service Environment. + /// + /// + /// Description for Resume an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> ResumeWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get all App Service plans in an App Service Environment. + /// + /// + /// Description for Get all App Service plans in an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListAppServicePlansWithHttpMessagesAsync(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, "ListAppServicePlans", 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/hostingEnvironments/{name}/serverfarms").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 all apps in an App Service Environment. + /// + /// + /// Description for Get all apps in an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Comma separated list of app properties to include. + /// + /// + /// 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>> ListWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, string propertiesToInclude = default(string), 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("propertiesToInclude", propertiesToInclude); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListWebApps", 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/hostingEnvironments/{name}/sites").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 (propertiesToInclude != null) + { + _queryParameters.Add(string.Format("propertiesToInclude={0}", System.Uri.EscapeDataString(propertiesToInclude))); + } + 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; + } + + /// + /// Suspend an App Service Environment. + /// + /// + /// Description for Suspend an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> SuspendWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginSuspendWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get global usage metrics of an App Service Environment. + /// + /// + /// Description for Get global usage metrics of an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Return only usages/metrics specified in the filter. Filter conforms to + /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq + /// 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq + /// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + /// + /// + /// Headers that will be added to request. + /// + /// + /// 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), 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("filter", filter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListUsages", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all worker pools of an App Service Environment. + /// + /// + /// Description for Get all worker pools of an App Service Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWorkerPoolsWithHttpMessagesAsync(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, "ListWorkerPools", 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/hostingEnvironments/{name}/workerPools").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 properties of a worker pool. + /// + /// + /// Description for Get properties of a worker pool. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Name of the worker pool. + /// + /// + /// 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> GetWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, 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 (workerPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); + } + 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("workerPoolName", workerPoolName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetWorkerPool", 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/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); + _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; + } + + /// + /// Create or update a worker pool. + /// + /// + /// Description for Create or update a worker pool. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Name of the worker pool. + /// + /// + /// Properties of the worker pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Create or update a worker pool. + /// + /// + /// Description for Create or update a worker pool. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Name of the worker pool. + /// + /// + /// Properties of the worker pool. + /// + /// + /// 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> UpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4937,6 +6526,14 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (workerPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); + } + if (workerPoolEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -4954,14 +6551,17 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("workerPoolName", workerPoolName); + tracingParameters.Add("workerPoolEnvelope", workerPoolEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPools", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateWorkerPool", 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/hostingEnvironments/{name}/workerPools").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -4975,7 +6575,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -5006,6 +6606,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(workerPoolEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(workerPoolEnvelope, 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) { @@ -5026,7 +6632,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -5056,7 +6662,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -5069,7 +6675,25 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -5089,10 +6713,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get properties of a worker pool. + /// Get metric definitions for a specific instance of a worker pool of an App + /// Service Environment. /// /// - /// Description for Get properties of a worker pool. + /// Description for Get metric definitions for a specific instance of a worker + /// pool of an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -5103,6 +6729,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the worker pool. /// + /// + /// Name of the instance in the worker pool. + /// /// /// Headers that will be added to request. /// @@ -5124,7 +6753,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWorkerPoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5153,6 +6782,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); } + if (instance == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instance"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5171,15 +6804,17 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("workerPoolName", workerPoolName); + tracingParameters.Add("instance", instance); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWorkerPool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPoolInstanceMetricDefinitions", 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/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); + _url = _url.Replace("{instance}", System.Uri.EscapeDataString(instance)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -5274,7 +6909,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -5287,7 +6922,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -5307,41 +6942,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create or update a worker pool. + /// Get metric definitions for a worker pool of an App Service Environment. /// /// - /// Description for Create or update a worker pool. + /// Description for Get metric definitions for a worker pool of an App Service + /// Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -5352,9 +6957,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the worker pool. /// - /// - /// Properties of the worker pool. - /// /// /// Headers that will be added to request. /// @@ -5376,7 +6978,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWebWorkerMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5405,10 +7007,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); } - if (workerPoolEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5427,13 +7025,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("workerPoolEnvelope", workerPoolEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateWorkerPool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWebWorkerMetricDefinitions", 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/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); @@ -5450,7 +7047,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -5481,12 +7078,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(workerPoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(workerPoolEnvelope, 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) { @@ -5507,7 +7098,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -5537,7 +7128,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -5550,25 +7141,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -5588,12 +7161,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. + /// Get available SKUs for scaling a worker pool. /// /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. + /// Description for Get available SKUs for scaling a worker pool. /// /// /// Name of the resource group to which the resource belongs. @@ -5604,9 +7175,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the worker pool. /// - /// - /// Name of the instance in the worker pool. - /// /// /// Headers that will be added to request. /// @@ -5628,7 +7196,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWorkerPoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWorkerPoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5657,10 +7225,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); } - if (instance == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instance"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5679,17 +7243,15 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("instance", instance); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPoolInstanceMetricDefinitions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPoolSkus", 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _url = _url.Replace("{instance}", System.Uri.EscapeDataString(instance)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -5784,7 +7346,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -5797,7 +7359,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -5817,10 +7379,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get metric definitions for a worker pool of an App Service Environment. + /// Get usage metrics for a worker pool of an App Service Environment. /// /// - /// Description for Get metric definitions for a worker pool of an App Service + /// Description for Get usage metrics for a worker pool of an App Service /// Environment. /// /// @@ -5853,7 +7415,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebWorkerMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWebWorkerUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -5901,11 +7463,11 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("workerPoolName", workerPoolName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebWorkerMetricDefinitions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWebWorkerUsages", 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); @@ -6003,7 +7565,7 @@ internal AppServiceEnvironmentsOperations(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 +7578,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -6036,10 +7598,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get available SKUs for scaling a worker pool. + /// Create or update an App Service Environment. /// /// - /// Description for Get available SKUs for scaling a worker pool. + /// Description for Create or update an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -6047,8 +7609,8 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Name of the worker pool. + /// + /// Configuration details of the App Service Environment. /// /// /// Headers that will be added to request. @@ -6071,7 +7633,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWorkerPoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6096,9 +7658,13 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (workerPoolName == null) + if (hostingEnvironmentEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentEnvelope"); + } + if (hostingEnvironmentEnvelope != null) + { + hostingEnvironmentEnvelope.Validate(); } if (Client.SubscriptionId == null) { @@ -6117,16 +7683,15 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); + tracingParameters.Add("hostingEnvironmentEnvelope", hostingEnvironmentEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPoolSkus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -6140,7 +7705,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -6171,6 +7736,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(hostingEnvironmentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostingEnvironmentEnvelope, 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) { @@ -6191,7 +7762,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -6221,7 +7792,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -6234,7 +7805,43 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -6254,11 +7861,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Get usage metrics for a worker pool of an App Service Environment. + /// Delete an App Service Environment. /// /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. + /// Description for Delete an App Service Environment. /// /// /// Name of the resource group to which the resource belongs. @@ -6266,8 +7872,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Name of the worker pool. + /// + /// Specify <code>true</code> to force the deletion even if the App + /// Service Environment contains resources. The default is + /// <code>false</code>. /// /// /// Headers that will be added to request. @@ -6278,9 +7886,6 @@ internal AppServiceEnvironmentsOperations(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 /// @@ -6290,7 +7895,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebWorkerUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, bool? forceDelete = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6315,10 +7920,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -6336,18 +7937,21 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); + tracingParameters.Add("forceDelete", forceDelete); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebWorkerUsages", tracingParameters); + 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDelete != null) + { + _queryParameters.Add(string.Format("forceDelete={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDelete, Client.SerializationSettings).Trim('"')))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -6359,7 +7963,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -6410,7 +8014,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -6440,31 +8044,13 @@ internal AppServiceEnvironmentsOperations(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); @@ -6473,10 +8059,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Create or update an App Service Environment. + /// Move an App Service Environment to a different VNET. /// /// - /// Description for Create or update an App Service Environment. + /// Description for Move an App Service Environment to a different VNET. /// /// /// Name of the resource group to which the resource belongs. @@ -6484,8 +8070,8 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Configuration details of the App Service Environment. + /// + /// Details for the new virtual network. /// /// /// Headers that will be added to request. @@ -6508,7 +8094,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> BeginChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6533,13 +8119,13 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (hostingEnvironmentEnvelope == null) + if (vnetInfo == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetInfo"); } - if (hostingEnvironmentEnvelope != null) + if (vnetInfo != null) { - hostingEnvironmentEnvelope.Validate(); + vnetInfo.Validate(); } if (Client.SubscriptionId == null) { @@ -6558,13 +8144,13 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("hostingEnvironmentEnvelope", hostingEnvironmentEnvelope); + tracingParameters.Add("vnetInfo", vnetInfo); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginChangeVnet", 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/hostingEnvironments/{name}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork").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)); @@ -6580,7 +8166,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -6611,9 +8197,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(hostingEnvironmentEnvelope != null) + if(vnetInfo != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostingEnvironmentEnvelope, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vnetInfo, 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"); } @@ -6637,7 +8223,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -6667,7 +8253,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -6680,25 +8266,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -6716,7 +8284,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -6736,10 +8304,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Delete an App Service Environment. + /// Create or update a multi-role pool. /// /// - /// Description for Delete an App Service Environment. + /// Description for Create or update a multi-role pool. /// /// /// Name of the resource group to which the resource belongs. @@ -6747,10 +8315,8 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. + /// + /// Properties of the multi-role pool. /// /// /// Headers that will be added to request. @@ -6761,6 +8327,9 @@ internal AppServiceEnvironmentsOperations(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 /// @@ -6770,7 +8339,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, bool? forceDelete = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6795,6 +8364,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (multiRolePoolEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "multiRolePoolEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -6812,21 +8385,17 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("forceDelete", forceDelete); + tracingParameters.Add("multiRolePoolEnvelope", multiRolePoolEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateMultiRolePool", 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/hostingEnvironments/{name}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default").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 (forceDelete != null) - { - _queryParameters.Add(string.Format("forceDelete={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDelete, Client.SerializationSettings).Trim('"')))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -6838,7 +8407,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -6869,6 +8438,12 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(multiRolePoolEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(multiRolePoolEnvelope, 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) { @@ -6889,7 +8464,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -6911,20 +8486,56 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { ServiceClientTracing.Error(_invocationId, ex); } - _httpRequest.Dispose(); - if (_httpResponse != null) + _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) { - _httpResponse.Dispose(); + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } - throw ex; } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) + // Deserialize Response + if ((int)_statusCode == 202) { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + _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) { @@ -6934,10 +8545,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Move an App Service Environment to a different VNET. + /// Approves or rejects a private endpoint connection /// /// - /// Description for Move an App Service Environment to a different VNET. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -6945,8 +8556,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Details for the new virtual network. + /// + /// + /// /// /// /// Headers that will be added to request. @@ -6969,7 +8581,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6994,9 +8606,13 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetInfo == null) + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetInfo"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (privateEndpointWrapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); } if (Client.SubscriptionId == null) { @@ -7015,15 +8631,17 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetInfo", vnetInfo); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginChangeVnet", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", 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/hostingEnvironments/{name}/changeVirtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -7037,7 +8655,7 @@ internal AppServiceEnvironmentsOperations(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) @@ -7068,9 +8686,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(vnetInfo != null) + if(privateEndpointWrapper != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vnetInfo, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -7124,7 +8742,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -7137,7 +8755,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -7155,7 +8773,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -7175,10 +8793,10 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) } /// - /// Create or update a multi-role pool. + /// Deletes a private endpoint connection /// /// - /// Description for Create or update a multi-role pool. + /// Description for Deletes a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. @@ -7186,8 +8804,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// Name of the App Service Environment. /// - /// - /// Properties of the multi-role pool. + /// /// /// /// Headers that will be added to request. @@ -7210,7 +8827,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7235,9 +8852,9 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (multiRolePoolEnvelope == null) + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "multiRolePoolEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } if (Client.SubscriptionId == null) { @@ -7256,15 +8873,16 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("multiRolePoolEnvelope", multiRolePoolEnvelope); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateMultiRolePool", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -7278,7 +8896,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -7309,12 +8927,6 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(multiRolePoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(multiRolePoolEnvelope, 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) { @@ -7335,7 +8947,7 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -7365,7 +8977,7 @@ internal AppServiceEnvironmentsOperations(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")) @@ -7378,7 +8990,7 @@ internal AppServiceEnvironmentsOperations(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) { @@ -7396,7 +9008,25 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -9861,6 +11491,178 @@ internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) return _result; } + /// + /// Gets the list of private endpoints associated with a hosting environment + /// + /// + /// Description for Gets the list of private endpoints associated with a + /// hosting environment + /// + /// + /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(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, "GetPrivateEndpointConnectionListNext", 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; + } + /// /// Resume an App Service Environment. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs index e4a6d169b17e..b77535a589eb 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs @@ -448,6 +448,104 @@ public static IPage ChangeVnet(this IAppServiceEnvironmentsOperations oper } } + /// + /// Get networking configuration of an App Service Environment + /// + /// + /// Description for Get networking configuration of an App Service Environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + public static AseV3NetworkingConfiguration GetAseV3NetworkingConfiguration(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) + { + return operations.GetAseV3NetworkingConfigurationAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Get networking configuration of an App Service Environment + /// + /// + /// Description for Get networking configuration of an App Service Environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The cancellation token. + /// + public static async Task GetAseV3NetworkingConfigurationAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAseV3NetworkingConfigurationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update networking configuration of an App Service Environment + /// + /// + /// Description for Update networking configuration of an App Service + /// Environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + public static AseV3NetworkingConfiguration UpdateAseNetworkingConfiguration(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration) + { + return operations.UpdateAseNetworkingConfigurationAsync(resourceGroupName, name, aseNetworkingConfiguration).GetAwaiter().GetResult(); + } + + /// + /// Update networking configuration of an App Service Environment + /// + /// + /// Description for Update networking configuration of an App Service + /// Environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAseNetworkingConfigurationAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateAseNetworkingConfigurationWithHttpMessagesAsync(resourceGroupName, name, aseNetworkingConfiguration, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get diagnostic information for an App Service Environment. /// @@ -1088,6 +1186,256 @@ public static IPage GetOutboundNetworkDependenciesE } } + /// + /// Gets the list of private endpoints associated with a hosting environment + /// + /// + /// Description for Gets the list of private endpoints associated with a + /// hosting environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + public static IPage GetPrivateEndpointConnectionList(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) + { + return operations.GetPrivateEndpointConnectionListAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of private endpoints associated with a hosting environment + /// + /// + /// Description for Gets the list of private endpoints associated with a + /// hosting environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The cancellation token. + /// + public static async Task> GetPrivateEndpointConnectionListAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Name of the private endpoint connection. + /// + public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// + public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + { + return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + public static object DeletePrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task DeletePrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) + { + return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateLinkResourcesAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Reboot all machines in an App Service Environment. /// @@ -2024,6 +2372,110 @@ public static WorkerPoolResource BeginCreateOrUpdateMultiRolePool(this IAppServi } } + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// + public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + { + return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + public static object BeginDeletePrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeletePrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Resume an App Service Environment. /// @@ -2634,6 +3086,48 @@ public static IPage GetOutboundNetworkDependenciesE } } + /// + /// Gets the list of private endpoints associated with a hosting environment + /// + /// + /// Description for Gets the list of private endpoints associated with a + /// hosting environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetPrivateEndpointConnectionListNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) + { + return operations.GetPrivateEndpointConnectionListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of private endpoints associated with a hosting environment + /// + /// + /// Description for Gets the list of private endpoints associated with a + /// hosting environment + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetPrivateEndpointConnectionListNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Resume an App Service Environment. /// 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 f0fd1ce9ff47..4c48686441f0 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs @@ -2921,6 +2921,10 @@ internal AppServicePlansOperations(WebSiteManagementClient client) _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 (skipToken != null) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); @@ -2933,10 +2937,6 @@ internal AppServicePlansOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(top))); } - 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); @@ -3357,14 +3357,14 @@ internal AppServicePlansOperations(WebSiteManagementClient client) _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs new file mode 100644 index 000000000000..de6c8f12dfda --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs @@ -0,0 +1,687 @@ +// +// 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; + + /// + /// CertificateOrdersDiagnosticsOperations operations. + /// + internal partial class CertificateOrdersDiagnosticsOperations : IServiceOperations, ICertificateOrdersDiagnosticsOperations + { + /// + /// Initializes a new instance of the CertificateOrdersDiagnosticsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal CertificateOrdersDiagnosticsOperations(WebSiteManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the WebSiteManagementClient + /// + public WebSiteManagementClient Client { get; private set; } + + /// + /// Microsoft.CertificateRegistration to get the list of detectors for this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list of + /// detectors for this RP. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is 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>> ListAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, 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 (certificateOrderName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); + } + 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("certificateOrderName", certificateOrderName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAppServiceCertificateOrderDetectorResponse", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); + _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; + } + + /// + /// Microsoft.CertificateRegistration call to get a detector response from App + /// Lens. + /// + /// + /// Description for Microsoft.CertificateRegistration call to get a detector + /// response from App Lens. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is needed. + /// + /// + /// The detector name which needs to be run. + /// + /// + /// The start time for detector response. + /// + /// + /// The end time for the detector response. + /// + /// + /// The time grain for the detector response. + /// + /// + /// 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> GetAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), 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 (certificateOrderName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); + } + if (detectorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); + } + if (timeGrain != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) + { + throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); + } + } + 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("certificateOrderName", certificateOrderName); + tracingParameters.Add("detectorName", detectorName); + tracingParameters.Add("startTime", startTime); + tracingParameters.Add("endTime", endTime); + tracingParameters.Add("timeGrain", timeGrain); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAppServiceCertificateOrderDetectorResponse", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); + _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (startTime != null) + { + _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); + } + if (endTime != null) + { + _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); + } + if (timeGrain != null) + { + _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); + } + 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; + } + + /// + /// Microsoft.CertificateRegistration to get the list of detectors for this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list of + /// detectors for this RP. + /// + /// + /// 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>> ListAppServiceCertificateOrderDetectorResponseNextWithHttpMessagesAsync(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, "ListAppServiceCertificateOrderDetectorResponseNext", 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/CertificateOrdersDiagnosticsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperationsExtensions.cs new file mode 100644 index 000000000000..c9696717ab5a --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperationsExtensions.cs @@ -0,0 +1,189 @@ +// +// 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 CertificateOrdersDiagnosticsOperations. + /// + public static partial class CertificateOrdersDiagnosticsOperationsExtensions + { + /// + /// Microsoft.CertificateRegistration to get the list of detectors for this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list of + /// detectors for this RP. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is needed. + /// + public static IPage ListAppServiceCertificateOrderDetectorResponse(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName) + { + return operations.ListAppServiceCertificateOrderDetectorResponseAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); + } + + /// + /// Microsoft.CertificateRegistration to get the list of detectors for this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list of + /// detectors for this RP. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is needed. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAppServiceCertificateOrderDetectorResponseAsync(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Microsoft.CertificateRegistration call to get a detector response from App + /// Lens. + /// + /// + /// Description for Microsoft.CertificateRegistration call to get a detector + /// response from App Lens. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is needed. + /// + /// + /// The detector name which needs to be run. + /// + /// + /// The start time for detector response. + /// + /// + /// The end time for the detector response. + /// + /// + /// The time grain for the detector response. + /// + public static DetectorResponse GetAppServiceCertificateOrderDetectorResponse(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) + { + return operations.GetAppServiceCertificateOrderDetectorResponseAsync(resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain).GetAwaiter().GetResult(); + } + + /// + /// Microsoft.CertificateRegistration call to get a detector response from App + /// Lens. + /// + /// + /// Description for Microsoft.CertificateRegistration call to get a detector + /// response from App Lens. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is needed. + /// + /// + /// The detector name which needs to be run. + /// + /// + /// The start time for detector response. + /// + /// + /// The end time for the detector response. + /// + /// + /// The time grain for the detector response. + /// + /// + /// The cancellation token. + /// + public static async Task GetAppServiceCertificateOrderDetectorResponseAsync(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Microsoft.CertificateRegistration to get the list of detectors for this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list of + /// detectors for this RP. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAppServiceCertificateOrderDetectorResponseNext(this ICertificateOrdersDiagnosticsOperations operations, string nextPageLink) + { + return operations.ListAppServiceCertificateOrderDetectorResponseNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Microsoft.CertificateRegistration to get the list of detectors for this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list of + /// detectors for this RP. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAppServiceCertificateOrderDetectorResponseNextAsync(this ICertificateOrdersDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAppServiceCertificateOrderDetectorResponseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs index 583856b5039f..fea3e9de0871 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs @@ -56,6 +56,10 @@ internal CertificatesOperations(WebSiteManagementClient client) /// /// Description for Get all certificates for a subscription. /// + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=KeyVaultId eq 'KeyVaultId' + /// /// /// Headers that will be added to request. /// @@ -77,7 +81,7 @@ internal CertificatesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -94,6 +98,7 @@ internal CertificatesOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -106,6 +111,10 @@ internal CertificatesOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs index 2f310ccda8e3..0b12b9a8b490 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs @@ -30,9 +30,13 @@ public static partial class CertificatesOperationsExtensions /// /// The operations group for this extension method. /// - public static IPage List(this ICertificatesOperations operations) + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=KeyVaultId eq 'KeyVaultId' + /// + public static IPage List(this ICertificatesOperations operations, string filter = default(string)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return operations.ListAsync(filter).GetAwaiter().GetResult(); } /// @@ -44,12 +48,16 @@ public static IPage List(this ICertificatesOperations operations) /// /// The operations group for this extension method. /// + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=KeyVaultId eq 'KeyVaultId' + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this ICertificatesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this ICertificatesOperations operations, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(filter, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } 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 32d276db9b8f..08d58ad3005c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs @@ -2095,11 +2095,11 @@ internal DomainsOperations(WebSiteManagementClient client) /// /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifer + /// for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifer + /// identifier details for an existing identifier /// /// /// Name of the resource group to which the resource belongs. @@ -2526,11 +2526,11 @@ internal DomainsOperations(WebSiteManagementClient client) /// /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifer + /// for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifer + /// identifier details for an existing identifier /// /// /// Name of the resource group to which the resource belongs. 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 d6580c16cf14..ea9c034cf240 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs @@ -514,11 +514,11 @@ public static DomainOwnershipIdentifier GetOwnershipIdentifier(this IDomainsOper /// /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifer + /// for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifer + /// identifier details for an existing identifier /// /// /// The operations group for this extension method. @@ -542,11 +542,11 @@ public static DomainOwnershipIdentifier CreateOrUpdateOwnershipIdentifier(this I /// /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifer + /// for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifer + /// identifier details for an existing identifier /// /// /// The operations group for this extension method. @@ -625,11 +625,11 @@ public static void DeleteOwnershipIdentifier(this IDomainsOperations operations, /// /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifer + /// for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifer + /// identifier details for an existing identifier /// /// /// The operations group for this extension method. @@ -653,11 +653,11 @@ public static DomainOwnershipIdentifier UpdateOwnershipIdentifier(this IDomainsO /// /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifer + /// for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifer + /// identifier details for an existing identifier /// /// /// The operations group for this extension method. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs new file mode 100644 index 000000000000..4e9e2829d289 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs @@ -0,0 +1,597 @@ +// +// 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; + + /// + /// GlobalModelOperations operations. + /// + internal partial class GlobalModelOperations : IServiceOperations, IGlobalModelOperations + { + /// + /// Initializes a new instance of the GlobalModelOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GlobalModelOperations(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 deleted app for a subscription. + /// + /// + /// Description for Get deleted app for a subscription. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + /// + /// 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> GetDeletedWebAppWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (deletedSiteId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deletedSiteId"); + } + 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("deletedSiteId", deletedSiteId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDeletedWebApp", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}").ToString(); + _url = _url.Replace("{deletedSiteId}", System.Uri.EscapeDataString(deletedSiteId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all deleted apps for a subscription. + /// + /// + /// Description for Get all deleted apps for a subscription. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + /// + /// 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>> GetDeletedWebAppSnapshotsWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (deletedSiteId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deletedSiteId"); + } + 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("deletedSiteId", deletedSiteId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDeletedWebAppSnapshots", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots").ToString(); + _url = _url.Replace("{deletedSiteId}", System.Uri.EscapeDataString(deletedSiteId)); + _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; + } + + /// + /// Gets an operation in a subscription and given region + /// + /// + /// Description for Gets an operation in a subscription and given region + /// + /// + /// Location name + /// + /// + /// Operation Id + /// + /// + /// 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 GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + 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("location", location); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetSubscriptionOperationWithAsyncResponse", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _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 != 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; + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs new file mode 100644 index 000000000000..f9234d348ca7 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs @@ -0,0 +1,150 @@ +// +// 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; + + /// + /// Extension methods for GlobalModelOperations. + /// + public static partial class GlobalModelOperationsExtensions + { + /// + /// Get deleted app for a subscription. + /// + /// + /// Description for Get deleted app for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + public static DeletedSite GetDeletedWebApp(this IGlobalModelOperations operations, string deletedSiteId) + { + return operations.GetDeletedWebAppAsync(deletedSiteId).GetAwaiter().GetResult(); + } + + /// + /// Get deleted app for a subscription. + /// + /// + /// Description for Get deleted app for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + /// + /// The cancellation token. + /// + public static async Task GetDeletedWebAppAsync(this IGlobalModelOperations operations, string deletedSiteId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDeletedWebAppWithHttpMessagesAsync(deletedSiteId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get all deleted apps for a subscription. + /// + /// + /// Description for Get all deleted apps for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + public static IList GetDeletedWebAppSnapshots(this IGlobalModelOperations operations, string deletedSiteId) + { + return operations.GetDeletedWebAppSnapshotsAsync(deletedSiteId).GetAwaiter().GetResult(); + } + + /// + /// Get all deleted apps for a subscription. + /// + /// + /// Description for Get all deleted apps for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + /// + /// The cancellation token. + /// + public static async Task> GetDeletedWebAppSnapshotsAsync(this IGlobalModelOperations operations, string deletedSiteId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDeletedWebAppSnapshotsWithHttpMessagesAsync(deletedSiteId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets an operation in a subscription and given region + /// + /// + /// Description for Gets an operation in a subscription and given region + /// + /// + /// The operations group for this extension method. + /// + /// + /// Location name + /// + /// + /// Operation Id + /// + public static void GetSubscriptionOperationWithAsyncResponse(this IGlobalModelOperations operations, string location, string operationId) + { + operations.GetSubscriptionOperationWithAsyncResponseAsync(location, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets an operation in a subscription and given region + /// + /// + /// Description for Gets an operation in a subscription and given region + /// + /// + /// The operations group for this extension method. + /// + /// + /// Location name + /// + /// + /// Operation Id + /// + /// + /// The cancellation token. + /// + public static async Task GetSubscriptionOperationWithAsyncResponseAsync(this IGlobalModelOperations operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs index a95032f627c6..4afcf71a451e 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs @@ -284,6 +284,66 @@ public partial interface IAppServiceEnvironmentsOperations /// Task>> ChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Get networking configuration of an App Service Environment + /// + /// + /// Description for Get networking configuration of an App Service + /// Environment + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetAseV3NetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update networking configuration of an App Service Environment + /// + /// + /// Description for Update networking configuration of an App Service + /// Environment + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateAseNetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get diagnostic information for an App Service Environment. /// /// @@ -674,6 +734,157 @@ public partial interface IAppServiceEnvironmentsOperations /// Task>> GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the list of private endpoints associated with a hosting + /// environment + /// + /// + /// Description for Gets the list of private endpoints associated with + /// a hosting environment + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Reboot all machines in an App Service Environment. /// /// @@ -1234,6 +1445,68 @@ public partial interface IAppServiceEnvironmentsOperations /// Task> BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the App Service Environment. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Resume an App Service Environment. /// /// @@ -1614,6 +1887,33 @@ public partial interface IAppServiceEnvironmentsOperations /// Task>> GetOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the list of private endpoints associated with a hosting + /// environment + /// + /// + /// Description for Gets the list of private endpoints associated with + /// a hosting environment + /// + /// + /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Resume an App Service Environment. /// /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs new file mode 100644 index 000000000000..27a71c5b91d6 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs @@ -0,0 +1,126 @@ +// +// 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; + + /// + /// CertificateOrdersDiagnosticsOperations operations. + /// + public partial interface ICertificateOrdersDiagnosticsOperations + { + /// + /// Microsoft.CertificateRegistration to get the list of detectors for + /// this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list + /// of detectors for this RP. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is 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>> ListAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Microsoft.CertificateRegistration call to get a detector response + /// from App Lens. + /// + /// + /// Description for Microsoft.CertificateRegistration call to get a + /// detector response from App Lens. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The certificate order name for which the response is needed. + /// + /// + /// The detector name which needs to be run. + /// + /// + /// The start time for detector response. + /// + /// + /// The end time for the detector response. + /// + /// + /// The time grain for the detector response. + /// + /// + /// 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> GetAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Microsoft.CertificateRegistration to get the list of detectors for + /// this RP. + /// + /// + /// Description for Microsoft.CertificateRegistration to get the list + /// of detectors for this RP. + /// + /// + /// 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>> ListAppServiceCertificateOrderDetectorResponseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs index 949867d9a615..86f6dcfa701d 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs @@ -29,6 +29,10 @@ public partial interface ICertificatesOperations /// /// Description for Get all certificates for a subscription. /// + /// + /// Return only information specified in the filter (using OData + /// syntax). For example: $filter=KeyVaultId eq 'KeyVaultId' + /// /// /// The headers that will be added to request. /// @@ -44,7 +48,7 @@ public partial interface ICertificatesOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get all certificates in a resource group. /// 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 26350ec4d859..e1aebe7efb72 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs @@ -324,11 +324,11 @@ public partial interface IDomainsOperations Task> GetOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates an ownership identifier for a domain or updates identifier - /// details for an existing identifer + /// details for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or - /// updates identifier details for an existing identifer + /// updates identifier details for an existing identifier /// /// /// Name of the resource group to which the resource belongs. @@ -388,11 +388,11 @@ public partial interface IDomainsOperations Task DeleteOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates an ownership identifier for a domain or updates identifier - /// details for an existing identifer + /// details for an existing identifier /// /// /// Description for Creates an ownership identifier for a domain or - /// updates identifier details for an existing identifer + /// updates identifier details for an existing identifier /// /// /// Name of the resource group to which the resource belongs. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs new file mode 100644 index 000000000000..c71309c9de0f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs @@ -0,0 +1,103 @@ +// +// 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; + + /// + /// GlobalModelOperations operations. + /// + public partial interface IGlobalModelOperations + { + /// + /// Get deleted app for a subscription. + /// + /// + /// Description for Get deleted app for a subscription. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + /// + /// 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> GetDeletedWebAppWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all deleted apps for a subscription. + /// + /// + /// Description for Get all deleted apps for a subscription. + /// + /// + /// The numeric ID of the deleted app, e.g. 12345 + /// + /// + /// 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>> GetDeletedWebAppSnapshotsWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets an operation in a subscription and given region + /// + /// + /// Description for Gets an operation in a subscription and given + /// region + /// + /// + /// Location name + /// + /// + /// Operation Id + /// + /// + /// 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 GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs new file mode 100644 index 000000000000..c91aa361b24a --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs @@ -0,0 +1,297 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// KubeEnvironmentsOperations operations. + /// + public partial interface IKubeEnvironmentsOperations + { + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource + /// group. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource + /// group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs index 662c53798b81..ed6bf7f9bd67 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs @@ -32,7 +32,7 @@ public partial interface IProviderOperations /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// /// /// The headers that will be added to request. @@ -51,6 +51,91 @@ public partial interface IProviderOperations /// Task>> GetAvailableStacksWithHttpMessagesAsync(string osTypeSelected = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Get available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their + /// versions + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// 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>> GetFunctionAppStacksWithHttpMessagesAsync(string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get available Function app frameworks and their versions for + /// location + /// + /// + /// Description for Get available Function app frameworks and their + /// versions for location + /// + /// + /// Function App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// 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>> GetFunctionAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions + /// for location + /// + /// + /// Web App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// 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>> GetWebAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets all available operations for the Microsoft.Web resource /// provider. Also exposes resource metric definitions /// @@ -75,6 +160,31 @@ public partial interface IProviderOperations /// Task>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// 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>> GetWebAppStacksWithHttpMessagesAsync(string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get available application frameworks and their versions /// /// @@ -83,7 +193,7 @@ public partial interface IProviderOperations /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// /// /// The headers that will be added to request. @@ -128,6 +238,85 @@ public partial interface IProviderOperations /// Task>> GetAvailableStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Get available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their + /// versions + /// + /// + /// 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>> GetFunctionAppStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get available Function app frameworks and their versions for + /// location + /// + /// + /// Description for Get available Function app frameworks and their + /// versions for location + /// + /// + /// 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>> GetFunctionAppStacksForLocationNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions + /// for location + /// + /// + /// 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>> GetWebAppStacksForLocationNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets all available operations for the Microsoft.Web resource /// provider. Also exposes resource metric definitions /// @@ -155,6 +344,31 @@ public partial interface IProviderOperations /// Task>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// 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>> GetWebAppStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get available application frameworks and their versions /// /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs index d417e4d033a4..27111b69f27c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs @@ -23,6 +23,36 @@ namespace Microsoft.Azure.Management.WebSites /// public partial interface IStaticSitesOperations { + /// + /// Generates a preview workflow file for the static site + /// + /// + /// Description for Generates a preview workflow file for the static + /// site + /// + /// + /// Location where you plan to create the static site. + /// + /// + /// A JSON representation of the StaticSitesWorkflowPreviewRequest + /// properties. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> PreviewWorkflowWithHttpMessagesAsync(string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get all Static Sites for a subscription. /// @@ -331,7 +361,7 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// @@ -349,7 +379,7 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> GetStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a static site build. /// @@ -362,9 +392,41 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. + /// + /// + /// 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 DeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates the app settings of a static site build. + /// + /// + /// Description for Creates or updates the app settings of a static + /// site build. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// /// The stage site identifier. /// + /// + /// The dictionary containing the static site app settings to update. + /// /// /// The headers that will be added to request. /// @@ -374,10 +436,13 @@ public partial interface IStaticSitesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates or updates the function app settings of a static site /// build. @@ -392,10 +457,12 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// + /// The dictionary containing the static site function app settings to + /// update. /// /// /// The headers that will be added to request. @@ -412,7 +479,7 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string prId, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the functions of a particular static site build. /// @@ -426,7 +493,7 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// @@ -444,12 +511,13 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task>> ListStaticSiteBuildFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListStaticSiteBuildFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the application settings of a static site. + /// Gets the application settings of a static site build. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Gets the application settings of a static site + /// build. /// /// /// Name of the resource group to which the resource belongs. @@ -457,7 +525,7 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// @@ -475,13 +543,13 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates the function app settings of a static site. + /// Gets the application settings of a static site build. /// /// - /// Description for Creates or updates the function app settings of a - /// static site. + /// Description for Gets the application settings of a static site + /// build. /// /// /// Name of the resource group to which the resource belongs. @@ -489,7 +557,8 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// /// /// The headers that will be added to request. @@ -506,12 +575,14 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates an invitation link for a user with the role + /// Gets the details of the user provided function apps registered with + /// a static site build /// /// - /// Description for Creates an invitation link for a user with the role + /// Description for Gets the details of the user provided function apps + /// registered with a static site build /// /// /// Name of the resource group to which the resource belongs. @@ -519,7 +590,8 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// /// /// The headers that will be added to request. @@ -536,19 +608,26 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> CreateUserRolesInvitationLinkWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> GetUserProvidedFunctionAppsForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all static site custom domains for a particular static site. + /// Gets the details of the user provided function app registered with + /// a static site build /// /// - /// Description for Gets all static site custom domains for a - /// particular static site. + /// Description for Gets the details of the user provided function app + /// registered with a static site build /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site resource to search in. + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// /// /// The headers that will be added to request. @@ -565,14 +644,13 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task>> ListStaticSiteCustomDomainsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetUserProvidedFunctionAppForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates a new static site custom domain in an existing resource - /// group and static site. + /// Register a user provided function app with a static site build /// /// - /// Description for Creates a new static site custom domain in an - /// existing resource group and static site. + /// Description for Register a user provided function app with a static + /// site build /// /// /// Name of the resource group to which the resource belongs. @@ -580,8 +658,21 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// - /// The custom domain to create. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. + /// See example. + /// + /// + /// Specify <code>true</code> to force the update of the + /// auth configuration on the function app even if an + /// AzureStaticWebApps provider is already configured on the function + /// app. The default is <code>false</code>. /// /// /// The headers that will be added to request. @@ -598,12 +689,13 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> RegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes a custom domain. + /// Detach the user provided function app from the static site build /// /// - /// Description for Deletes a custom domain. + /// Description for Detach the user provided function app from the + /// static site build /// /// /// Name of the resource group to which the resource belongs. @@ -611,8 +703,11 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// - /// The custom domain to delete. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// /// /// The headers that will be added to request. @@ -626,13 +721,13 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task DeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DetachUserProvidedFunctionAppFromStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Validates a particular custom domain can be added to a static site. + /// Deploys zipped content to a specific environment of a static site. /// /// - /// Description for Validates a particular custom domain can be added - /// to a static site. + /// Description for Deploys zipped content to a specific environment of + /// a static site. /// /// /// Name of the resource group to which the resource belongs. @@ -640,8 +735,12 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// - /// - /// The custom domain to validate. + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. + /// See example. /// /// /// The headers that will be added to request. @@ -655,18 +754,22 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Detaches a static site. + /// Creates or updates the app settings of a static site. /// /// - /// Description for Detaches a static site. + /// Description for Creates or updates the app settings of a static + /// site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site to detach. + /// Name of the static site. + /// + /// + /// The dictionary containing the static site app settings to update. /// /// /// The headers that will be added to request. @@ -677,15 +780,19 @@ public partial interface IStaticSitesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the functions of a static site. + /// Creates or updates the function app settings of a static site. /// /// - /// Description for Gets the functions of a static site. + /// Description for Creates or updates the function app settings of a + /// static site. /// /// /// Name of the resource group to which the resource belongs. @@ -693,6 +800,10 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// + /// + /// The dictionary containing the static site function app settings to + /// update. + /// /// /// The headers that will be added to request. /// @@ -708,12 +819,12 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task>> ListStaticSiteFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the application settings of a static site. + /// Creates an invitation link for a user with the role /// /// - /// Description for Gets the application settings of a static site. + /// Description for Creates an invitation link for a user with the role /// /// /// Name of the resource group to which the resource belongs. @@ -721,6 +832,8 @@ public partial interface IStaticSitesOperations /// /// Name of the static site. /// + /// + /// /// /// The headers that will be added to request. /// @@ -736,18 +849,19 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateUserRolesInvitationLinkWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Lists the secrets for an existing static site. + /// Gets all static site custom domains for a particular static site. /// /// - /// Description for Lists the secrets for an existing static site. + /// Description for Gets all static site custom domains for a + /// particular static site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site. + /// Name of the static site resource to search in. /// /// /// The headers that will be added to request. @@ -764,20 +878,22 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task> ListStaticSiteSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListStaticSiteCustomDomainsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Resets the api key for an existing static site. + /// Gets an existing custom domain for a particular static site. /// /// - /// Description for Resets the api key for an existing static site. + /// Description for Gets an existing custom domain for a particular + /// static site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site. + /// Name of the static site resource to search in. /// - /// + /// + /// The custom domain name. /// /// /// The headers that will be added to request. @@ -788,18 +904,33 @@ public partial interface IStaticSitesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task ResetStaticSiteApiKeyWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get all Static Sites for a subscription. + /// Creates a new static site custom domain in an existing resource + /// group and static site. /// /// - /// Description for Get all Static Sites for a subscription. + /// Description for Creates a new static site custom domain in an + /// existing resource group and static site. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request + /// properties. See example. /// /// /// The headers that will be added to request. @@ -816,16 +947,21 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all static sites in the specified resource group. + /// Deletes a custom domain. /// /// - /// Description for Gets all static sites in the specified resource - /// group. + /// Description for Deletes a custom domain. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. /// /// /// The headers that will be added to request. @@ -836,21 +972,29 @@ public partial interface IStaticSitesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task>> GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the list of users of a static site. + /// Validates a particular custom domain can be added to a static site. /// /// - /// Description for Gets the list of users of a static site. + /// Description for Validates a particular custom domain can be added + /// to a static site. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request + /// properties. See example. /// /// /// The headers that will be added to request. @@ -861,22 +1005,21 @@ public partial interface IStaticSitesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task>> ListStaticSiteUsersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all static site builds for a particular static site. + /// Detaches a static site. /// /// - /// Description for Gets all static site builds for a particular static - /// site. + /// Description for Detaches a static site. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. /// /// /// The headers that will be added to request. @@ -887,22 +1030,21 @@ public partial interface IStaticSitesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task>> GetStaticSiteBuildsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the functions of a particular static site build. + /// Gets the functions of a static site. /// /// - /// Description for Gets the functions of a particular static site - /// build. + /// Description for Gets the functions of a static site. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. /// /// /// The headers that will be added to request. @@ -919,16 +1061,18 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task>> ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListStaticSiteFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all static site custom domains for a particular static site. + /// Gets the application settings of a static site. /// /// - /// Description for Gets all static site custom domains for a - /// particular static site. + /// Description for Gets the application settings of a static site. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. /// /// /// The headers that will be added to request. @@ -945,15 +1089,1047 @@ public partial interface IStaticSitesOperations /// /// Thrown when a required parameter is null /// - Task>> ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the functions of a static site. + /// Lists the roles configured for the static site. /// /// - /// Description for Gets the functions of a static site. + /// Description for Lists the roles configured for the static site. /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteConfiguredRolesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the secrets for an existing static site. + /// + /// + /// Description for Lists the secrets for an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of private endpoint connections associated with a + /// static site + /// + /// + /// Description for Gets the list of private endpoint connections + /// associated with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + /// + /// 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> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// 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> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Resets the api key for an existing static site. + /// + /// + /// Description for Resets the api key for an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// + /// + /// 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 ResetStaticSiteApiKeyWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the user provided function apps registered with + /// a static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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>> GetUserProvidedFunctionAppsForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the user provided function app registered with + /// a static site + /// + /// + /// Description for Gets the details of the user provided function app + /// registered with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + /// + /// 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> GetUserProvidedFunctionAppForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static + /// site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. + /// See example. + /// + /// + /// Specify <code>true</code> to force the update of the + /// auth configuration on the function app even if an + /// AzureStaticWebApps provider is already configured on the function + /// app. The default is <code>false</code>. + /// + /// + /// 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> RegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Detach the user provided function app from the static site + /// + /// + /// Description for Detach the user provided function app from the + /// static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + /// + /// 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 DetachUserProvidedFunctionAppFromStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. + /// See example. + /// + /// + /// 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 CreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new static site in an existing resource group, or updates + /// an existing static site. + /// + /// + /// Description for Creates a new static site in an existing resource + /// group, or updates an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to create or update. + /// + /// + /// A JSON representation of the staticsite properties. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a static site. + /// + /// + /// Description for Deletes a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to delete. + /// + /// + /// 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 BeginDeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a static site build. + /// + /// + /// Description for Deletes a static site build. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// 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 BeginDeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Register a user provided function app with a static site build + /// + /// + /// Description for Register a user provided function app with a static + /// site build + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. + /// See example. + /// + /// + /// Specify <code>true</code> to force the update of the + /// auth configuration on the function app even if an + /// AzureStaticWebApps provider is already configured on the function + /// app. The default is <code>false</code>. + /// + /// + /// 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deploys zipped content to a specific environment of a static site. + /// + /// + /// Description for Deploys zipped content to a specific environment of + /// a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. + /// See example. + /// + /// + /// 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 BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new static site custom domain in an existing resource + /// group and static site. + /// + /// + /// Description for Creates a new static site custom domain in an + /// existing resource group and static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request + /// properties. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + /// + /// 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 BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added + /// to a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request + /// properties. See example. + /// + /// + /// 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 BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + /// + /// 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 BeginDetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + /// + /// 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static + /// site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. + /// See example. + /// + /// + /// Specify <code>true</code> to force the update of the + /// auth configuration on the function app even if an + /// AzureStaticWebApps provider is already configured on the function + /// app. The default is <code>false</code>. + /// + /// + /// 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. + /// See example. + /// + /// + /// 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 BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get all Static Sites for a subscription. + /// + /// + /// Description for Get all Static Sites for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all static sites in the specified resource group. + /// + /// + /// Description for Gets all static sites in the specified 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>> GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of users of a static site. + /// + /// + /// Description for Gets the list of users of a static site. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListStaticSiteUsersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all static site builds for a particular static site. + /// + /// + /// Description for Gets all static site builds for a particular static + /// site. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetStaticSiteBuildsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the functions of a particular static site build. + /// + /// + /// Description for Gets the functions of a particular static site + /// build. + /// + /// + /// 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>> ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the user provided function apps registered with + /// a static site build + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site build + /// + /// + /// 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>> GetUserProvidedFunctionAppsForStaticSiteBuildNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all static site custom domains for a particular static site. + /// + /// + /// Description for Gets all static site custom domains for a + /// particular static site. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the functions of a static site. + /// + /// + /// Description for Gets the functions of a static site. + /// + /// + /// The NextLink from the previous successful call to List operation. /// /// /// The headers that will be added to request. @@ -971,5 +2147,59 @@ public partial interface IStaticSitesOperations /// Thrown when a required parameter is null /// Task>> ListStaticSiteFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of private endpoint connections associated with a + /// static site + /// + /// + /// Description for Gets the list of private endpoint connections + /// associated with a static site + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the user provided function apps registered with + /// a static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetUserProvidedFunctionAppsForStaticSiteNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs index 4cd486e4521f..1b54aedbd05c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs @@ -966,6 +966,125 @@ public partial interface IWebAppsOperations /// Task> GetBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the config reference app settings 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. + /// + /// + /// 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>> GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the config reference 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. + /// + /// + /// Name of the app. + /// + /// + /// App Setting key name. + /// + /// + /// 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> GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the config reference app settings 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. + /// + /// + /// 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>> GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the config reference 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. + /// + /// + /// 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> GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Replaces the connection strings of an app. /// /// @@ -3697,7 +3816,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a Swift Virtual Network connection from an app (or /// deployment slot). @@ -3726,47 +3845,6 @@ public partial interface IWebAppsOperations /// Task DeleteSwiftVirtualNetworkWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Gets all network features used by the app (or deployment slot, if /// specified). /// @@ -3781,7 +3859,7 @@ public partial interface IWebAppsOperations /// Name of the app. /// /// - /// The type of view. This can either be "summary" or "detailed". + /// The type of view. Only "summary" is supported at this time. /// /// /// The headers that will be added to request. @@ -4340,19 +4418,18 @@ public partial interface IWebAppsOperations /// Task> PutPrivateAccessVnetWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. + /// Gets the list of private endpoint connections associated with a + /// site /// /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. + /// Description for Gets the list of private endpoint connections + /// associated with a site /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// /// /// The headers that will be added to request. @@ -4369,23 +4446,21 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task>> ListProcessesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Gets a private endpoint connection /// /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// - /// - /// PID. + /// + /// Name of the private endpoint connection. /// /// /// The headers that will be added to request. @@ -4402,23 +4477,22 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Terminate a process by its ID for a web site, or a deployment slot, - /// or specific scaled-out instance in a web site. + /// Approves or rejects a private endpoint connection /// /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// - /// - /// PID. + /// + /// + /// /// /// /// The headers that will be added to request. @@ -4429,26 +4503,26 @@ public partial interface IWebAppsOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get a memory dump of a process by its ID for a specific scaled-out - /// instance in a web site. + /// Deletes a private endpoint connection /// /// - /// Description for Get a memory dump of a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Deletes a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// - /// - /// PID. + /// /// /// /// The headers that will be added to request. @@ -4465,23 +4539,18 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. + /// Gets the private link resources /// /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. + /// Description for Gets the private link resources /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of the site. /// /// /// The headers that will be added to request. @@ -4498,14 +4567,15 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task>> ListProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Get list of processes for a web site, or a deployment slot, or for + /// a specific scaled-out instance in a web site. /// /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Get list of processes for a web site, or a + /// deployment slot, or for a specific scaled-out instance in a web + /// site. /// /// /// Name of the resource group to which the resource belongs. @@ -4513,12 +4583,6 @@ public partial interface IWebAppsOperations /// /// Site name. /// - /// - /// PID. - /// - /// - /// Module base address. - /// /// /// The headers that will be added to request. /// @@ -4534,14 +4598,14 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListProcessesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List the threads in a process by its ID for a specific scaled-out + /// Get process information by its ID for a specific scaled-out /// instance in a web site. /// /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Get process information by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -4567,19 +4631,23 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task>> ListProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get public certificates for an app or a deployment slot. + /// Terminate a process by its ID for a web site, or a deployment slot, + /// or specific scaled-out instance in a web site. /// /// - /// Description for Get public certificates for an app or a deployment - /// slot. + /// Description for Terminate a process by its ID for a web site, or a + /// deployment slot, or specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. /// /// /// The headers that will be added to request. @@ -4590,20 +4658,181 @@ public partial interface IWebAppsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task>> ListPublicCertificatesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). + /// Get a memory dump of a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Get the named public certificate for an app (or - /// deployment slot, if specified). + /// Description for Get a memory dump of a process by its ID for a + /// specific scaled-out instance in a web site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// PID. + /// + /// + /// 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> GetProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List module information for a process by its ID for a specific + /// scaled-out instance in a web site. + /// + /// + /// Description for List module information for a process by its ID for + /// a specific scaled-out instance in a web site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// PID. + /// + /// + /// 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>> ListProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get process information by its ID for a specific scaled-out + /// instance in a web site. + /// + /// + /// Description for Get process information by its ID for a specific + /// scaled-out instance in a web site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// PID. + /// + /// + /// Module base address. + /// + /// + /// 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> GetProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List the threads in a process by its ID for a specific scaled-out + /// instance in a web site. + /// + /// + /// Description for List the threads in a process by its ID for a + /// specific scaled-out instance in a web site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// PID. + /// + /// + /// 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>> ListProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get public certificates for an app or a deployment slot. + /// + /// + /// Description for Get public certificates for an app or a deployment + /// slot. + /// + /// + /// 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>> ListPublicCertificatesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the named public certificate for an app (or deployment slot, if + /// specified). + /// + /// + /// Description for Get the named public certificate for an app (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -4999,36 +5228,6 @@ public partial interface IWebAppsOperations /// Task DeleteSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot - /// of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config - /// properties to override the source slot config. See example. - /// - /// - /// 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 CopyProductionSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Gets an app's deployment slots. /// /// @@ -5147,9 +5346,8 @@ public partial interface IWebAppsOperations /// If true, web app metrics are also deleted. /// /// - /// Specify true if the App Service plan will be empty after app - /// deletion and you want to delete the empty App Service plan. By - /// default, the empty App Service plan is not deleted. + /// Specify false if you want to keep empty App Service plan. By + /// default, empty App Service plan is deleted. /// /// /// The headers that will be added to request. @@ -5488,6 +5686,165 @@ public partial interface IWebAppsOperations /// Task RestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Returns whether Scm basic auth is allowed and whether Ftp is + /// allowed for a given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and + /// whether Ftp is allowed for a given site. + /// + /// + /// 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> GetBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns whether FTP is allowed on the site or not. + /// + /// + /// Description for Returns whether FTP is allowed on the site or not. + /// + /// + /// 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> GetFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates whether FTP is allowed on the site or not. + /// + /// + /// Description for Updates whether FTP is allowed on the site or not. + /// + /// + /// 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> UpdateFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns whether Scm basic auth is allowed on the site or not. + /// + /// + /// Description for Returns whether Scm basic auth is allowed on the + /// site or not. + /// + /// + /// 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> GetScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates whether user publishing credentials are allowed on the site + /// or not. + /// + /// + /// Description for Updates whether user publishing credentials are + /// allowed on the site or not. + /// + /// + /// 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> UpdateScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List the configurations of an app /// /// @@ -5591,20 +5948,161 @@ public partial interface IWebAppsOperations /// web app. /// /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. + /// Description for Updates the Authentication / Authorization settings + /// associated with web app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Auth settings associated with web app. + /// + /// + /// Name of web app slot. If not specified then will default to + /// production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the Authentication/Authorization settings of an app. + /// + /// + /// Description for Gets the Authentication/Authorization settings of + /// an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API + /// will get the settings for the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates site's Authentication / Authorization settings for apps via + /// the V2 format + /// + /// + /// 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 web app. + /// + /// + /// Auth settings associated with web app. + /// + /// + /// Name of web app slot. If not specified then will default to + /// production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, 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. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API + /// will get the settings for the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates 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. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Auth settings associated with web app. + /// + /// Azure storage accounts of the app. /// /// - /// Name of web app slot. If not specified then will default to + /// Name of the deployment slot. If a slot is not specified, the API + /// will update the Azure storage account configurations for the /// production slot. /// /// @@ -5622,13 +6120,13 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the Authentication/Authorization settings of an app. + /// Gets the Azure storage account configurations of an app. /// /// - /// Description for Gets the Authentication/Authorization settings of - /// an app. + /// Description for Gets the Azure storage account configurations of an + /// app. /// /// /// Name of the resource group to which the resource belongs. @@ -5638,7 +6136,8 @@ public partial interface IWebAppsOperations /// /// /// Name of the deployment slot. If a slot is not specified, the API - /// will get the settings for the production slot. + /// will update the Azure storage account configurations for the + /// production slot. /// /// /// The headers that will be added to request. @@ -5655,27 +6154,25 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates site's Authentication / Authorization settings for apps via - /// the V2 format + /// Updates the backup configuration of an app. /// /// - /// Description for Updates site's Authentication / Authorization - /// settings for apps via the V2 format + /// Description for Updates the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Auth settings associated with web app. + /// + /// Edited backup configuration. /// /// - /// Name of web app slot. If not specified then will default to - /// production slot. + /// Name of the deployment slot. If a slot is not specified, the API + /// will update the backup configuration for the production slot. /// /// /// The headers that will be added to request. @@ -5692,14 +6189,12 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets site's Authentication / Authorization settings for apps via - /// the V2 format + /// Deletes the backup configuration of an app. /// /// - /// Description for Gets site's Authentication / Authorization settings - /// for apps via the V2 format + /// Description for Deletes the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -5709,7 +6204,7 @@ public partial interface IWebAppsOperations /// /// /// Name of the deployment slot. If a slot is not specified, the API - /// will get the settings for the production slot. + /// will delete the backup configuration for the production slot. /// /// /// The headers that will be added to request. @@ -5720,19 +6215,15 @@ public partial interface IWebAppsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> GetAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates the Azure storage account configurations of an app. + /// Gets the backup configuration of an app. /// /// - /// Description for Updates the Azure storage account configurations of - /// an app. + /// Description for Gets the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -5740,13 +6231,9 @@ public partial interface IWebAppsOperations /// /// Name of the app. /// - /// - /// Azure storage accounts of the app. - /// /// /// Name of the deployment slot. If a slot is not specified, the API - /// will update the Azure storage account configurations for the - /// production slot. + /// will get the backup configuration for the production slot. /// /// /// The headers that will be added to request. @@ -5763,13 +6250,13 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the Azure storage account configurations of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets the Azure storage account configurations 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. @@ -5778,9 +6265,6 @@ public partial interface IWebAppsOperations /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the Azure storage account configurations for the - /// production slot. /// /// /// The headers that will be added to request. @@ -5797,12 +6281,12 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> ListAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> GetAppSettingsKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates the backup configuration of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Updates the backup configuration of an app. + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -5810,12 +6294,10 @@ public partial interface IWebAppsOperations /// /// Name of the app. /// - /// - /// Edited backup configuration. + /// + /// App Setting key name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the backup configuration for the production slot. /// /// /// The headers that will be added to request. @@ -5832,12 +6314,13 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetAppSettingKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes the backup configuration of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Deletes the backup configuration 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. @@ -5846,8 +6329,6 @@ public partial interface IWebAppsOperations /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the backup configuration for the production slot. /// /// /// The headers that will be added to request. @@ -5858,15 +6339,18 @@ public partial interface IWebAppsOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> GetSiteConnectionStringKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the backup configuration of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Gets the backup configuration of an app. + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -5874,9 +6358,9 @@ public partial interface IWebAppsOperations /// /// Name of the app. /// + /// + /// /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the backup configuration for the production slot. /// /// /// The headers that will be added to request. @@ -5893,7 +6377,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetSiteConnectionStringKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Replaces the connection strings of an app. /// @@ -8761,51 +9245,6 @@ public partial interface IWebAppsOperations /// Task> GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update connections for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Deletes a Swift Virtual Network connection from an app (or /// deployment slot). /// @@ -8837,51 +9276,6 @@ public partial interface IWebAppsOperations /// Task DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update connections for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Gets all network features used by the app (or deployment slot, if /// specified). /// @@ -8896,7 +9290,7 @@ public partial interface IWebAppsOperations /// Name of the app. /// /// - /// The type of view. This can either be "summary" or "detailed". + /// The type of view. Only "summary" is supported at this time. /// /// /// Name of the deployment slot. If a slot is not specified, the API @@ -9522,6 +9916,39 @@ public partial interface IWebAppsOperations /// Task> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the list of private endpoint connections associated with a + /// site + /// + /// + /// Description for Gets the list of private endpoint connections + /// associated with a site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// Name of the site deployment slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets a private endpoint connection /// /// @@ -9534,6 +9961,10 @@ public partial interface IWebAppsOperations /// Name of the site. /// /// + /// Name of the private endpoint connection. + /// + /// + /// Name of the site deployment slot. /// /// /// The headers that will be added to request. @@ -9550,7 +9981,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Approves or rejects a private endpoint connection /// @@ -9567,6 +9998,8 @@ public partial interface IWebAppsOperations /// /// /// + /// + /// /// /// The headers that will be added to request. /// @@ -9582,7 +10015,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a private endpoint connection /// @@ -9597,6 +10030,8 @@ public partial interface IWebAppsOperations /// /// /// + /// + /// /// /// The headers that will be added to request. /// @@ -9612,7 +10047,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the private link resources /// @@ -9625,6 +10060,8 @@ public partial interface IWebAppsOperations /// /// Name of the site. /// + /// + /// /// /// The headers that will be added to request. /// @@ -9640,7 +10077,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetPrivateLinkResourcesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get list of processes for a web site, or a deployment slot, or for /// a specific scaled-out instance in a web site. @@ -10367,43 +10804,9 @@ public partial interface IWebAppsOperations /// /// Site extension name. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot - /// of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config - /// properties to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production - /// slot is used as the source slot. + /// + /// Name of the deployment slot. If a slot is not specified, the API + /// deletes a deployment for the production slot. /// /// /// The headers that will be added to request. @@ -10417,7 +10820,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task CopySlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get the difference in configuration settings between two web app /// slots. @@ -10635,6 +11038,8 @@ public partial interface IWebAppsOperations /// will delete the source control configuration for the production /// slot. /// + /// + /// /// /// The headers that will be added to request. /// @@ -10647,7 +11052,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Updates the source control configuration of an app. /// @@ -11695,6 +12100,8 @@ public partial interface IWebAppsOperations /// /// Name of the app. /// + /// + /// /// /// The headers that will be added to request. /// @@ -11707,7 +12114,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Updates the source control configuration of an app. /// @@ -12769,6 +13176,68 @@ public partial interface IWebAppsOperations /// Task>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Restores an app from a backup blob in Azure Storage. /// /// @@ -12887,36 +13356,6 @@ public partial interface IWebAppsOperations /// Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot - /// of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config - /// properties to override the source slot config. See example. - /// - /// - /// 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 BeginCopyProductionSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Creates a new web, mobile, or API app in an existing resource /// group, or updates an existing app. /// @@ -13189,6 +13628,8 @@ public partial interface IWebAppsOperations /// /// /// + /// + /// /// /// The headers that will be added to request. /// @@ -13204,7 +13645,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a private endpoint connection /// @@ -13219,6 +13660,8 @@ public partial interface IWebAppsOperations /// /// /// + /// + /// /// /// The headers that will be added to request. /// @@ -13234,7 +13677,7 @@ public partial interface IWebAppsOperations /// /// Thrown when a required parameter is null /// - Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Restores an app from a backup blob in Azure Storage. /// @@ -13370,40 +13813,6 @@ public partial interface IWebAppsOperations /// Task> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot - /// of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config - /// properties to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production - /// slot is used as the source slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task BeginCopySlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Swaps two deployment slots of an app. /// /// @@ -13709,6 +14118,58 @@ public partial interface IWebAppsOperations /// Task>> ListConfigurationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status + /// of an app + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status + /// of an app + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets a list of web app configuration snapshots identifiers. Each /// element of the list contains a timestamp and the ID of the /// snapshot. @@ -14024,6 +14485,33 @@ public partial interface IWebAppsOperations /// Task>> ListPerfMonCountersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the list of private endpoint connections associated with a + /// site + /// + /// + /// Description for Gets the list of private endpoint connections + /// associated with a site + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get list of processes for a web site, or a deployment slot, or for /// a specific scaled-out instance in a web site. /// @@ -14233,6 +14721,58 @@ public partial interface IWebAppsOperations /// Task>> ListConfigurationsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status + /// of an app + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> GetAppSettingsKeyVaultReferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status + /// of an app + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> GetSiteConnectionStringKeyVaultReferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets a list of web app configuration snapshots identifiers. Each /// element of the list contains a timestamp and the ID of the /// snapshot. @@ -14548,6 +15088,33 @@ public partial interface IWebAppsOperations /// Task>> ListPerfMonCountersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the list of private endpoint connections associated with a + /// site + /// + /// + /// Description for Gets the list of private endpoint connections + /// associated with a site + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> GetPrivateEndpointConnectionListSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get list of processes for a web site, or a deployment slot, or for /// a specific scaled-out instance in a web site. /// 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 3481e85ddd9b..43c2b46180c4 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs @@ -79,6 +79,11 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// IAppServiceCertificateOrdersOperations AppServiceCertificateOrders { get; } + /// + /// Gets the ICertificateOrdersDiagnosticsOperations. + /// + ICertificateOrdersDiagnosticsOperations CertificateOrdersDiagnostics { get; } + /// /// Gets the ICertificateRegistrationProviderOperations. /// @@ -99,6 +104,16 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// IDomainRegistrationProviderOperations DomainRegistrationProvider { get; } + /// + /// Gets the IAppServiceEnvironmentsOperations. + /// + IAppServiceEnvironmentsOperations AppServiceEnvironments { get; } + + /// + /// Gets the IAppServicePlansOperations. + /// + IAppServicePlansOperations AppServicePlans { get; } + /// /// Gets the ICertificatesOperations. /// @@ -114,6 +129,11 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// IDiagnosticsOperations Diagnostics { get; } + /// + /// Gets the IGlobalModelOperations. + /// + IGlobalModelOperations GlobalModel { get; } + /// /// Gets the IProviderOperations. /// @@ -125,9 +145,9 @@ public partial interface IWebSiteManagementClient : System.IDisposable IRecommendationsOperations Recommendations { get; } /// - /// Gets the IWebAppsOperations. + /// Gets the IResourceHealthMetadataOperations. /// - IWebAppsOperations WebApps { get; } + IResourceHealthMetadataOperations ResourceHealthMetadata { get; } /// /// Gets the IStaticSitesOperations. @@ -135,19 +155,35 @@ public partial interface IWebSiteManagementClient : System.IDisposable IStaticSitesOperations StaticSites { get; } /// - /// Gets the IAppServiceEnvironmentsOperations. + /// Gets the IWebAppsOperations. /// - IAppServiceEnvironmentsOperations AppServiceEnvironments { get; } + IWebAppsOperations WebApps { get; } /// - /// Gets the IAppServicePlansOperations. + /// Gets the IKubeEnvironmentsOperations. /// - IAppServicePlansOperations AppServicePlans { get; } + IKubeEnvironmentsOperations KubeEnvironments { get; } /// - /// Gets the IResourceHealthMetadataOperations. + /// Exchange code for GitHub access token for AppService CLI /// - IResourceHealthMetadataOperations ResourceHealthMetadata { get; } + /// + /// 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 @@ -302,7 +338,8 @@ public partial interface IWebSiteManagementClient : System.IDisposable /// /// Name of SKU used to filter the regions. Possible values include: /// 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - /// 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + /// 'Isolated', 'IsolatedV2', 'PremiumV2', 'PremiumV3', + /// 'PremiumContainer', 'ElasticPremium', 'ElasticIsolated' /// /// /// Specify <code>true</code> if you want to filter to only diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs new file mode 100644 index 000000000000..6f817f1b68ec --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs @@ -0,0 +1,1708 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// KubeEnvironmentsOperations operations. + /// + internal partial class KubeEnvironmentsOperations : IServiceOperations, IKubeEnvironmentsOperations + { + /// + /// Initializes a new instance of the KubeEnvironmentsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal KubeEnvironmentsOperations(WebSiteManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the WebSiteManagementClient + /// + public WebSiteManagementClient Client { get; private set; } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (kubeEnvironmentEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "kubeEnvironmentEnvelope"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("kubeEnvironmentEnvelope", kubeEnvironmentEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(kubeEnvironmentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(kubeEnvironmentEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (kubeEnvironmentEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "kubeEnvironmentEnvelope"); + } + if (kubeEnvironmentEnvelope != null) + { + kubeEnvironmentEnvelope.Validate(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("kubeEnvironmentEnvelope", kubeEnvironmentEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(kubeEnvironmentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(kubeEnvironmentEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs new file mode 100644 index 000000000000..fda574b00e42 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs @@ -0,0 +1,467 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for KubeEnvironmentsOperations. + /// + public static partial class KubeEnvironmentsOperationsExtensions + { + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListBySubscription(this IKubeEnvironmentsOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IKubeEnvironmentsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + public static IPage ListByResourceGroup(this IKubeEnvironmentsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + public static KubeEnvironment Get(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) + { + return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Get the properties of a Kubernetes Environment. + /// + /// + /// Description for Get the properties of a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + public static KubeEnvironment CreateOrUpdate(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope) + { + return operations.CreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + public static void Delete(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) + { + operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + public static KubeEnvironment Update(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope) + { + return operations.UpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + public static KubeEnvironment BeginCreateOrUpdate(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Kubernetes Environment. + /// + /// + /// Description for Creates or updates a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// Configuration details of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + public static void BeginDelete(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) + { + operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Delete a Kubernetes Environment. + /// + /// + /// Description for Delete a Kubernetes Environment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the Kubernetes Environment. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBySubscriptionNext(this IKubeEnvironmentsOperations operations, string nextPageLink) + { + return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all Kubernetes Environments for a subscription. + /// + /// + /// Description for Get all Kubernetes Environments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionNextAsync(this IKubeEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IKubeEnvironmentsOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the Kubernetes Environments in a resource group. + /// + /// + /// Description for Get all the Kubernetes Environments in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IKubeEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AccessControlEntryAction.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AccessControlEntryAction.cs deleted file mode 100644 index d9b41f1ca064..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AccessControlEntryAction.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AccessControlEntryAction. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AccessControlEntryAction - { - [EnumMember(Value = "Permit")] - Permit, - [EnumMember(Value = "Deny")] - Deny - } - internal static class AccessControlEntryActionEnumExtension - { - internal static string ToSerializedValue(this AccessControlEntryAction? value) - { - return value == null ? null : ((AccessControlEntryAction)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AccessControlEntryAction value) - { - switch( value ) - { - case AccessControlEntryAction.Permit: - return "Permit"; - case AccessControlEntryAction.Deny: - return "Deny"; - } - return null; - } - - internal static AccessControlEntryAction? ParseAccessControlEntryAction(this string value) - { - switch( value ) - { - case "Permit": - return AccessControlEntryAction.Permit; - case "Deny": - return AccessControlEntryAction.Deny; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs new file mode 100644 index 000000000000..bfd067ed6a02 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs @@ -0,0 +1,117 @@ +// +// 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; + + /// + /// Description of site key vault references. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiKVReference : ProxyOnlyResource + { + /// + /// Initializes a new instance of the ApiKVReference class. + /// + public ApiKVReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiKVReference class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Possible values include: 'Initialized', + /// 'Resolved', 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', + /// 'SecretNotFound', 'SecretVersionNotFound', + /// 'AccessToKeyVaultDenied', 'OtherReasons', 'FetchTimedOut', + /// 'UnauthorizedClient' + /// Possible values include: 'KeyVault' + public ApiKVReference(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string reference = default(string), ResolveStatus? status = default(ResolveStatus?), string vaultName = default(string), string secretName = default(string), string secretVersion = default(string), ManagedServiceIdentity identityType = default(ManagedServiceIdentity), string details = default(string), ConfigReferenceSource? source = default(ConfigReferenceSource?), string activeVersion = default(string)) + : base(id, name, kind, type) + { + Reference = reference; + Status = status; + VaultName = vaultName; + SecretName = secretName; + SecretVersion = secretVersion; + IdentityType = identityType; + Details = details; + Source = source; + ActiveVersion = activeVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.reference")] + public string Reference { get; set; } + + /// + /// Gets or sets possible values include: 'Initialized', 'Resolved', + /// 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', + /// 'SecretNotFound', 'SecretVersionNotFound', + /// 'AccessToKeyVaultDenied', 'OtherReasons', 'FetchTimedOut', + /// 'UnauthorizedClient' + /// + [JsonProperty(PropertyName = "properties.status")] + public ResolveStatus? Status { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.vaultName")] + public string VaultName { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.secretName")] + public string SecretName { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.secretVersion")] + public string SecretVersion { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.identityType")] + public ManagedServiceIdentity IdentityType { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.details")] + public string Details { get; set; } + + /// + /// Gets or sets possible values include: 'KeyVault' + /// + [JsonProperty(PropertyName = "properties.source")] + public ConfigReferenceSource? Source { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.activeVersion")] + public string ActiveVersion { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.cs new file mode 100644 index 000000000000..ba4ae64ca04e --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.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; + + /// + /// App Insights Web App stack settings. + /// + public partial class AppInsightsWebAppStackSettings + { + /// + /// Initializes a new instance of the AppInsightsWebAppStackSettings + /// class. + /// + public AppInsightsWebAppStackSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppInsightsWebAppStackSettings + /// class. + /// + /// <code>true</code> if remote + /// Application Insights is supported for the stack; otherwise, + /// <code>false</code>. + /// <code>true</code> if + /// Application Insights is disabled by default for the stack; + /// otherwise, <code>false</code>. + public AppInsightsWebAppStackSettings(bool? isSupported = default(bool?), bool? isDefaultOff = default(bool?)) + { + IsSupported = isSupported; + IsDefaultOff = isDefaultOff; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if remote + /// Application Insights is supported for the stack; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isSupported")] + public bool? IsSupported { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if Application + /// Insights is disabled by default for the stack; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDefaultOff")] + public bool? IsDefaultOff { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs new file mode 100644 index 000000000000..a1deb095dbf0 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs @@ -0,0 +1,52 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class AppLogsConfiguration + { + /// + /// Initializes a new instance of the AppLogsConfiguration class. + /// + public AppLogsConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppLogsConfiguration class. + /// + public AppLogsConfiguration(string destination = default(string), LogAnalyticsConfiguration logAnalyticsConfiguration = default(LogAnalyticsConfiguration)) + { + Destination = destination; + LogAnalyticsConfiguration = logAnalyticsConfiguration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "destination")] + public string Destination { get; set; } + + /// + /// + [JsonProperty(PropertyName = "logAnalyticsConfiguration")] + public LogAnalyticsConfiguration LogAnalyticsConfiguration { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs index a1e6ff47661a..ded5ddc3c77c 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the app registration for providers that + /// have app ids and app secrets + /// [Rest.Serialization.JsonTransformation] public partial class AppRegistration : ProxyOnlyResource { @@ -33,6 +37,9 @@ public AppRegistration() /// 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) { @@ -47,11 +54,13 @@ public AppRegistration() partial void CustomInit(); /// + /// Gets or sets the App ID of the app used for login. /// [JsonProperty(PropertyName = "properties.appId")] public string AppId { get; set; } /// + /// Gets or sets the app setting name that contains the app secret. /// [JsonProperty(PropertyName = "properties.appSecretSettingName")] public string AppSecretSettingName { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs index fba67b6ee17a..aee5531d6910 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs @@ -48,8 +48,8 @@ public AppServiceCertificateOrder() /// name. /// Domain verification /// token. - /// Duration in years (must be between 1 - /// and 3). + /// Duration in years (must be + /// 1). /// Certificate key size. /// <code>true</code> if the /// certificate should be automatically renewed when it expires; @@ -78,7 +78,8 @@ public AppServiceCertificateOrder() /// moment. /// Time stamp when the /// certificate would be auto renewed next - public AppServiceCertificateOrder(string location, CertificateProductType productType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), IDictionary certificates = default(IDictionary), string distinguishedName = default(string), string domainVerificationToken = default(string), int? validityInYears = default(int?), int? keySize = default(int?), bool? autoRenew = default(bool?), ProvisioningState? provisioningState = default(ProvisioningState?), CertificateOrderStatus? status = default(CertificateOrderStatus?), CertificateDetails signedCertificate = default(CertificateDetails), string csr = default(string), CertificateDetails intermediate = default(CertificateDetails), CertificateDetails root = default(CertificateDetails), string serialNumber = default(string), System.DateTime? lastCertificateIssuanceTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), bool? isPrivateKeyExternal = default(bool?), IList appServiceCertificateNotRenewableReasons = default(IList), System.DateTime? nextAutoRenewalTimeStamp = default(System.DateTime?)) + /// Contact info + public AppServiceCertificateOrder(string location, CertificateProductType productType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), IDictionary certificates = default(IDictionary), string distinguishedName = default(string), string domainVerificationToken = default(string), int? validityInYears = default(int?), int? keySize = default(int?), bool? autoRenew = default(bool?), ProvisioningState? provisioningState = default(ProvisioningState?), CertificateOrderStatus? status = default(CertificateOrderStatus?), CertificateDetails signedCertificate = default(CertificateDetails), string csr = default(string), CertificateDetails intermediate = default(CertificateDetails), CertificateDetails root = default(CertificateDetails), string serialNumber = default(string), System.DateTime? lastCertificateIssuanceTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), bool? isPrivateKeyExternal = default(bool?), IList appServiceCertificateNotRenewableReasons = default(IList), System.DateTime? nextAutoRenewalTimeStamp = default(System.DateTime?), CertificateOrderContact contact = default(CertificateOrderContact)) : base(location, id, name, kind, type, tags) { Certificates = certificates; @@ -100,6 +101,7 @@ public AppServiceCertificateOrder() IsPrivateKeyExternal = isPrivateKeyExternal; AppServiceCertificateNotRenewableReasons = appServiceCertificateNotRenewableReasons; NextAutoRenewalTimeStamp = nextAutoRenewalTimeStamp; + Contact = contact; CustomInit(); } @@ -127,7 +129,7 @@ public AppServiceCertificateOrder() public string DomainVerificationToken { get; private set; } /// - /// Gets or sets duration in years (must be between 1 and 3). + /// Gets or sets duration in years (must be 1). /// [JsonProperty(PropertyName = "properties.validityInYears")] public int? ValidityInYears { get; set; } @@ -232,6 +234,12 @@ public AppServiceCertificateOrder() [JsonProperty(PropertyName = "properties.nextAutoRenewalTimeStamp")] public System.DateTime? NextAutoRenewalTimeStamp { get; private set; } + /// + /// Gets contact info + /// + [JsonProperty(PropertyName = "properties.contact")] + public CertificateOrderContact Contact { get; private set; } + /// /// Validate the object. /// @@ -241,14 +249,6 @@ public AppServiceCertificateOrder() public override void Validate() { base.Validate(); - if (ValidityInYears > 3) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "ValidityInYears", 3); - } - if (ValidityInYears < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ValidityInYears", 1); - } } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs index a9284452f4d4..0badb4580486 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs @@ -48,8 +48,8 @@ public AppServiceCertificateOrderPatchResource() /// name. /// Domain verification /// token. - /// Duration in years (must be between 1 - /// and 3). + /// Duration in years (must be + /// 1). /// Certificate key size. /// <code>true</code> if the /// certificate should be automatically renewed when it expires; @@ -78,7 +78,8 @@ public AppServiceCertificateOrderPatchResource() /// moment. /// Time stamp when the /// certificate would be auto renewed next - public AppServiceCertificateOrderPatchResource(CertificateProductType productType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary certificates = default(IDictionary), string distinguishedName = default(string), string domainVerificationToken = default(string), int? validityInYears = default(int?), int? keySize = default(int?), bool? autoRenew = default(bool?), ProvisioningState? provisioningState = default(ProvisioningState?), CertificateOrderStatus? status = default(CertificateOrderStatus?), CertificateDetails signedCertificate = default(CertificateDetails), string csr = default(string), CertificateDetails intermediate = default(CertificateDetails), CertificateDetails root = default(CertificateDetails), string serialNumber = default(string), System.DateTime? lastCertificateIssuanceTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), bool? isPrivateKeyExternal = default(bool?), IList appServiceCertificateNotRenewableReasons = default(IList), System.DateTime? nextAutoRenewalTimeStamp = default(System.DateTime?)) + /// Contact info + public AppServiceCertificateOrderPatchResource(CertificateProductType productType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary certificates = default(IDictionary), string distinguishedName = default(string), string domainVerificationToken = default(string), int? validityInYears = default(int?), int? keySize = default(int?), bool? autoRenew = default(bool?), ProvisioningState? provisioningState = default(ProvisioningState?), CertificateOrderStatus? status = default(CertificateOrderStatus?), CertificateDetails signedCertificate = default(CertificateDetails), string csr = default(string), CertificateDetails intermediate = default(CertificateDetails), CertificateDetails root = default(CertificateDetails), string serialNumber = default(string), System.DateTime? lastCertificateIssuanceTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), bool? isPrivateKeyExternal = default(bool?), IList appServiceCertificateNotRenewableReasons = default(IList), System.DateTime? nextAutoRenewalTimeStamp = default(System.DateTime?), CertificateOrderContact contact = default(CertificateOrderContact)) : base(id, name, kind, type) { Certificates = certificates; @@ -100,6 +101,7 @@ public AppServiceCertificateOrderPatchResource() IsPrivateKeyExternal = isPrivateKeyExternal; AppServiceCertificateNotRenewableReasons = appServiceCertificateNotRenewableReasons; NextAutoRenewalTimeStamp = nextAutoRenewalTimeStamp; + Contact = contact; CustomInit(); } @@ -127,7 +129,7 @@ public AppServiceCertificateOrderPatchResource() public string DomainVerificationToken { get; private set; } /// - /// Gets or sets duration in years (must be between 1 and 3). + /// Gets or sets duration in years (must be 1). /// [JsonProperty(PropertyName = "properties.validityInYears")] public int? ValidityInYears { get; set; } @@ -232,6 +234,12 @@ public AppServiceCertificateOrderPatchResource() [JsonProperty(PropertyName = "properties.nextAutoRenewalTimeStamp")] public System.DateTime? NextAutoRenewalTimeStamp { get; private set; } + /// + /// Gets contact info + /// + [JsonProperty(PropertyName = "properties.contact")] + public CertificateOrderContact Contact { get; private set; } + /// /// Validate the object. /// @@ -240,14 +248,6 @@ public AppServiceCertificateOrderPatchResource() /// public virtual void Validate() { - if (ValidityInYears > 3) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "ValidityInYears", 3); - } - if (ValidityInYears < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ValidityInYears", 1); - } } } } 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 d7562b769f24..312d9255fffd 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 @@ -32,132 +32,58 @@ public AppServiceEnvironment() /// /// Initializes a new instance of the AppServiceEnvironment class. /// - /// Name of the App Service Environment. - /// Location of the App Service Environment, - /// e.g. "West US". /// Description of the Virtual /// Network. - /// Description of worker pools with worker - /// size IDs, VM sizes, and number of workers in each pool. /// Provisioning state of the App /// Service Environment. Possible values include: 'Succeeded', /// 'Failed', 'Canceled', 'InProgress', 'Deleting' /// Current status of the App Service Environment. /// Possible values include: 'Preparing', 'Ready', 'Scaling', /// 'Deleting' - /// Name of the Virtual Network for the App - /// Service Environment. - /// Resource group of the Virtual - /// Network. - /// Subnet of the Virtual Network. /// Specifies which endpoints /// to serve internally in the Virtual Network for the App Service /// Environment. Possible values include: 'None', 'Web', 'Publishing', - /// 'Web,Publishing' + /// 'Web, Publishing' /// Front-end VM size, e.g. "Medium", /// "Large". /// Number of front-end instances. /// Number of IP SSL addresses reserved /// for the App Service Environment. - /// Edition of the metadata database for - /// the App Service Environment, e.g. "Standard". - /// Service objective of the - /// metadata database for the App Service Environment, e.g. - /// "S0". - /// Number of upgrade domains of the App - /// Service Environment. - /// Subscription of the App Service - /// Environment. /// DNS suffix of the App Service /// Environment. - /// Last deployment action on the App Service - /// Environment. - /// Result of the last deployment action - /// on the App Service Environment. - /// List of comma separated strings - /// describing which VM sizes are allowed for front-ends. - /// List of comma separated strings - /// describing which VM sizes are allowed for workers. /// Maximum number of VMs in the /// App Service Environment. - /// Description of IP SSL mapping for the App - /// Service Environment. - /// Current total, used, and - /// available worker capacities. - /// Access control list for - /// controlling traffic to the App Service Environment. - /// True/false indicating whether - /// the App Service Environment is healthy. - /// Detailed message about with results - /// of the last check of the App Service Environment. - /// Resource group of the App Service - /// Environment. /// Scale factor for /// front-ends. - /// Default Scale Factor for - /// FrontEnds. - /// API Management Account - /// associated with the App Service Environment. /// <code>true</code> if the App /// Service Environment is suspended; otherwise, /// <code>false</code>. The environment can be suspended, /// e.g. when the management endpoint is no longer available /// (most likely because NSG blocked the incoming traffic). - /// True/false indicating whether the - /// App Service Environment is suspended. The environment can be - /// suspended e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). /// Custom settings for changing the /// behavior of the App Service Environment. /// User added ip ranges to /// whitelist on ASE db /// Flag that displays whether an ASE has /// linux workers or not - /// Key Vault ID for ILB App Service - /// Environment default SSL certificate - /// Key Vault Secret Name for - /// ILB App Service Environment default SSL certificate - public AppServiceEnvironment(string name, string location, VirtualNetworkProfile virtualNetwork, IList workerPools, ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string vnetName = default(string), string vnetResourceGroupName = default(string), string vnetSubnetName = default(string), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string databaseEdition = default(string), string databaseServiceObjective = default(string), int? upgradeDomains = default(int?), string subscriptionId = default(string), string dnsSuffix = default(string), string lastAction = default(string), string lastActionResult = default(string), string allowedMultiSizes = default(string), string allowedWorkerSizes = default(string), int? maximumNumberOfMachines = default(int?), IList vipMappings = default(IList), IList environmentCapacities = default(IList), IList networkAccessControlList = default(IList), bool? environmentIsHealthy = default(bool?), string environmentStatus = default(string), string resourceGroup = default(string), int? frontEndScaleFactor = default(int?), int? defaultFrontEndScaleFactor = default(int?), string apiManagementAccountId = default(string), bool? suspended = default(bool?), bool? dynamicCacheEnabled = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), string sslCertKeyVaultId = default(string), string sslCertKeyVaultSecretName = default(string)) + /// 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?)) { - Name = name; - Location = location; ProvisioningState = provisioningState; Status = status; - VnetName = vnetName; - VnetResourceGroupName = vnetResourceGroupName; - VnetSubnetName = vnetSubnetName; VirtualNetwork = virtualNetwork; InternalLoadBalancingMode = internalLoadBalancingMode; MultiSize = multiSize; MultiRoleCount = multiRoleCount; - WorkerPools = workerPools; IpsslAddressCount = ipsslAddressCount; - DatabaseEdition = databaseEdition; - DatabaseServiceObjective = databaseServiceObjective; - UpgradeDomains = upgradeDomains; - SubscriptionId = subscriptionId; DnsSuffix = dnsSuffix; - LastAction = lastAction; - LastActionResult = lastActionResult; - AllowedMultiSizes = allowedMultiSizes; - AllowedWorkerSizes = allowedWorkerSizes; MaximumNumberOfMachines = maximumNumberOfMachines; - VipMappings = vipMappings; - EnvironmentCapacities = environmentCapacities; - NetworkAccessControlList = networkAccessControlList; - EnvironmentIsHealthy = environmentIsHealthy; - EnvironmentStatus = environmentStatus; - ResourceGroup = resourceGroup; FrontEndScaleFactor = frontEndScaleFactor; - DefaultFrontEndScaleFactor = defaultFrontEndScaleFactor; - ApiManagementAccountId = apiManagementAccountId; Suspended = suspended; - DynamicCacheEnabled = dynamicCacheEnabled; ClusterSettings = clusterSettings; UserWhitelistedIpRanges = userWhitelistedIpRanges; HasLinuxWorkers = hasLinuxWorkers; - SslCertKeyVaultId = sslCertKeyVaultId; - SslCertKeyVaultSecretName = sslCertKeyVaultSecretName; + DedicatedHostCount = dedicatedHostCount; CustomInit(); } @@ -166,19 +92,6 @@ public AppServiceEnvironment() /// partial void CustomInit(); - /// - /// Gets or sets name of the App Service Environment. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets location of the App Service Environment, e.g. "West - /// US". - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - /// /// Gets provisioning state of the App Service Environment. Possible /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', @@ -194,25 +107,6 @@ public AppServiceEnvironment() [JsonProperty(PropertyName = "status")] public HostingEnvironmentStatus? Status { get; private set; } - /// - /// Gets or sets name of the Virtual Network for the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets resource group of the Virtual Network. - /// - [JsonProperty(PropertyName = "vnetResourceGroupName")] - public string VnetResourceGroupName { get; set; } - - /// - /// Gets or sets subnet of the Virtual Network. - /// - [JsonProperty(PropertyName = "vnetSubnetName")] - public string VnetSubnetName { get; set; } - /// /// Gets or sets description of the Virtual Network. /// @@ -222,7 +116,7 @@ public AppServiceEnvironment() /// /// Gets or sets specifies which endpoints to serve internally in the /// Virtual Network for the App Service Environment. Possible values - /// include: 'None', 'Web', 'Publishing', 'Web,Publishing' + /// include: 'None', 'Web', 'Publishing', 'Web, Publishing' /// [JsonProperty(PropertyName = "internalLoadBalancingMode")] public string InternalLoadBalancingMode { get; set; } @@ -234,17 +128,10 @@ public AppServiceEnvironment() public string MultiSize { get; set; } /// - /// Gets or sets number of front-end instances. + /// Gets number of front-end instances. /// [JsonProperty(PropertyName = "multiRoleCount")] - public int? MultiRoleCount { get; set; } - - /// - /// Gets or sets description of worker pools with worker size IDs, VM - /// sizes, and number of workers in each pool. - /// - [JsonProperty(PropertyName = "workerPools")] - public IList WorkerPools { get; set; } + public int? MultiRoleCount { get; private set; } /// /// Gets or sets number of IP SSL addresses reserved for the App @@ -253,110 +140,18 @@ public AppServiceEnvironment() [JsonProperty(PropertyName = "ipsslAddressCount")] public int? IpsslAddressCount { get; set; } - /// - /// Gets edition of the metadata database for the App Service - /// Environment, e.g. "Standard". - /// - [JsonProperty(PropertyName = "databaseEdition")] - public string DatabaseEdition { get; private set; } - - /// - /// Gets service objective of the metadata database for the App Service - /// Environment, e.g. "S0". - /// - [JsonProperty(PropertyName = "databaseServiceObjective")] - public string DatabaseServiceObjective { get; private set; } - - /// - /// Gets number of upgrade domains of the App Service Environment. - /// - [JsonProperty(PropertyName = "upgradeDomains")] - public int? UpgradeDomains { get; private set; } - - /// - /// Gets subscription of the App Service Environment. - /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } - /// /// Gets or sets DNS suffix of the App Service Environment. /// [JsonProperty(PropertyName = "dnsSuffix")] public string DnsSuffix { get; set; } - /// - /// Gets last deployment action on the App Service Environment. - /// - [JsonProperty(PropertyName = "lastAction")] - public string LastAction { get; private set; } - - /// - /// Gets result of the last deployment action on the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "lastActionResult")] - public string LastActionResult { get; private set; } - - /// - /// Gets list of comma separated strings describing which VM sizes are - /// allowed for front-ends. - /// - [JsonProperty(PropertyName = "allowedMultiSizes")] - public string AllowedMultiSizes { get; private set; } - - /// - /// Gets list of comma separated strings describing which VM sizes are - /// allowed for workers. - /// - [JsonProperty(PropertyName = "allowedWorkerSizes")] - public string AllowedWorkerSizes { get; private set; } - /// /// Gets maximum number of VMs in the App Service Environment. /// [JsonProperty(PropertyName = "maximumNumberOfMachines")] public int? MaximumNumberOfMachines { get; private set; } - /// - /// Gets description of IP SSL mapping for the App Service Environment. - /// - [JsonProperty(PropertyName = "vipMappings")] - public IList VipMappings { get; private set; } - - /// - /// Gets current total, used, and available worker capacities. - /// - [JsonProperty(PropertyName = "environmentCapacities")] - public IList EnvironmentCapacities { get; private set; } - - /// - /// Gets or sets access control list for controlling traffic to the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "networkAccessControlList")] - public IList NetworkAccessControlList { get; set; } - - /// - /// Gets true/false indicating whether the App Service Environment is - /// healthy. - /// - [JsonProperty(PropertyName = "environmentIsHealthy")] - public bool? EnvironmentIsHealthy { get; private set; } - - /// - /// Gets detailed message about with results of the last check of the - /// App Service Environment. - /// - [JsonProperty(PropertyName = "environmentStatus")] - public string EnvironmentStatus { get; private set; } - - /// - /// Gets resource group of the App Service Environment. - /// - [JsonProperty(PropertyName = "resourceGroup")] - public string ResourceGroup { get; private set; } - /// /// Gets or sets scale factor for front-ends. /// @@ -364,37 +159,15 @@ public AppServiceEnvironment() public int? FrontEndScaleFactor { get; set; } /// - /// Gets default Scale Factor for FrontEnds. - /// - [JsonProperty(PropertyName = "defaultFrontEndScaleFactor")] - public int? DefaultFrontEndScaleFactor { get; private set; } - - /// - /// Gets or sets API Management Account associated with the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "apiManagementAccountId")] - public string ApiManagementAccountId { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// App Service Environment is suspended; otherwise, + /// Gets &lt;code&gt;true&lt;/code&gt; if the App + /// Service Environment is suspended; otherwise, /// &lt;code&gt;false&lt;/code&gt;. The environment can /// be suspended, e.g. when the management endpoint is no longer /// available /// (most likely because NSG blocked the incoming traffic). /// [JsonProperty(PropertyName = "suspended")] - public bool? Suspended { get; set; } - - /// - /// Gets or sets true/false indicating whether the App Service - /// Environment is suspended. The environment can be suspended e.g. - /// when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// - [JsonProperty(PropertyName = "dynamicCacheEnabled")] - public bool? DynamicCacheEnabled { get; set; } + public bool? Suspended { get; private set; } /// /// Gets or sets custom settings for changing the behavior of the App @@ -410,25 +183,16 @@ public AppServiceEnvironment() public IList UserWhitelistedIpRanges { get; set; } /// - /// Gets or sets flag that displays whether an ASE has linux workers or - /// not + /// Gets flag that displays whether an ASE has linux workers or not /// [JsonProperty(PropertyName = "hasLinuxWorkers")] - public bool? HasLinuxWorkers { get; set; } - - /// - /// Gets or sets key Vault ID for ILB App Service Environment default - /// SSL certificate - /// - [JsonProperty(PropertyName = "sslCertKeyVaultId")] - public string SslCertKeyVaultId { get; set; } + public bool? HasLinuxWorkers { get; private set; } /// - /// Gets or sets key Vault Secret Name for ILB App Service Environment - /// default SSL certificate + /// Gets dedicated Host Count /// - [JsonProperty(PropertyName = "sslCertKeyVaultSecretName")] - public string SslCertKeyVaultSecretName { get; set; } + [JsonProperty(PropertyName = "dedicatedHostCount")] + public int? DedicatedHostCount { get; private set; } /// /// Validate the object. @@ -438,21 +202,13 @@ public AppServiceEnvironment() /// public virtual void Validate() { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } if (VirtualNetwork == null) { throw new ValidationException(ValidationRules.CannotBeNull, "VirtualNetwork"); } - if (WorkerPools == null) + if (VirtualNetwork != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "WorkerPools"); + VirtualNetwork.Validate(); } } } 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 bf9e55680b03..724562c731b2 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 @@ -36,14 +36,8 @@ public AppServiceEnvironmentPatchResource() /// Initializes a new instance of the /// AppServiceEnvironmentPatchResource class. /// - /// Name of the - /// App Service Environment. - /// Location of the App Service Environment, - /// e.g. "West US". /// Description of the Virtual /// Network. - /// Description of worker pools with worker - /// size IDs, VM sizes, and number of workers in each pool. /// Resource Id. /// Resource Name. /// Kind of resource. @@ -54,120 +48,51 @@ public AppServiceEnvironmentPatchResource() /// Current status of the App Service Environment. /// Possible values include: 'Preparing', 'Ready', 'Scaling', /// 'Deleting' - /// Name of the Virtual Network for the App - /// Service Environment. - /// Resource group of the Virtual - /// Network. - /// Subnet of the Virtual Network. /// Specifies which endpoints /// to serve internally in the Virtual Network for the App Service /// Environment. Possible values include: 'None', 'Web', 'Publishing', - /// 'Web,Publishing' + /// 'Web, Publishing' /// Front-end VM size, e.g. "Medium", /// "Large". /// Number of front-end instances. /// Number of IP SSL addresses reserved /// for the App Service Environment. - /// Edition of the metadata database for - /// the App Service Environment, e.g. "Standard". - /// Service objective of the - /// metadata database for the App Service Environment, e.g. - /// "S0". - /// Number of upgrade domains of the App - /// Service Environment. - /// Subscription of the App Service - /// Environment. /// DNS suffix of the App Service /// Environment. - /// Last deployment action on the App Service - /// Environment. - /// Result of the last deployment action - /// on the App Service Environment. - /// List of comma separated strings - /// describing which VM sizes are allowed for front-ends. - /// List of comma separated strings - /// describing which VM sizes are allowed for workers. /// Maximum number of VMs in the /// App Service Environment. - /// Description of IP SSL mapping for the App - /// Service Environment. - /// Current total, used, and - /// available worker capacities. - /// Access control list for - /// controlling traffic to the App Service Environment. - /// True/false indicating whether - /// the App Service Environment is healthy. - /// Detailed message about with results - /// of the last check of the App Service Environment. - /// Resource group of the App Service - /// Environment. /// Scale factor for /// front-ends. - /// Default Scale Factor for - /// FrontEnds. - /// API Management Account - /// associated with the App Service Environment. /// <code>true</code> if the App /// Service Environment is suspended; otherwise, /// <code>false</code>. The environment can be suspended, /// e.g. when the management endpoint is no longer available /// (most likely because NSG blocked the incoming traffic). - /// True/false indicating whether the - /// App Service Environment is suspended. The environment can be - /// suspended e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). /// Custom settings for changing the /// behavior of the App Service Environment. /// User added ip ranges to /// whitelist on ASE db /// Flag that displays whether an ASE has /// linux workers or not - /// Key Vault ID for ILB App Service - /// Environment default SSL certificate - /// Key Vault Secret Name for - /// ILB App Service Environment default SSL certificate - public AppServiceEnvironmentPatchResource(string appServiceEnvironmentPatchResourceName, string location, VirtualNetworkProfile virtualNetwork, IList workerPools, 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 vnetName = default(string), string vnetResourceGroupName = default(string), string vnetSubnetName = default(string), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string databaseEdition = default(string), string databaseServiceObjective = default(string), int? upgradeDomains = default(int?), string subscriptionId = default(string), string dnsSuffix = default(string), string lastAction = default(string), string lastActionResult = default(string), string allowedMultiSizes = default(string), string allowedWorkerSizes = default(string), int? maximumNumberOfMachines = default(int?), IList vipMappings = default(IList), IList environmentCapacities = default(IList), IList networkAccessControlList = default(IList), bool? environmentIsHealthy = default(bool?), string environmentStatus = default(string), string resourceGroup = default(string), int? frontEndScaleFactor = default(int?), int? defaultFrontEndScaleFactor = default(int?), string apiManagementAccountId = default(string), bool? suspended = default(bool?), bool? dynamicCacheEnabled = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), string sslCertKeyVaultId = default(string), string sslCertKeyVaultSecretName = default(string)) + /// 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?)) : base(id, name, kind, type) { - AppServiceEnvironmentPatchResourceName = appServiceEnvironmentPatchResourceName; - Location = location; ProvisioningState = provisioningState; Status = status; - VnetName = vnetName; - VnetResourceGroupName = vnetResourceGroupName; - VnetSubnetName = vnetSubnetName; VirtualNetwork = virtualNetwork; InternalLoadBalancingMode = internalLoadBalancingMode; MultiSize = multiSize; MultiRoleCount = multiRoleCount; - WorkerPools = workerPools; IpsslAddressCount = ipsslAddressCount; - DatabaseEdition = databaseEdition; - DatabaseServiceObjective = databaseServiceObjective; - UpgradeDomains = upgradeDomains; - SubscriptionId = subscriptionId; DnsSuffix = dnsSuffix; - LastAction = lastAction; - LastActionResult = lastActionResult; - AllowedMultiSizes = allowedMultiSizes; - AllowedWorkerSizes = allowedWorkerSizes; MaximumNumberOfMachines = maximumNumberOfMachines; - VipMappings = vipMappings; - EnvironmentCapacities = environmentCapacities; - NetworkAccessControlList = networkAccessControlList; - EnvironmentIsHealthy = environmentIsHealthy; - EnvironmentStatus = environmentStatus; - ResourceGroup = resourceGroup; FrontEndScaleFactor = frontEndScaleFactor; - DefaultFrontEndScaleFactor = defaultFrontEndScaleFactor; - ApiManagementAccountId = apiManagementAccountId; Suspended = suspended; - DynamicCacheEnabled = dynamicCacheEnabled; ClusterSettings = clusterSettings; UserWhitelistedIpRanges = userWhitelistedIpRanges; HasLinuxWorkers = hasLinuxWorkers; - SslCertKeyVaultId = sslCertKeyVaultId; - SslCertKeyVaultSecretName = sslCertKeyVaultSecretName; + DedicatedHostCount = dedicatedHostCount; CustomInit(); } @@ -176,19 +101,6 @@ public AppServiceEnvironmentPatchResource() /// partial void CustomInit(); - /// - /// Gets or sets name of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.name")] - public string AppServiceEnvironmentPatchResourceName { get; set; } - - /// - /// Gets or sets location of the App Service Environment, e.g. "West - /// US". - /// - [JsonProperty(PropertyName = "properties.location")] - public string Location { get; set; } - /// /// Gets provisioning state of the App Service Environment. Possible /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', @@ -204,25 +116,6 @@ public AppServiceEnvironmentPatchResource() [JsonProperty(PropertyName = "properties.status")] public HostingEnvironmentStatus? Status { get; private set; } - /// - /// Gets or sets name of the Virtual Network for the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "properties.vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets resource group of the Virtual Network. - /// - [JsonProperty(PropertyName = "properties.vnetResourceGroupName")] - public string VnetResourceGroupName { get; set; } - - /// - /// Gets or sets subnet of the Virtual Network. - /// - [JsonProperty(PropertyName = "properties.vnetSubnetName")] - public string VnetSubnetName { get; set; } - /// /// Gets or sets description of the Virtual Network. /// @@ -232,7 +125,7 @@ public AppServiceEnvironmentPatchResource() /// /// Gets or sets specifies which endpoints to serve internally in the /// Virtual Network for the App Service Environment. Possible values - /// include: 'None', 'Web', 'Publishing', 'Web,Publishing' + /// include: 'None', 'Web', 'Publishing', 'Web, Publishing' /// [JsonProperty(PropertyName = "properties.internalLoadBalancingMode")] public string InternalLoadBalancingMode { get; set; } @@ -244,17 +137,10 @@ public AppServiceEnvironmentPatchResource() public string MultiSize { get; set; } /// - /// Gets or sets number of front-end instances. + /// Gets number of front-end instances. /// [JsonProperty(PropertyName = "properties.multiRoleCount")] - public int? MultiRoleCount { get; set; } - - /// - /// Gets or sets description of worker pools with worker size IDs, VM - /// sizes, and number of workers in each pool. - /// - [JsonProperty(PropertyName = "properties.workerPools")] - public IList WorkerPools { get; set; } + public int? MultiRoleCount { get; private set; } /// /// Gets or sets number of IP SSL addresses reserved for the App @@ -263,110 +149,18 @@ public AppServiceEnvironmentPatchResource() [JsonProperty(PropertyName = "properties.ipsslAddressCount")] public int? IpsslAddressCount { get; set; } - /// - /// Gets edition of the metadata database for the App Service - /// Environment, e.g. "Standard". - /// - [JsonProperty(PropertyName = "properties.databaseEdition")] - public string DatabaseEdition { get; private set; } - - /// - /// Gets service objective of the metadata database for the App Service - /// Environment, e.g. "S0". - /// - [JsonProperty(PropertyName = "properties.databaseServiceObjective")] - public string DatabaseServiceObjective { get; private set; } - - /// - /// Gets number of upgrade domains of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.upgradeDomains")] - public int? UpgradeDomains { get; private set; } - - /// - /// Gets subscription of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.subscriptionId")] - public string SubscriptionId { get; private set; } - /// /// Gets or sets DNS suffix of the App Service Environment. /// [JsonProperty(PropertyName = "properties.dnsSuffix")] public string DnsSuffix { get; set; } - /// - /// Gets last deployment action on the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.lastAction")] - public string LastAction { get; private set; } - - /// - /// Gets result of the last deployment action on the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "properties.lastActionResult")] - public string LastActionResult { get; private set; } - - /// - /// Gets list of comma separated strings describing which VM sizes are - /// allowed for front-ends. - /// - [JsonProperty(PropertyName = "properties.allowedMultiSizes")] - public string AllowedMultiSizes { get; private set; } - - /// - /// Gets list of comma separated strings describing which VM sizes are - /// allowed for workers. - /// - [JsonProperty(PropertyName = "properties.allowedWorkerSizes")] - public string AllowedWorkerSizes { get; private set; } - /// /// Gets maximum number of VMs in the App Service Environment. /// [JsonProperty(PropertyName = "properties.maximumNumberOfMachines")] public int? MaximumNumberOfMachines { get; private set; } - /// - /// Gets description of IP SSL mapping for the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.vipMappings")] - public IList VipMappings { get; private set; } - - /// - /// Gets current total, used, and available worker capacities. - /// - [JsonProperty(PropertyName = "properties.environmentCapacities")] - public IList EnvironmentCapacities { get; private set; } - - /// - /// Gets or sets access control list for controlling traffic to the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "properties.networkAccessControlList")] - public IList NetworkAccessControlList { get; set; } - - /// - /// Gets true/false indicating whether the App Service Environment is - /// healthy. - /// - [JsonProperty(PropertyName = "properties.environmentIsHealthy")] - public bool? EnvironmentIsHealthy { get; private set; } - - /// - /// Gets detailed message about with results of the last check of the - /// App Service Environment. - /// - [JsonProperty(PropertyName = "properties.environmentStatus")] - public string EnvironmentStatus { get; private set; } - - /// - /// Gets resource group of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - /// /// Gets or sets scale factor for front-ends. /// @@ -374,37 +168,15 @@ public AppServiceEnvironmentPatchResource() public int? FrontEndScaleFactor { get; set; } /// - /// Gets default Scale Factor for FrontEnds. - /// - [JsonProperty(PropertyName = "properties.defaultFrontEndScaleFactor")] - public int? DefaultFrontEndScaleFactor { get; private set; } - - /// - /// Gets or sets API Management Account associated with the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "properties.apiManagementAccountId")] - public string ApiManagementAccountId { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// App Service Environment is suspended; otherwise, + /// Gets &lt;code&gt;true&lt;/code&gt; if the App + /// Service Environment is suspended; otherwise, /// &lt;code&gt;false&lt;/code&gt;. The environment can /// be suspended, e.g. when the management endpoint is no longer /// available /// (most likely because NSG blocked the incoming traffic). /// [JsonProperty(PropertyName = "properties.suspended")] - public bool? Suspended { get; set; } - - /// - /// Gets or sets true/false indicating whether the App Service - /// Environment is suspended. The environment can be suspended e.g. - /// when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// - [JsonProperty(PropertyName = "properties.dynamicCacheEnabled")] - public bool? DynamicCacheEnabled { get; set; } + public bool? Suspended { get; private set; } /// /// Gets or sets custom settings for changing the behavior of the App @@ -420,25 +192,16 @@ public AppServiceEnvironmentPatchResource() public IList UserWhitelistedIpRanges { get; set; } /// - /// Gets or sets flag that displays whether an ASE has linux workers or - /// not + /// Gets flag that displays whether an ASE has linux workers or not /// [JsonProperty(PropertyName = "properties.hasLinuxWorkers")] - public bool? HasLinuxWorkers { get; set; } - - /// - /// Gets or sets key Vault ID for ILB App Service Environment default - /// SSL certificate - /// - [JsonProperty(PropertyName = "properties.sslCertKeyVaultId")] - public string SslCertKeyVaultId { get; set; } + public bool? HasLinuxWorkers { get; private set; } /// - /// Gets or sets key Vault Secret Name for ILB App Service Environment - /// default SSL certificate + /// Gets dedicated Host Count /// - [JsonProperty(PropertyName = "properties.sslCertKeyVaultSecretName")] - public string SslCertKeyVaultSecretName { get; set; } + [JsonProperty(PropertyName = "properties.dedicatedHostCount")] + public int? DedicatedHostCount { get; private set; } /// /// Validate the object. @@ -448,21 +211,13 @@ public AppServiceEnvironmentPatchResource() /// public virtual void Validate() { - if (AppServiceEnvironmentPatchResourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AppServiceEnvironmentPatchResourceName"); - } - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } if (VirtualNetwork == null) { throw new ValidationException(ValidationRules.CannotBeNull, "VirtualNetwork"); } - if (WorkerPools == null) + if (VirtualNetwork != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "WorkerPools"); + VirtualNetwork.Validate(); } } } 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 910c484a40d3..25cb6fbebdb6 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 @@ -37,14 +37,8 @@ public AppServiceEnvironmentResource() /// class. /// /// Resource Location. - /// Name of the App - /// Service Environment. - /// Location of the - /// App Service Environment, e.g. "West US". /// Description of the Virtual /// Network. - /// Description of worker pools with worker - /// size IDs, VM sizes, and number of workers in each pool. /// Resource Id. /// Resource Name. /// Kind of resource. @@ -56,120 +50,51 @@ public AppServiceEnvironmentResource() /// Current status of the App Service Environment. /// Possible values include: 'Preparing', 'Ready', 'Scaling', /// 'Deleting' - /// Name of the Virtual Network for the App - /// Service Environment. - /// Resource group of the Virtual - /// Network. - /// Subnet of the Virtual Network. /// Specifies which endpoints /// to serve internally in the Virtual Network for the App Service /// Environment. Possible values include: 'None', 'Web', 'Publishing', - /// 'Web,Publishing' + /// 'Web, Publishing' /// Front-end VM size, e.g. "Medium", /// "Large". /// Number of front-end instances. /// Number of IP SSL addresses reserved /// for the App Service Environment. - /// Edition of the metadata database for - /// the App Service Environment, e.g. "Standard". - /// Service objective of the - /// metadata database for the App Service Environment, e.g. - /// "S0". - /// Number of upgrade domains of the App - /// Service Environment. - /// Subscription of the App Service - /// Environment. /// DNS suffix of the App Service /// Environment. - /// Last deployment action on the App Service - /// Environment. - /// Result of the last deployment action - /// on the App Service Environment. - /// List of comma separated strings - /// describing which VM sizes are allowed for front-ends. - /// List of comma separated strings - /// describing which VM sizes are allowed for workers. /// Maximum number of VMs in the /// App Service Environment. - /// Description of IP SSL mapping for the App - /// Service Environment. - /// Current total, used, and - /// available worker capacities. - /// Access control list for - /// controlling traffic to the App Service Environment. - /// True/false indicating whether - /// the App Service Environment is healthy. - /// Detailed message about with results - /// of the last check of the App Service Environment. - /// Resource group of the App Service - /// Environment. /// Scale factor for /// front-ends. - /// Default Scale Factor for - /// FrontEnds. - /// API Management Account - /// associated with the App Service Environment. /// <code>true</code> if the App /// Service Environment is suspended; otherwise, /// <code>false</code>. The environment can be suspended, /// e.g. when the management endpoint is no longer available /// (most likely because NSG blocked the incoming traffic). - /// True/false indicating whether the - /// App Service Environment is suspended. The environment can be - /// suspended e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). /// Custom settings for changing the /// behavior of the App Service Environment. /// User added ip ranges to /// whitelist on ASE db /// Flag that displays whether an ASE has /// linux workers or not - /// Key Vault ID for ILB App Service - /// Environment default SSL certificate - /// Key Vault Secret Name for - /// ILB App Service Environment default SSL certificate - public AppServiceEnvironmentResource(string location, string appServiceEnvironmentResourceName, string appServiceEnvironmentResourceLocation, VirtualNetworkProfile virtualNetwork, IList workerPools, 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 vnetName = default(string), string vnetResourceGroupName = default(string), string vnetSubnetName = default(string), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string databaseEdition = default(string), string databaseServiceObjective = default(string), int? upgradeDomains = default(int?), string subscriptionId = default(string), string dnsSuffix = default(string), string lastAction = default(string), string lastActionResult = default(string), string allowedMultiSizes = default(string), string allowedWorkerSizes = default(string), int? maximumNumberOfMachines = default(int?), IList vipMappings = default(IList), IList environmentCapacities = default(IList), IList networkAccessControlList = default(IList), bool? environmentIsHealthy = default(bool?), string environmentStatus = default(string), string resourceGroup = default(string), int? frontEndScaleFactor = default(int?), int? defaultFrontEndScaleFactor = default(int?), string apiManagementAccountId = default(string), bool? suspended = default(bool?), bool? dynamicCacheEnabled = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), string sslCertKeyVaultId = default(string), string sslCertKeyVaultSecretName = default(string)) + /// 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?)) : base(location, id, name, kind, type, tags) { - AppServiceEnvironmentResourceName = appServiceEnvironmentResourceName; - AppServiceEnvironmentResourceLocation = appServiceEnvironmentResourceLocation; ProvisioningState = provisioningState; Status = status; - VnetName = vnetName; - VnetResourceGroupName = vnetResourceGroupName; - VnetSubnetName = vnetSubnetName; VirtualNetwork = virtualNetwork; InternalLoadBalancingMode = internalLoadBalancingMode; MultiSize = multiSize; MultiRoleCount = multiRoleCount; - WorkerPools = workerPools; IpsslAddressCount = ipsslAddressCount; - DatabaseEdition = databaseEdition; - DatabaseServiceObjective = databaseServiceObjective; - UpgradeDomains = upgradeDomains; - SubscriptionId = subscriptionId; DnsSuffix = dnsSuffix; - LastAction = lastAction; - LastActionResult = lastActionResult; - AllowedMultiSizes = allowedMultiSizes; - AllowedWorkerSizes = allowedWorkerSizes; MaximumNumberOfMachines = maximumNumberOfMachines; - VipMappings = vipMappings; - EnvironmentCapacities = environmentCapacities; - NetworkAccessControlList = networkAccessControlList; - EnvironmentIsHealthy = environmentIsHealthy; - EnvironmentStatus = environmentStatus; - ResourceGroup = resourceGroup; FrontEndScaleFactor = frontEndScaleFactor; - DefaultFrontEndScaleFactor = defaultFrontEndScaleFactor; - ApiManagementAccountId = apiManagementAccountId; Suspended = suspended; - DynamicCacheEnabled = dynamicCacheEnabled; ClusterSettings = clusterSettings; UserWhitelistedIpRanges = userWhitelistedIpRanges; HasLinuxWorkers = hasLinuxWorkers; - SslCertKeyVaultId = sslCertKeyVaultId; - SslCertKeyVaultSecretName = sslCertKeyVaultSecretName; + DedicatedHostCount = dedicatedHostCount; CustomInit(); } @@ -178,19 +103,6 @@ public AppServiceEnvironmentResource() /// partial void CustomInit(); - /// - /// Gets or sets name of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.name")] - public string AppServiceEnvironmentResourceName { get; set; } - - /// - /// Gets or sets location of the App Service Environment, e.g. "West - /// US". - /// - [JsonProperty(PropertyName = "properties.location")] - public string AppServiceEnvironmentResourceLocation { get; set; } - /// /// Gets provisioning state of the App Service Environment. Possible /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', @@ -206,25 +118,6 @@ public AppServiceEnvironmentResource() [JsonProperty(PropertyName = "properties.status")] public HostingEnvironmentStatus? Status { get; private set; } - /// - /// Gets or sets name of the Virtual Network for the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "properties.vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets resource group of the Virtual Network. - /// - [JsonProperty(PropertyName = "properties.vnetResourceGroupName")] - public string VnetResourceGroupName { get; set; } - - /// - /// Gets or sets subnet of the Virtual Network. - /// - [JsonProperty(PropertyName = "properties.vnetSubnetName")] - public string VnetSubnetName { get; set; } - /// /// Gets or sets description of the Virtual Network. /// @@ -234,7 +127,7 @@ public AppServiceEnvironmentResource() /// /// Gets or sets specifies which endpoints to serve internally in the /// Virtual Network for the App Service Environment. Possible values - /// include: 'None', 'Web', 'Publishing', 'Web,Publishing' + /// include: 'None', 'Web', 'Publishing', 'Web, Publishing' /// [JsonProperty(PropertyName = "properties.internalLoadBalancingMode")] public string InternalLoadBalancingMode { get; set; } @@ -246,17 +139,10 @@ public AppServiceEnvironmentResource() public string MultiSize { get; set; } /// - /// Gets or sets number of front-end instances. + /// Gets number of front-end instances. /// [JsonProperty(PropertyName = "properties.multiRoleCount")] - public int? MultiRoleCount { get; set; } - - /// - /// Gets or sets description of worker pools with worker size IDs, VM - /// sizes, and number of workers in each pool. - /// - [JsonProperty(PropertyName = "properties.workerPools")] - public IList WorkerPools { get; set; } + public int? MultiRoleCount { get; private set; } /// /// Gets or sets number of IP SSL addresses reserved for the App @@ -265,110 +151,18 @@ public AppServiceEnvironmentResource() [JsonProperty(PropertyName = "properties.ipsslAddressCount")] public int? IpsslAddressCount { get; set; } - /// - /// Gets edition of the metadata database for the App Service - /// Environment, e.g. "Standard". - /// - [JsonProperty(PropertyName = "properties.databaseEdition")] - public string DatabaseEdition { get; private set; } - - /// - /// Gets service objective of the metadata database for the App Service - /// Environment, e.g. "S0". - /// - [JsonProperty(PropertyName = "properties.databaseServiceObjective")] - public string DatabaseServiceObjective { get; private set; } - - /// - /// Gets number of upgrade domains of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.upgradeDomains")] - public int? UpgradeDomains { get; private set; } - - /// - /// Gets subscription of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.subscriptionId")] - public string SubscriptionId { get; private set; } - /// /// Gets or sets DNS suffix of the App Service Environment. /// [JsonProperty(PropertyName = "properties.dnsSuffix")] public string DnsSuffix { get; set; } - /// - /// Gets last deployment action on the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.lastAction")] - public string LastAction { get; private set; } - - /// - /// Gets result of the last deployment action on the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "properties.lastActionResult")] - public string LastActionResult { get; private set; } - - /// - /// Gets list of comma separated strings describing which VM sizes are - /// allowed for front-ends. - /// - [JsonProperty(PropertyName = "properties.allowedMultiSizes")] - public string AllowedMultiSizes { get; private set; } - - /// - /// Gets list of comma separated strings describing which VM sizes are - /// allowed for workers. - /// - [JsonProperty(PropertyName = "properties.allowedWorkerSizes")] - public string AllowedWorkerSizes { get; private set; } - /// /// Gets maximum number of VMs in the App Service Environment. /// [JsonProperty(PropertyName = "properties.maximumNumberOfMachines")] public int? MaximumNumberOfMachines { get; private set; } - /// - /// Gets description of IP SSL mapping for the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.vipMappings")] - public IList VipMappings { get; private set; } - - /// - /// Gets current total, used, and available worker capacities. - /// - [JsonProperty(PropertyName = "properties.environmentCapacities")] - public IList EnvironmentCapacities { get; private set; } - - /// - /// Gets or sets access control list for controlling traffic to the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "properties.networkAccessControlList")] - public IList NetworkAccessControlList { get; set; } - - /// - /// Gets true/false indicating whether the App Service Environment is - /// healthy. - /// - [JsonProperty(PropertyName = "properties.environmentIsHealthy")] - public bool? EnvironmentIsHealthy { get; private set; } - - /// - /// Gets detailed message about with results of the last check of the - /// App Service Environment. - /// - [JsonProperty(PropertyName = "properties.environmentStatus")] - public string EnvironmentStatus { get; private set; } - - /// - /// Gets resource group of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - /// /// Gets or sets scale factor for front-ends. /// @@ -376,37 +170,15 @@ public AppServiceEnvironmentResource() public int? FrontEndScaleFactor { get; set; } /// - /// Gets default Scale Factor for FrontEnds. - /// - [JsonProperty(PropertyName = "properties.defaultFrontEndScaleFactor")] - public int? DefaultFrontEndScaleFactor { get; private set; } - - /// - /// Gets or sets API Management Account associated with the App Service - /// Environment. - /// - [JsonProperty(PropertyName = "properties.apiManagementAccountId")] - public string ApiManagementAccountId { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// App Service Environment is suspended; otherwise, + /// Gets &lt;code&gt;true&lt;/code&gt; if the App + /// Service Environment is suspended; otherwise, /// &lt;code&gt;false&lt;/code&gt;. The environment can /// be suspended, e.g. when the management endpoint is no longer /// available /// (most likely because NSG blocked the incoming traffic). /// [JsonProperty(PropertyName = "properties.suspended")] - public bool? Suspended { get; set; } - - /// - /// Gets or sets true/false indicating whether the App Service - /// Environment is suspended. The environment can be suspended e.g. - /// when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// - [JsonProperty(PropertyName = "properties.dynamicCacheEnabled")] - public bool? DynamicCacheEnabled { get; set; } + public bool? Suspended { get; private set; } /// /// Gets or sets custom settings for changing the behavior of the App @@ -422,25 +194,16 @@ public AppServiceEnvironmentResource() public IList UserWhitelistedIpRanges { get; set; } /// - /// Gets or sets flag that displays whether an ASE has linux workers or - /// not + /// Gets flag that displays whether an ASE has linux workers or not /// [JsonProperty(PropertyName = "properties.hasLinuxWorkers")] - public bool? HasLinuxWorkers { get; set; } - - /// - /// Gets or sets key Vault ID for ILB App Service Environment default - /// SSL certificate - /// - [JsonProperty(PropertyName = "properties.sslCertKeyVaultId")] - public string SslCertKeyVaultId { get; set; } + public bool? HasLinuxWorkers { get; private set; } /// - /// Gets or sets key Vault Secret Name for ILB App Service Environment - /// default SSL certificate + /// Gets dedicated Host Count /// - [JsonProperty(PropertyName = "properties.sslCertKeyVaultSecretName")] - public string SslCertKeyVaultSecretName { get; set; } + [JsonProperty(PropertyName = "properties.dedicatedHostCount")] + public int? DedicatedHostCount { get; private set; } /// /// Validate the object. @@ -451,21 +214,13 @@ public AppServiceEnvironmentResource() public override void Validate() { base.Validate(); - if (AppServiceEnvironmentResourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AppServiceEnvironmentResourceName"); - } - if (AppServiceEnvironmentResourceLocation == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AppServiceEnvironmentResourceLocation"); - } if (VirtualNetwork == null) { throw new ValidationException(ValidationRules.CannotBeNull, "VirtualNetwork"); } - if (WorkerPools == null) + if (VirtualNetwork != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "WorkerPools"); + VirtualNetwork.Validate(); } } } 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 6f5f763da3eb..172e39ecdee2 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 @@ -80,9 +80,11 @@ public AppServicePlan() /// Scaling worker count. /// Scaling worker size ID. /// Provisioning state of the App - /// Service Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'InProgress', 'Deleting' - public AppServicePlan(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), SkuDescription sku = default(SkuDescription)) + /// Service Plan. Possible values include: 'Succeeded', 'Failed', + /// 'Canceled', 'InProgress', 'Deleting' + /// Specification for the + /// Kubernetes Environment to use for the App Service plan. + public AppServicePlan(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile), SkuDescription sku = default(SkuDescription), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, kind, type, tags) { WorkerTierName = workerTierName; @@ -104,7 +106,9 @@ public AppServicePlan() TargetWorkerCount = targetWorkerCount; TargetWorkerSizeId = targetWorkerSizeId; ProvisioningState = provisioningState; + KubeEnvironmentProfile = kubeEnvironmentProfile; Sku = sku; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -237,18 +241,30 @@ public AppServicePlan() public int? TargetWorkerSizeId { get; set; } /// - /// Gets provisioning state of the App Service Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', + /// Gets provisioning state of the App Service Plan. Possible values + /// include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', /// 'Deleting' /// [JsonProperty(PropertyName = "properties.provisioningState")] public ProvisioningState? ProvisioningState { get; private set; } + /// + /// Gets or sets specification for the Kubernetes Environment to use + /// for the App Service plan. + /// + [JsonProperty(PropertyName = "properties.kubeEnvironmentProfile")] + public KubeEnvironmentProfile KubeEnvironmentProfile { get; set; } + /// /// [JsonProperty(PropertyName = "sku")] public SkuDescription Sku { get; set; } + /// + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs index 55716222a405..418fba09030a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs @@ -53,6 +53,9 @@ public AppServicePlanPatchResource() /// assigned to this App Service plan can be scaled independently. /// If <code>false</code>, apps assigned to this App /// Service plan will scale to all instances of the plan. + /// ServerFarm supports ElasticScale. + /// Apps in this plan will scale as if the ServerFarm was + /// ElasticPremium sku /// Maximum number of total /// workers allowed for this ElasticScaleEnabled App Service /// Plan @@ -66,11 +69,9 @@ public AppServicePlanPatchResource() /// free offer expires. /// Resource group of the App Service /// plan. - /// This needs to set to - /// <code>true</code> when creating a Linux App Service - /// Plan, along with <code>kind</code> set to - /// <code>Linux</code>. It should be - /// <code>false</code> otherwise. + /// If Linux app service plan + /// <code>true</code>, <code>false</code> + /// otherwise. /// Obsolete: If Hyper-V container app service /// plan <code>true</code>, <code>false</code> /// otherwise. @@ -80,9 +81,11 @@ public AppServicePlanPatchResource() /// Scaling worker count. /// Scaling worker size ID. /// Provisioning state of the App - /// Service Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'InProgress', 'Deleting' - public AppServicePlanPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?)) + /// Service Plan. Possible values include: 'Succeeded', 'Failed', + /// '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)) : base(id, name, kind, type) { WorkerTierName = workerTierName; @@ -92,6 +95,7 @@ public AppServicePlanPatchResource() MaximumNumberOfWorkers = maximumNumberOfWorkers; GeoRegion = geoRegion; PerSiteScaling = perSiteScaling; + ElasticScaleEnabled = elasticScaleEnabled; MaximumElasticWorkerCount = maximumElasticWorkerCount; NumberOfSites = numberOfSites; IsSpot = isSpot; @@ -104,6 +108,7 @@ public AppServicePlanPatchResource() TargetWorkerCount = targetWorkerCount; TargetWorkerSizeId = targetWorkerSizeId; ProvisioningState = provisioningState; + KubeEnvironmentProfile = kubeEnvironmentProfile; CustomInit(); } @@ -160,6 +165,13 @@ public AppServicePlanPatchResource() [JsonProperty(PropertyName = "properties.perSiteScaling")] public bool? PerSiteScaling { get; set; } + /// + /// Gets or sets serverFarm supports ElasticScale. Apps in this plan + /// will scale as if the ServerFarm was ElasticPremium sku + /// + [JsonProperty(PropertyName = "properties.elasticScaleEnabled")] + public bool? ElasticScaleEnabled { get; set; } + /// /// Gets or sets maximum number of total workers allowed for this /// ElasticScaleEnabled App Service Plan @@ -200,11 +212,8 @@ public AppServicePlanPatchResource() public string ResourceGroup { get; private set; } /// - /// Gets or sets this needs to set to - /// &lt;code&gt;true&lt;/code&gt; when creating a Linux - /// App Service Plan, along with - /// &lt;code&gt;kind&lt;/code&gt; set to - /// &lt;code&gt;Linux&lt;/code&gt;. It should be + /// Gets or sets if Linux app service plan + /// &lt;code&gt;true&lt;/code&gt;, /// &lt;code&gt;false&lt;/code&gt; otherwise. /// [JsonProperty(PropertyName = "properties.reserved")] @@ -239,12 +248,19 @@ public AppServicePlanPatchResource() public int? TargetWorkerSizeId { get; set; } /// - /// Gets provisioning state of the App Service Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', + /// Gets provisioning state of the App Service Plan. Possible values + /// include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', /// 'Deleting' /// [JsonProperty(PropertyName = "properties.provisioningState")] public ProvisioningState? ProvisioningState { get; private set; } + /// + /// Gets or sets specification for the Kubernetes Environment to use + /// for the App Service plan. + /// + [JsonProperty(PropertyName = "properties.kubeEnvironmentProfile")] + public KubeEnvironmentProfile KubeEnvironmentProfile { 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 new file mode 100644 index 000000000000..899a3bad46e9 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs @@ -0,0 +1,81 @@ +// +// 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; + + /// + /// The configuration settings of the Apple provider. + /// + [Rest.Serialization.JsonTransformation] + public partial class Apple : ProxyOnlyResource + { + /// + /// Initializes a new instance of the Apple class. + /// + public Apple() + { + CustomInit(); + } + + /// + /// 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>. + /// The configuration settings of the 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) + { + Enabled = enabled; + Registration = registration; + Login = login; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// Apple provider should not be enabled despite the set registration; + /// otherwise, &lt;code&gt;true&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets the configuration settings of the Apple registration. + /// + [JsonProperty(PropertyName = "properties.registration")] + public AppleRegistration Registration { get; set; } + + /// + /// Gets or sets the configuration settings of the login flow. + /// + [JsonProperty(PropertyName = "properties.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 new file mode 100644 index 000000000000..7de4212f76b3 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.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 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 + { + /// + /// Initializes a new instance of the AppleRegistration class. + /// + public AppleRegistration() + { + CustomInit(); + } + + /// + /// 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) + { + ClientId = clientId; + ClientSecretSettingName = clientSecretSettingName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Client ID of the app used for login. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets the app setting name that contains the client secret. + /// + [JsonProperty(PropertyName = "properties.clientSecretSettingName")] + public string ClientSecretSettingName { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs index 1eb2589b59e0..581290a604fe 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs @@ -38,13 +38,17 @@ public ApplicationStack() /// available. /// List of frameworks associated with /// application stack. - public ApplicationStack(string name = default(string), string display = default(string), string dependency = default(string), IList majorVersions = default(IList), IList frameworks = default(IList)) + /// <code>true</code> if this is + /// the stack is deprecated; otherwise, + /// <code>false</code>. + public ApplicationStack(string name = default(string), string display = default(string), string dependency = default(string), IList majorVersions = default(IList), IList frameworks = default(IList), IList isDeprecated = default(IList)) { Name = name; Display = display; Dependency = dependency; MajorVersions = majorVersions; Frameworks = frameworks; + IsDeprecated = isDeprecated; CustomInit(); } @@ -83,5 +87,13 @@ public ApplicationStack() [JsonProperty(PropertyName = "frameworks")] public IList Frameworks { get; set; } + /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this + /// is the stack is deprecated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDeprecated")] + public IList IsDeprecated { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs index ac8153b7ec12..ace998a07c8a 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs @@ -46,7 +46,10 @@ public ApplicationStackResource() /// available. /// List of frameworks associated with /// application stack. - public ApplicationStackResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string applicationStackResourceName = default(string), string display = default(string), string dependency = default(string), IList majorVersions = default(IList), IList frameworks = default(IList)) + /// <code>true</code> if this is + /// the stack is deprecated; otherwise, + /// <code>false</code>. + public ApplicationStackResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string applicationStackResourceName = default(string), string display = default(string), string dependency = default(string), IList majorVersions = default(IList), IList frameworks = default(IList), IList isDeprecated = default(IList)) : base(id, name, kind, type) { ApplicationStackResourceName = applicationStackResourceName; @@ -54,6 +57,7 @@ public ApplicationStackResource() Dependency = dependency; MajorVersions = majorVersions; Frameworks = frameworks; + IsDeprecated = isDeprecated; CustomInit(); } @@ -92,5 +96,13 @@ public ApplicationStackResource() [JsonProperty(PropertyName = "properties.frameworks")] public IList Frameworks { get; set; } + /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this + /// is the stack is deprecated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.isDeprecated")] + public IList IsDeprecated { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs new file mode 100644 index 000000000000..a4a1226ce6af --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs @@ -0,0 +1,87 @@ +// +// 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; + + /// + /// Github access token for Appservice CLI github integration. + /// + public partial class AppserviceGithubToken + { + /// + /// Initializes a new instance of the AppserviceGithubToken class. + /// + public AppserviceGithubToken() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppserviceGithubToken class. + /// + /// Github access token for Appservice CLI + /// github integration + /// Scope of the github access token + /// token type + /// True if valid github token received, False + /// otherwise + /// Error message if unable to get + /// token + public AppserviceGithubToken(string accessToken = default(string), string scope = default(string), string tokenType = default(string), bool? gotToken = default(bool?), string errorMessage = default(string)) + { + AccessToken = accessToken; + Scope = scope; + TokenType = tokenType; + GotToken = gotToken; + ErrorMessage = errorMessage; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets github access token for Appservice CLI github + /// integration + /// + [JsonProperty(PropertyName = "accessToken")] + public string AccessToken { get; set; } + + /// + /// Gets or sets scope of the github access token + /// + [JsonProperty(PropertyName = "scope")] + public string Scope { get; set; } + + /// + /// Gets or sets token type + /// + [JsonProperty(PropertyName = "tokenType")] + public string TokenType { get; set; } + + /// + /// Gets or sets true if valid github token received, False otherwise + /// + [JsonProperty(PropertyName = "gotToken")] + public bool? GotToken { get; set; } + + /// + /// Gets or sets error message if unable to get token + /// + [JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs new file mode 100644 index 000000000000..e99bcc39cb0f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs @@ -0,0 +1,80 @@ +// +// 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.Linq; + + /// + /// Appservice Github token request content. + /// + public partial class AppserviceGithubTokenRequest + { + /// + /// Initializes a new instance of the AppserviceGithubTokenRequest + /// class. + /// + public AppserviceGithubTokenRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppserviceGithubTokenRequest + /// class. + /// + /// Code string to exchange for Github Access + /// token + /// State string used for verification. + public AppserviceGithubTokenRequest(string code, string state) + { + Code = code; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets code string to exchange for Github Access token + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets state string used for verification. + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Code == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Code"); + } + if (State == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "State"); + } + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs new file mode 100644 index 000000000000..8fa89baad2b2 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ArcConfiguration + { + /// + /// Initializes a new instance of the ArcConfiguration class. + /// + public ArcConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArcConfiguration class. + /// + /// Possible values include: + /// 'LocalNode', 'NetworkFileSystem' + public ArcConfiguration(StorageType? artifactsStorageType = default(StorageType?), string artifactStorageClassName = default(string), string artifactStorageMountPath = default(string), string artifactStorageNodeName = default(string), string artifactStorageAccessMode = default(string), FrontEndConfiguration frontEndServiceConfiguration = default(FrontEndConfiguration), string kubeConfig = default(string)) + { + ArtifactsStorageType = artifactsStorageType; + ArtifactStorageClassName = artifactStorageClassName; + ArtifactStorageMountPath = artifactStorageMountPath; + ArtifactStorageNodeName = artifactStorageNodeName; + ArtifactStorageAccessMode = artifactStorageAccessMode; + FrontEndServiceConfiguration = frontEndServiceConfiguration; + KubeConfig = kubeConfig; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'LocalNode', + /// 'NetworkFileSystem' + /// + [JsonProperty(PropertyName = "artifactsStorageType")] + public StorageType? ArtifactsStorageType { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageClassName")] + public string ArtifactStorageClassName { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageMountPath")] + public string ArtifactStorageMountPath { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageNodeName")] + public string ArtifactStorageNodeName { get; set; } + + /// + /// + [JsonProperty(PropertyName = "artifactStorageAccessMode")] + public string ArtifactStorageAccessMode { get; set; } + + /// + /// + [JsonProperty(PropertyName = "frontEndServiceConfiguration")] + public FrontEndConfiguration FrontEndServiceConfiguration { get; set; } + + /// + /// + [JsonProperty(PropertyName = "kubeConfig")] + public string KubeConfig { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.cs new file mode 100644 index 000000000000..fc74b705a4e6 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.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.Linq; + + /// + /// The plan object in Azure Resource Manager, represents a marketplace + /// plan. + /// + public partial class ArmPlan + { + /// + /// Initializes a new instance of the ArmPlan class. + /// + public ArmPlan() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArmPlan class. + /// + /// The name. + /// The publisher. + /// The product. + /// The promotion code. + /// Version of product. + public ArmPlan(string name = default(string), string publisher = default(string), string product = default(string), string promotionCode = default(string), string version = default(string)) + { + Name = name; + Publisher = publisher; + Product = product; + PromotionCode = promotionCode; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the publisher. + /// + [JsonProperty(PropertyName = "publisher")] + public string Publisher { get; set; } + + /// + /// Gets or sets the product. + /// + [JsonProperty(PropertyName = "product")] + public string Product { get; set; } + + /// + /// Gets or sets the promotion code. + /// + [JsonProperty(PropertyName = "promotionCode")] + public string PromotionCode { get; set; } + + /// + /// Gets or sets version of product. + /// + [JsonProperty(PropertyName = "version")] + public string Version { 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 new file mode 100644 index 000000000000..57dca6849502 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.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 Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Full view of networking configuration for an ASE. + /// + [Rest.Serialization.JsonTransformation] + public partial class AseV3NetworkingConfiguration : ProxyOnlyResource + { + /// + /// Initializes a new instance of the AseV3NetworkingConfiguration + /// class. + /// + public AseV3NetworkingConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AseV3NetworkingConfiguration + /// class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// 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?)) + : base(id, name, kind, type) + { + WindowsOutboundIpAddresses = windowsOutboundIpAddresses; + LinuxOutboundIpAddresses = linuxOutboundIpAddresses; + AllowNewPrivateEndpointConnections = allowNewPrivateEndpointConnections; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.windowsOutboundIpAddresses")] + public IList WindowsOutboundIpAddresses { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "properties.linuxOutboundIpAddresses")] + public IList LinuxOutboundIpAddresses { get; private set; } + + /// + /// Gets or sets property to enable and disable new private endpoint + /// connection creation on ASE + /// + [JsonProperty(PropertyName = "properties.allowNewPrivateEndpointConnections")] + public bool? AllowNewPrivateEndpointConnections { get; set; } + + } +} 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 fcb76de8feff..fc7e0949a009 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the platform of App Service + /// Authentication/Authorization. + /// [Rest.Serialization.JsonTransformation] public partial class AuthPlatform : ProxyOnlyResource { @@ -33,6 +37,17 @@ public AuthPlatform() /// 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>. + /// The RuntimeVersion of the + /// Authentication / Authorization feature in use for the current app. + /// The setting in this value can control the behavior of certain + /// features in the Authentication / Authorization module. + /// The path of the config file containing + /// 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) { @@ -48,16 +63,26 @@ public AuthPlatform() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the + /// Authentication / Authorization feature is enabled for the current + /// app; otherwise, &lt;code&gt;false&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the RuntimeVersion of the Authentication / + /// Authorization feature in use for the current app. + /// The setting in this value can control the behavior of certain + /// features in the Authentication / Authorization module. /// [JsonProperty(PropertyName = "properties.runtimeVersion")] public string RuntimeVersion { get; set; } /// + /// Gets or sets the path of the config file containing auth settings + /// if they come from a file. + /// If the path is relative, base will the site's root directory. /// [JsonProperty(PropertyName = "properties.configFilePath")] public string ConfigFilePath { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs index 1249271bac0a..9d375020a49e 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs @@ -37,12 +37,18 @@ public AutoHealTriggers() /// A rule based on status codes. /// A rule based on request execution /// time. - public AutoHealTriggers(RequestsBasedTrigger requests = default(RequestsBasedTrigger), int? privateBytesInKB = default(int?), IList statusCodes = default(IList), SlowRequestsBasedTrigger slowRequests = default(SlowRequestsBasedTrigger)) + /// A rule based on multiple Slow + /// Requests Rule with path + /// A rule based on status codes + /// ranges. + public AutoHealTriggers(RequestsBasedTrigger requests = default(RequestsBasedTrigger), int? privateBytesInKB = default(int?), IList statusCodes = default(IList), SlowRequestsBasedTrigger slowRequests = default(SlowRequestsBasedTrigger), IList slowRequestsWithPath = default(IList), IList statusCodesRange = default(IList)) { Requests = requests; PrivateBytesInKB = privateBytesInKB; StatusCodes = statusCodes; SlowRequests = slowRequests; + SlowRequestsWithPath = slowRequestsWithPath; + StatusCodesRange = statusCodesRange; CustomInit(); } @@ -75,5 +81,17 @@ public AutoHealTriggers() [JsonProperty(PropertyName = "slowRequests")] public SlowRequestsBasedTrigger SlowRequests { get; set; } + /// + /// Gets or sets a rule based on multiple Slow Requests Rule with path + /// + [JsonProperty(PropertyName = "slowRequestsWithPath")] + public IList SlowRequestsWithPath { get; set; } + + /// + /// Gets or sets a rule based on status codes ranges. + /// + [JsonProperty(PropertyName = "statusCodesRange")] + public IList StatusCodesRange { 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 1adab0d29484..4c5adc65d09f 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the Azure Active directory provider. + /// [Rest.Serialization.JsonTransformation] public partial class AzureActiveDirectory : ProxyOnlyResource { @@ -33,6 +36,21 @@ public AzureActiveDirectory() /// 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>. + /// The configuration settings of the Azure + /// Active Directory app registration. + /// The configuration settings of the Azure Active + /// Directory login flow. + /// The configuration settings of the Azure + /// Active Directory token validation flow. + /// Gets a value indicating whether the + /// Azure AD configuration was auto-provisioned using 1st party + /// tooling. + /// 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) { @@ -50,26 +68,41 @@ public AzureActiveDirectory() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// Azure Active Directory provider should not be enabled despite the + /// set registration; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the configuration settings of the Azure Active + /// Directory app registration. /// [JsonProperty(PropertyName = "properties.registration")] public AzureActiveDirectoryRegistration Registration { get; set; } /// + /// Gets or sets the configuration settings of the Azure Active + /// Directory login flow. /// [JsonProperty(PropertyName = "properties.login")] public AzureActiveDirectoryLogin Login { get; set; } /// + /// Gets or sets the configuration settings of the Azure Active + /// Directory token validation flow. /// [JsonProperty(PropertyName = "properties.validation")] public AzureActiveDirectoryValidation Validation { get; set; } /// + /// Gets a value indicating whether the Azure AD configuration was + /// auto-provisioned using 1st party tooling. + /// This is an internal flag primarily intended to support the Azure + /// Management Portal. Users should not + /// read or write to this property. /// [JsonProperty(PropertyName = "properties.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 108a38b756cf..5f18bf96b2fe 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 @@ -17,6 +17,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of the Azure Active Directory login flow. + /// [Rest.Serialization.JsonTransformation] public partial class AzureActiveDirectoryLogin : ProxyOnlyResource { @@ -35,6 +38,10 @@ public AzureActiveDirectoryLogin() /// 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) { @@ -54,6 +61,9 @@ public AzureActiveDirectoryLogin() 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")] public IList LoginParameters { 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 28c6a7986420..e8d86b417f10 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the Azure Active Directory app + /// registration. + /// [Rest.Serialization.JsonTransformation] public partial class AzureActiveDirectoryRegistration : ProxyOnlyResource { @@ -35,6 +39,29 @@ public AzureActiveDirectoryRegistration() /// Resource Name. /// Kind of resource. /// Resource type. + /// The OpenID Connect Issuer URI that + /// represents the entity which issues access tokens for this + /// application. + /// When using Azure Active Directory, this value is the URI of the + /// directory tenant, e.g. + /// https://login.microsoftonline.com/v2.0/{tenant-guid}/. + /// This URI is a case-sensitive identifier for the token issuer. + /// More information on OpenID Connect Discovery: + /// http://openid.net/specs/openid-connect-discovery-1_0.html + /// The Client ID of this relying party + /// application, known as the client_id. + /// This setting is required for enabling OpenID Connection + /// authentication with Azure Active Directory or + /// other 3rd party OpenID Connect providers. + /// More information on OpenID Connect: + /// http://openid.net/specs/openid-connect-core-1_0.html + /// The app setting name that + /// contains the client secret of the relying party + /// application. + /// An alternative to + /// 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) { @@ -51,21 +78,42 @@ public AzureActiveDirectoryRegistration() partial void CustomInit(); /// + /// Gets or sets the OpenID Connect Issuer URI that represents the + /// entity which issues access tokens for this application. + /// When using Azure Active Directory, this value is the URI of the + /// directory tenant, e.g. + /// https://login.microsoftonline.com/v2.0/{tenant-guid}/. + /// This URI is a case-sensitive identifier for the token issuer. + /// More information on OpenID Connect Discovery: + /// http://openid.net/specs/openid-connect-discovery-1_0.html /// [JsonProperty(PropertyName = "properties.openIdIssuer")] public string OpenIdIssuer { get; set; } /// + /// Gets or sets the Client ID of this relying party application, known + /// as the client_id. + /// This setting is required for enabling OpenID Connection + /// authentication with Azure Active Directory or + /// other 3rd party OpenID Connect providers. + /// More information on OpenID Connect: + /// http://openid.net/specs/openid-connect-core-1_0.html /// [JsonProperty(PropertyName = "properties.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")] public string ClientSecretSettingName { get; set; } /// + /// Gets or sets an alternative to 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. /// [JsonProperty(PropertyName = "properties.clientSecretCertificateThumbprint")] public string ClientSecretCertificateThumbprint { 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 4122b36d7f76..3b81d7a90c8b 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of the Azure Active Directory token + /// validation flow. + /// [Rest.Serialization.JsonTransformation] public partial class AzureActiveDirectoryValidation : ProxyOnlyResource { @@ -37,6 +41,10 @@ public AzureActiveDirectoryValidation() /// 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) { @@ -51,11 +59,15 @@ public AzureActiveDirectoryValidation() partial void CustomInit(); /// + /// Gets or sets the configuration settings of the checks that should + /// be made while validating the JWT Claims. /// [JsonProperty(PropertyName = "properties.jwtClaimChecks")] public JwtClaimChecks JwtClaimChecks { get; set; } /// + /// Gets or sets the list of audiences that can make successful + /// authentication/authorization requests. /// [JsonProperty(PropertyName = "properties.allowedAudiences")] public IList AllowedAudiences { 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 new file mode 100644 index 000000000000..46b15f342424 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs @@ -0,0 +1,74 @@ +// +// 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; + + /// + /// The configuration settings of the Azure Static Web Apps provider. + /// + [Rest.Serialization.JsonTransformation] + public partial class AzureStaticWebApps : ProxyOnlyResource + { + /// + /// Initializes a new instance of the AzureStaticWebApps class. + /// + public AzureStaticWebApps() + { + CustomInit(); + } + + /// + /// 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) + { + Enabled = enabled; + Registration = registration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// Azure Static Web Apps provider should not be enabled despite the + /// set registration; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets the configuration settings of the Azure Static Web + /// Apps registration. + /// + [JsonProperty(PropertyName = "properties.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 new file mode 100644 index 000000000000..7f65e2ba278d --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.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 Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The configuration settings of the registration for the Azure Static Web + /// Apps provider + /// + [Rest.Serialization.JsonTransformation] + public partial class AzureStaticWebAppsRegistration : ProxyOnlyResource + { + /// + /// Initializes a new instance of the AzureStaticWebAppsRegistration + /// class. + /// + public AzureStaticWebAppsRegistration() + { + CustomInit(); + } + + /// + /// 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) + { + ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Client ID of the app used for login. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs index a0dec36fc138..58973e11d2a7 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs @@ -39,7 +39,8 @@ public AzureStorageInfoValue() /// Path to mount the storage within the site's /// runtime environment. /// State of the storage account. Possible values - /// include: 'Ok', 'InvalidCredentials', 'InvalidShare' + /// include: 'Ok', 'InvalidCredentials', 'InvalidShare', + /// 'NotValidated' public AzureStorageInfoValue(AzureStorageType? type = default(AzureStorageType?), string accountName = default(string), string shareName = default(string), string accessKey = default(string), string mountPath = default(string), AzureStorageState? state = default(AzureStorageState?)) { Type = type; @@ -91,7 +92,7 @@ public AzureStorageInfoValue() /// /// Gets state of the storage account. Possible values include: 'Ok', - /// 'InvalidCredentials', 'InvalidShare' + /// 'InvalidCredentials', 'InvalidShare', 'NotValidated' /// [JsonProperty(PropertyName = "state")] public AzureStorageState? State { get; private set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs index 49d68d686c25..dd8e18dc45a5 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs @@ -26,7 +26,9 @@ public enum AzureStorageState [EnumMember(Value = "InvalidCredentials")] InvalidCredentials, [EnumMember(Value = "InvalidShare")] - InvalidShare + InvalidShare, + [EnumMember(Value = "NotValidated")] + NotValidated } internal static class AzureStorageStateEnumExtension { @@ -45,6 +47,8 @@ internal static string ToSerializedValue(this AzureStorageState value) return "InvalidCredentials"; case AzureStorageState.InvalidShare: return "InvalidShare"; + case AzureStorageState.NotValidated: + return "NotValidated"; } return null; } @@ -59,6 +63,8 @@ internal static string ToSerializedValue(this AzureStorageState value) return AzureStorageState.InvalidCredentials; case "InvalidShare": return AzureStorageState.InvalidShare; + case "NotValidated": + return AzureStorageState.NotValidated; } return null; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs index 2e6698cad5cd..592906a09b62 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs @@ -46,7 +46,8 @@ public BillingMeter() /// App Service ResourceType meter used /// for /// App Service OS type meter used for - public BillingMeter(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string meterId = default(string), string billingLocation = default(string), string shortName = default(string), string friendlyName = default(string), string resourceType = default(string), string osType = default(string)) + /// Meter Multiplier + public BillingMeter(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string meterId = default(string), string billingLocation = default(string), string shortName = default(string), string friendlyName = default(string), string resourceType = default(string), string osType = default(string), double? multiplier = default(double?)) : base(id, name, kind, type) { MeterId = meterId; @@ -55,6 +56,7 @@ public BillingMeter() FriendlyName = friendlyName; ResourceType = resourceType; OsType = osType; + Multiplier = multiplier; CustomInit(); } @@ -99,5 +101,11 @@ public BillingMeter() [JsonProperty(PropertyName = "properties.osType")] public string OsType { get; set; } + /// + /// Gets or sets meter Multiplier + /// + [JsonProperty(PropertyName = "properties.multiplier")] + public double? Multiplier { 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 477633b938cb..312e424b75d5 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the storage of the tokens if blob storage + /// is used. + /// [Rest.Serialization.JsonTransformation] public partial class BlobStorageTokenStore : ProxyOnlyResource { @@ -33,6 +37,9 @@ public BlobStorageTokenStore() /// 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) { @@ -46,6 +53,8 @@ public BlobStorageTokenStore() partial void CustomInit(); /// + /// Gets or sets the name of the app setting containing the SAS URL of + /// the blob storage containing the tokens. /// [JsonProperty(PropertyName = "properties.sasUrlSettingName")] public string SasUrlSettingName { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs index d46eb9c0661c..3b586e1571db 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs @@ -35,12 +35,12 @@ public Certificate() /// Initializes a new instance of the Certificate class. /// /// Resource Location. - /// Certificate password. /// Resource Id. /// Resource Name. /// Kind of resource. /// Resource type. /// Resource tags. + /// Certificate password. /// Friendly name of the /// certificate. /// Subject name of the certificate. @@ -72,9 +72,12 @@ public Certificate() /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". /// CNAME of the certificate to be issued /// via free certificate - public Certificate(string location, string password, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string friendlyName = default(string), string subjectName = default(string), IList hostNames = default(IList), byte[] pfxBlob = default(byte[]), string siteName = default(string), string selfLink = default(string), string issuer = default(string), System.DateTime? issueDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string thumbprint = default(string), bool? valid = default(bool?), byte[] cerBlob = default(byte[]), string publicKeyHash = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? keyVaultSecretStatus = default(KeyVaultSecretStatus?), string serverFarmId = default(string), string canonicalName = default(string)) + /// Method of domain validation + /// for free cert + public Certificate(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string password = default(string), string friendlyName = default(string), string subjectName = default(string), IList hostNames = default(IList), byte[] pfxBlob = default(byte[]), string siteName = default(string), string selfLink = default(string), string issuer = default(string), System.DateTime? issueDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string thumbprint = default(string), bool? valid = default(bool?), byte[] cerBlob = default(byte[]), string publicKeyHash = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? keyVaultSecretStatus = default(KeyVaultSecretStatus?), string serverFarmId = default(string), string canonicalName = default(string), string domainValidationMethod = default(string)) : base(location, id, name, kind, type, tags) { + Password = password; FriendlyName = friendlyName; SubjectName = subjectName; HostNames = hostNames; @@ -84,7 +87,6 @@ public Certificate() Issuer = issuer; IssueDate = issueDate; ExpirationDate = expirationDate; - Password = password; Thumbprint = thumbprint; Valid = valid; CerBlob = cerBlob; @@ -95,6 +97,7 @@ public Certificate() KeyVaultSecretStatus = keyVaultSecretStatus; ServerFarmId = serverFarmId; CanonicalName = canonicalName; + DomainValidationMethod = domainValidationMethod; CustomInit(); } @@ -103,6 +106,12 @@ public Certificate() /// partial void CustomInit(); + /// + /// Gets or sets certificate password. + /// + [JsonProperty(PropertyName = "properties.password")] + public string Password { get; set; } + /// /// Gets friendly name of the certificate. /// @@ -157,12 +166,6 @@ public Certificate() [JsonProperty(PropertyName = "properties.expirationDate")] public System.DateTime? ExpirationDate { get; private set; } - /// - /// Gets or sets certificate password. - /// - [JsonProperty(PropertyName = "properties.password")] - public string Password { get; set; } - /// /// Gets certificate thumbprint. /// @@ -232,6 +235,12 @@ public Certificate() [JsonProperty(PropertyName = "properties.canonicalName")] public string CanonicalName { get; set; } + /// + /// Gets or sets method of domain validation for free cert + /// + [JsonProperty(PropertyName = "properties.domainValidationMethod")] + public string DomainValidationMethod { get; set; } + /// /// Validate the object. /// @@ -241,10 +250,6 @@ public Certificate() public override void Validate() { base.Validate(); - if (Password == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Password"); - } } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs new file mode 100644 index 000000000000..e5e1e23fea6c --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs @@ -0,0 +1,64 @@ +// +// 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 CertificateOrderContact + { + /// + /// Initializes a new instance of the CertificateOrderContact class. + /// + public CertificateOrderContact() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateOrderContact class. + /// + public CertificateOrderContact(string email = default(string), string nameFirst = default(string), string nameLast = default(string), string phone = default(string)) + { + Email = email; + NameFirst = nameFirst; + NameLast = nameLast; + Phone = phone; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + + /// + /// + [JsonProperty(PropertyName = "nameFirst")] + public string NameFirst { get; set; } + + /// + /// + [JsonProperty(PropertyName = "nameLast")] + public string NameLast { get; set; } + + /// + /// + [JsonProperty(PropertyName = "phone")] + public string Phone { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs index f2579bd985bc..126494ed2d53 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs @@ -34,11 +34,11 @@ public CertificatePatchResource() /// /// Initializes a new instance of the CertificatePatchResource class. /// - /// Certificate password. /// Resource Id. /// Resource Name. /// Kind of resource. /// Resource type. + /// Certificate password. /// Friendly name of the /// certificate. /// Subject name of the certificate. @@ -70,9 +70,12 @@ public CertificatePatchResource() /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". /// CNAME of the certificate to be issued /// via free certificate - public CertificatePatchResource(string password, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string friendlyName = default(string), string subjectName = default(string), IList hostNames = default(IList), byte[] pfxBlob = default(byte[]), string siteName = default(string), string selfLink = default(string), string issuer = default(string), System.DateTime? issueDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string thumbprint = default(string), bool? valid = default(bool?), byte[] cerBlob = default(byte[]), string publicKeyHash = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? keyVaultSecretStatus = default(KeyVaultSecretStatus?), string serverFarmId = default(string), string canonicalName = default(string)) + /// Method of domain validation + /// for free cert + public CertificatePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string password = default(string), string friendlyName = default(string), string subjectName = default(string), IList hostNames = default(IList), byte[] pfxBlob = default(byte[]), string siteName = default(string), string selfLink = default(string), string issuer = default(string), System.DateTime? issueDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string thumbprint = default(string), bool? valid = default(bool?), byte[] cerBlob = default(byte[]), string publicKeyHash = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? keyVaultSecretStatus = default(KeyVaultSecretStatus?), string serverFarmId = default(string), string canonicalName = default(string), string domainValidationMethod = default(string)) : base(id, name, kind, type) { + Password = password; FriendlyName = friendlyName; SubjectName = subjectName; HostNames = hostNames; @@ -82,7 +85,6 @@ public CertificatePatchResource() Issuer = issuer; IssueDate = issueDate; ExpirationDate = expirationDate; - Password = password; Thumbprint = thumbprint; Valid = valid; CerBlob = cerBlob; @@ -93,6 +95,7 @@ public CertificatePatchResource() KeyVaultSecretStatus = keyVaultSecretStatus; ServerFarmId = serverFarmId; CanonicalName = canonicalName; + DomainValidationMethod = domainValidationMethod; CustomInit(); } @@ -101,6 +104,12 @@ public CertificatePatchResource() /// partial void CustomInit(); + /// + /// Gets or sets certificate password. + /// + [JsonProperty(PropertyName = "properties.password")] + public string Password { get; set; } + /// /// Gets friendly name of the certificate. /// @@ -155,12 +164,6 @@ public CertificatePatchResource() [JsonProperty(PropertyName = "properties.expirationDate")] public System.DateTime? ExpirationDate { get; private set; } - /// - /// Gets or sets certificate password. - /// - [JsonProperty(PropertyName = "properties.password")] - public string Password { get; set; } - /// /// Gets certificate thumbprint. /// @@ -231,17 +234,10 @@ public CertificatePatchResource() public string CanonicalName { get; set; } /// - /// Validate the object. + /// Gets or sets method of domain validation for free cert /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Password == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Password"); - } - } + [JsonProperty(PropertyName = "properties.domainValidationMethod")] + public string DomainValidationMethod { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs index 422855315598..5c9bd29f7e2d 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs @@ -24,7 +24,9 @@ public enum ClientCertMode [EnumMember(Value = "Required")] Required, [EnumMember(Value = "Optional")] - Optional + Optional, + [EnumMember(Value = "OptionalInteractiveUser")] + OptionalInteractiveUser } internal static class ClientCertModeEnumExtension { @@ -41,6 +43,8 @@ internal static string ToSerializedValue(this ClientCertMode value) return "Required"; case ClientCertMode.Optional: return "Optional"; + case ClientCertMode.OptionalInteractiveUser: + return "OptionalInteractiveUser"; } return null; } @@ -53,6 +57,8 @@ internal static string ToSerializedValue(this ClientCertMode value) return ClientCertMode.Required; case "Optional": return ClientCertMode.Optional; + case "OptionalInteractiveUser": + return ClientCertMode.OptionalInteractiveUser; } return null; } 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 516e1eda692c..53c9e5bc455f 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the app registration for providers that + /// have client ids and client secrets + /// [Rest.Serialization.JsonTransformation] public partial class ClientRegistration : ProxyOnlyResource { @@ -33,6 +37,10 @@ public ClientRegistration() /// 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) { @@ -47,11 +55,13 @@ public ClientRegistration() partial void CustomInit(); /// + /// Gets or sets the Client ID of the app used for login. /// [JsonProperty(PropertyName = "properties.clientId")] public string ClientId { get; set; } /// + /// Gets or sets the app setting name that contains the client secret. /// [JsonProperty(PropertyName = "properties.clientSecretSettingName")] public string ClientSecretSettingName { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs new file mode 100644 index 000000000000..621c4362c717 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ConfigReferenceSource. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ConfigReferenceSource + { + [EnumMember(Value = "KeyVault")] + KeyVault + } + internal static class ConfigReferenceSourceEnumExtension + { + internal static string ToSerializedValue(this ConfigReferenceSource? value) + { + return value == null ? null : ((ConfigReferenceSource)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this ConfigReferenceSource value) + { + switch( value ) + { + case ConfigReferenceSource.KeyVault: + return "KeyVault"; + } + return null; + } + + internal static ConfigReferenceSource? ParseConfigReferenceSource(this string value) + { + switch( value ) + { + case "KeyVault": + return ConfigReferenceSource.KeyVault; + } + return null; + } + } +} 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 2bad787f8310..8c65dc752591 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the session cookie's expiration. + /// [Rest.Serialization.JsonTransformation] public partial class CookieExpiration : ProxyOnlyResource { @@ -33,8 +36,11 @@ public CookieExpiration() /// Resource Name. /// Kind of resource. /// Resource type. - /// Possible values include: 'FixedTime', + /// 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) { @@ -49,13 +55,16 @@ public CookieExpiration() partial void CustomInit(); /// - /// Gets or sets possible values include: 'FixedTime', + /// Gets or sets the convention used when determining the session + /// cookie's expiration. Possible values include: 'FixedTime', /// 'IdentityProviderDerived' /// [JsonProperty(PropertyName = "properties.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")] public string TimeToExpiration { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmCopySlotEntity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmCopySlotEntity.cs deleted file mode 100644 index 0c117e09339b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmCopySlotEntity.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Copy deployment slot parameters. - /// - public partial class CsmCopySlotEntity - { - /// - /// Initializes a new instance of the CsmCopySlotEntity class. - /// - public CsmCopySlotEntity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmCopySlotEntity class. - /// - /// Destination deployment slot during copy - /// operation. - /// The site object which will be merged with - /// the source slot site - /// to produce new destination slot site object. - /// <code>null</code> to just copy source slot content. - /// Otherwise a <code>Site</code> - /// object with properties to override source slot site. - public CsmCopySlotEntity(string targetSlot, SiteConfig siteConfig) - { - TargetSlot = targetSlot; - SiteConfig = siteConfig; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets destination deployment slot during copy operation. - /// - [JsonProperty(PropertyName = "targetSlot")] - public string TargetSlot { get; set; } - - /// - /// Gets or sets the site object which will be merged with the source - /// slot site - /// to produce new destination slot site object. - /// &lt;code&gt;null&lt;/code&gt; to just copy source - /// slot content. Otherwise a - /// &lt;code&gt;Site&lt;/code&gt; - /// object with properties to override source slot site. - /// - [JsonProperty(PropertyName = "siteConfig")] - public SiteConfig SiteConfig { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TargetSlot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetSlot"); - } - if (SiteConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SiteConfig"); - } - if (SiteConfig != null) - { - SiteConfig.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs index e37bb469ac64..52de32488e8f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs @@ -30,9 +30,10 @@ public CsmOperationDescription() /// /// Initializes a new instance of the CsmOperationDescription class. /// - public CsmOperationDescription(string name = default(string), CsmOperationDisplay display = default(CsmOperationDisplay), string origin = default(string), CsmOperationDescriptionProperties properties = default(CsmOperationDescriptionProperties)) + public CsmOperationDescription(string name = default(string), bool? isDataAction = default(bool?), CsmOperationDisplay display = default(CsmOperationDisplay), string origin = default(string), CsmOperationDescriptionProperties properties = default(CsmOperationDescriptionProperties)) { Name = name; + IsDataAction = isDataAction; Display = display; Origin = origin; Properties = properties; @@ -49,6 +50,11 @@ public CsmOperationDescription() [JsonProperty(PropertyName = "name")] public string Name { get; set; } + /// + /// + [JsonProperty(PropertyName = "isDataAction")] + public bool? IsDataAction { get; set; } + /// /// [JsonProperty(PropertyName = "display")] diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs new file mode 100644 index 000000000000..7a18aa9698bf --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs @@ -0,0 +1,26 @@ +// +// 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 CustomDomainStatus. + /// + public static class CustomDomainStatus + { + public const string RetrievingValidationToken = "RetrievingValidationToken"; + public const string Validating = "Validating"; + public const string Adding = "Adding"; + public const string Ready = "Ready"; + public const string Failed = "Failed"; + public const string Deleting = "Deleting"; + } +} 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 c6bcf20e8429..3a5ff17ecd4b 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the custom Open ID Connect provider. + /// [Rest.Serialization.JsonTransformation] public partial class CustomOpenIdConnectProvider : ProxyOnlyResource { @@ -35,6 +38,13 @@ public CustomOpenIdConnectProvider() /// 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>. + /// The configuration settings of the app + /// 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) { @@ -50,16 +60,23 @@ public CustomOpenIdConnectProvider() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// custom Open ID provider provider should not be enabled; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.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")] 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")] public OpenIdConnectLogin Login { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.cs new file mode 100644 index 000000000000..74f97c70231f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Additional configuration for a data providers + /// + public partial class DataProviderMetadata + { + /// + /// Initializes a new instance of the DataProviderMetadata class. + /// + public DataProviderMetadata() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataProviderMetadata class. + /// + /// Settings for the data provider + public DataProviderMetadata(string providerName = default(string), IList propertyBag = default(IList)) + { + ProviderName = providerName; + PropertyBag = propertyBag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "providerName")] + public string ProviderName { get; set; } + + /// + /// Gets settings for the data provider + /// + [JsonProperty(PropertyName = "propertyBag")] + public IList PropertyBag { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs index 78af46d0f5c1..6bef8197eb83 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.WebSites.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -29,17 +31,33 @@ public DetectorInfo() /// /// Initializes a new instance of the DetectorInfo class. /// + /// Id of detector + /// Name of detector /// Short description of the detector and its - /// purpose - /// Support Category - /// Support Sub Category - /// Support Topic Id - public DetectorInfo(string description = default(string), string category = default(string), string subCategory = default(string), string supportTopicId = default(string)) + /// purpose. + /// Author of the detector. + /// Problem category. This serves for organizing + /// group for detectors. + /// List of Support Topics for which + /// this detector is enabled. + /// Analysis Types for which this detector + /// should apply to. + /// Whether this detector is an Analysis Detector or + /// not. Possible values include: 'Detector', 'Analysis', + /// 'CategoryOverview' + /// Defines score of a detector to power ML based + /// matching. + public DetectorInfo(string id = default(string), string name = default(string), string description = default(string), string author = default(string), string category = default(string), IList supportTopicList = default(IList), IList analysisType = default(IList), DetectorType? type = default(DetectorType?), double? score = default(double?)) { + Id = id; + Name = name; Description = description; + Author = author; Category = category; - SubCategory = subCategory; - SupportTopicId = supportTopicId; + SupportTopicList = supportTopicList; + AnalysisType = analysisType; + Type = type; + Score = score; CustomInit(); } @@ -49,28 +67,60 @@ public DetectorInfo() partial void CustomInit(); /// - /// Gets short description of the detector and its purpose + /// Gets id of detector + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets name of detector + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets short description of the detector and its purpose. /// [JsonProperty(PropertyName = "description")] public string Description { get; private set; } /// - /// Gets support Category + /// Gets author of the detector. + /// + [JsonProperty(PropertyName = "author")] + public string Author { get; private set; } + + /// + /// Gets problem category. This serves for organizing group for + /// detectors. /// [JsonProperty(PropertyName = "category")] public string Category { get; private set; } /// - /// Gets support Sub Category + /// Gets list of Support Topics for which this detector is enabled. + /// + [JsonProperty(PropertyName = "supportTopicList")] + public IList SupportTopicList { get; private set; } + + /// + /// Gets analysis Types for which this detector should apply to. + /// + [JsonProperty(PropertyName = "analysisType")] + public IList AnalysisType { get; private set; } + + /// + /// Gets whether this detector is an Analysis Detector or not. Possible + /// values include: 'Detector', 'Analysis', 'CategoryOverview' /// - [JsonProperty(PropertyName = "subCategory")] - public string SubCategory { get; private set; } + [JsonProperty(PropertyName = "type")] + public DetectorType? Type { get; private set; } /// - /// Gets support Topic Id + /// Gets defines score of a detector to power ML based matching. /// - [JsonProperty(PropertyName = "supportTopicId")] - public string SupportTopicId { get; private set; } + [JsonProperty(PropertyName = "score")] + public double? Score { get; private set; } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs index 853860a84c5c..79366fbad0af 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs @@ -40,11 +40,20 @@ public DetectorResponse() /// Resource type. /// metadata for the detector /// Data Set - public DetectorResponse(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), DetectorInfo metadata = default(DetectorInfo), IList dataset = default(IList)) + /// Indicates status of the most severe + /// insight. + /// Additional configuration for + /// different data providers to be used by the UI + /// Suggested utterances where the + /// detector can be applicable. + public DetectorResponse(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), DetectorInfo metadata = default(DetectorInfo), IList dataset = default(IList), Status status = default(Status), IList dataProvidersMetadata = default(IList), QueryUtterancesResults suggestedUtterances = default(QueryUtterancesResults)) : base(id, name, kind, type) { Metadata = metadata; Dataset = dataset; + Status = status; + DataProvidersMetadata = dataProvidersMetadata; + SuggestedUtterances = suggestedUtterances; CustomInit(); } @@ -65,5 +74,25 @@ public DetectorResponse() [JsonProperty(PropertyName = "properties.dataset")] public IList Dataset { get; set; } + /// + /// Gets or sets indicates status of the most severe insight. + /// + [JsonProperty(PropertyName = "properties.status")] + public Status Status { get; set; } + + /// + /// Gets or sets additional configuration for different data providers + /// to be used by the UI + /// + [JsonProperty(PropertyName = "properties.dataProvidersMetadata")] + public IList DataProvidersMetadata { get; set; } + + /// + /// Gets or sets suggested utterances where the detector can be + /// applicable. + /// + [JsonProperty(PropertyName = "properties.suggestedUtterances")] + public QueryUtterancesResults SuggestedUtterances { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.cs new file mode 100644 index 000000000000..23370a2c5fec --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.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 Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DetectorType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DetectorType + { + [EnumMember(Value = "Detector")] + Detector, + [EnumMember(Value = "Analysis")] + Analysis, + [EnumMember(Value = "CategoryOverview")] + CategoryOverview + } + internal static class DetectorTypeEnumExtension + { + internal static string ToSerializedValue(this DetectorType? value) + { + return value == null ? null : ((DetectorType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this DetectorType value) + { + switch( value ) + { + case DetectorType.Detector: + return "Detector"; + case DetectorType.Analysis: + return "Analysis"; + case DetectorType.CategoryOverview: + return "CategoryOverview"; + } + return null; + } + + internal static DetectorType? ParseDetectorType(this string value) + { + switch( value ) + { + case "Detector": + return DetectorType.Detector; + case "Analysis": + return DetectorType.Analysis; + case "CategoryOverview": + return DetectorType.CategoryOverview; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs new file mode 100644 index 000000000000..c5ec84c2002f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs @@ -0,0 +1,46 @@ +// +// 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 ExtendedLocation + { + /// + /// Initializes a new instance of the ExtendedLocation class. + /// + public ExtendedLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExtendedLocation class. + /// + public ExtendedLocation(string customLocation = default(string)) + { + CustomLocation = customLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "customLocation")] + public string CustomLocation { get; set; } + + } +} 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 5d66f50d57a6..2cab9bdfebc6 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the Facebook provider. + /// [Rest.Serialization.JsonTransformation] public partial class Facebook : ProxyOnlyResource { @@ -33,6 +36,15 @@ public Facebook() /// 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>. + /// The configuration settings of the app + /// registration for the Facebook provider. + /// The version of the Facebook api to be + /// 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) { @@ -49,21 +61,30 @@ public Facebook() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// Facebook provider should not be enabled despite the set + /// registration; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the configuration settings of the app registration for + /// the Facebook provider. /// [JsonProperty(PropertyName = "properties.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")] public string GraphApiVersion { get; set; } /// + /// Gets or sets the configuration settings of the login flow. /// [JsonProperty(PropertyName = "properties.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 d56ea63988fe..405d456abb74 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the storage of the tokens if a file + /// system is used. + /// [Rest.Serialization.JsonTransformation] public partial class FileSystemTokenStore : ProxyOnlyResource { @@ -33,6 +37,8 @@ public FileSystemTokenStore() /// 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) { @@ -46,6 +52,7 @@ public FileSystemTokenStore() partial void CustomInit(); /// + /// Gets or sets the directory in which the tokens will be stored. /// [JsonProperty(PropertyName = "properties.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 239718fe2b4e..bd53d61ffe31 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of a forward proxy used to make the + /// requests. + /// [Rest.Serialization.JsonTransformation] public partial class ForwardProxy : ProxyOnlyResource { @@ -33,8 +37,13 @@ public ForwardProxy() /// Resource Name. /// Kind of resource. /// Resource type. - /// Possible values include: 'NoProxy', + /// The convention used to determine the url + /// of the request made. Possible values include: 'NoProxy', /// 'Standard', 'Custom' + /// The name of the header + /// 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) { @@ -50,18 +59,23 @@ public ForwardProxy() partial void CustomInit(); /// - /// Gets or sets possible values include: 'NoProxy', 'Standard', + /// Gets or sets the convention used to determine the url of the + /// request made. Possible values include: 'NoProxy', 'Standard', /// 'Custom' /// [JsonProperty(PropertyName = "properties.convention")] public ForwardProxyConvention? Convention { get; set; } /// + /// Gets or sets the name of the header containing the host of the + /// request. /// [JsonProperty(PropertyName = "properties.customHostHeaderName")] public string CustomHostHeaderName { get; set; } /// + /// Gets or sets the name of the header containing the scheme of the + /// request. /// [JsonProperty(PropertyName = "properties.customProtoHeaderName")] public string CustomProtoHeaderName { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs new file mode 100644 index 000000000000..0f851ec956af --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs @@ -0,0 +1,49 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class FrontEndConfiguration + { + /// + /// Initializes a new instance of the FrontEndConfiguration class. + /// + public FrontEndConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FrontEndConfiguration class. + /// + /// Possible values include: 'NodePort', + /// 'LoadBalancer' + public FrontEndConfiguration(FrontEndServiceType? kind = default(FrontEndServiceType?)) + { + Kind = kind; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'NodePort', 'LoadBalancer' + /// + [JsonProperty(PropertyName = "kind")] + public FrontEndServiceType? Kind { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs new file mode 100644 index 000000000000..b89583e73855 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for FrontEndServiceType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FrontEndServiceType + { + [EnumMember(Value = "NodePort")] + NodePort, + [EnumMember(Value = "LoadBalancer")] + LoadBalancer + } + internal static class FrontEndServiceTypeEnumExtension + { + internal static string ToSerializedValue(this FrontEndServiceType? value) + { + return value == null ? null : ((FrontEndServiceType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this FrontEndServiceType value) + { + switch( value ) + { + case FrontEndServiceType.NodePort: + return "NodePort"; + case FrontEndServiceType.LoadBalancer: + return "LoadBalancer"; + } + return null; + } + + internal static FrontEndServiceType? ParseFrontEndServiceType(this string value) + { + switch( value ) + { + case "NodePort": + return FrontEndServiceType.NodePort; + case "LoadBalancer": + return FrontEndServiceType.LoadBalancer; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.cs new file mode 100644 index 000000000000..8dee701ca524 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.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 Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Function App stack major version. + /// + public partial class FunctionAppMajorVersion + { + /// + /// Initializes a new instance of the FunctionAppMajorVersion class. + /// + public FunctionAppMajorVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FunctionAppMajorVersion class. + /// + /// Function App stack major version (display + /// only). + /// Function App stack major version name. + /// Minor versions associated with the + /// major version. + public FunctionAppMajorVersion(string displayText = default(string), string value = default(string), IList minorVersions = default(IList)) + { + DisplayText = displayText; + Value = value; + MinorVersions = minorVersions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets function App stack major version (display only). + /// + [JsonProperty(PropertyName = "displayText")] + public string DisplayText { get; private set; } + + /// + /// Gets function App stack major version name. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; private set; } + + /// + /// Gets minor versions associated with the major version. + /// + [JsonProperty(PropertyName = "minorVersions")] + public IList MinorVersions { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.cs new file mode 100644 index 000000000000..bf288f1db6fc --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.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; + + /// + /// Function App stack minor version. + /// + public partial class FunctionAppMinorVersion + { + /// + /// Initializes a new instance of the FunctionAppMinorVersion class. + /// + public FunctionAppMinorVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FunctionAppMinorVersion class. + /// + /// Function App stack (display + /// only). + /// Function App stack name. + /// Settings associated with the minor + /// version. + public FunctionAppMinorVersion(string displayText = default(string), string value = default(string), FunctionAppRuntimes stackSettings = default(FunctionAppRuntimes)) + { + DisplayText = displayText; + Value = value; + StackSettings = stackSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets function App stack (display only). + /// + [JsonProperty(PropertyName = "displayText")] + public string DisplayText { get; private set; } + + /// + /// Gets function App stack name. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; private set; } + + /// + /// Gets settings associated with the minor version. + /// + [JsonProperty(PropertyName = "stackSettings")] + public FunctionAppRuntimes StackSettings { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs new file mode 100644 index 000000000000..9077c3cdc7bc --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs @@ -0,0 +1,193 @@ +// +// 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; + + /// + /// Function App runtime settings. + /// + public partial class FunctionAppRuntimeSettings + { + /// + /// Initializes a new instance of the FunctionAppRuntimeSettings class. + /// + public FunctionAppRuntimeSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FunctionAppRuntimeSettings class. + /// + /// Function App stack minor version + /// (runtime only). + /// <code>true</code> if + /// remote debugging is supported for the stack; otherwise, + /// <code>false</code>. + /// Application Insights settings + /// associated with the minor version. + /// GitHub Actions settings + /// associated with the minor version. + /// Application settings associated + /// with the minor version. + /// Configuration settings + /// associated with the minor version. + /// List of supported + /// Functions extension versions. + /// <code>true</code> if the stack + /// is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the + /// stack is deprecated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the stack + /// should be hidden; otherwise, + /// <code>false</code>. + /// End-of-life date for the minor + /// version. + /// <code>true</code> if the + /// stack version is auto-updated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the + /// minor version is early-access; otherwise, + /// <code>false</code>. + /// <code>true</code> if the minor + /// version the default; otherwise, + /// <code>false</code>. + public FunctionAppRuntimeSettings(string runtimeVersion = default(string), bool? remoteDebuggingSupported = default(bool?), AppInsightsWebAppStackSettings appInsightsSettings = default(AppInsightsWebAppStackSettings), GitHubActionWebAppStackSettings gitHubActionSettings = default(GitHubActionWebAppStackSettings), IDictionary appSettingsDictionary = default(IDictionary), SiteConfigPropertiesDictionary siteConfigPropertiesDictionary = default(SiteConfigPropertiesDictionary), IList supportedFunctionsExtensionVersions = default(IList), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?), bool? isDefault = default(bool?)) + { + RuntimeVersion = runtimeVersion; + RemoteDebuggingSupported = remoteDebuggingSupported; + AppInsightsSettings = appInsightsSettings; + GitHubActionSettings = gitHubActionSettings; + AppSettingsDictionary = appSettingsDictionary; + SiteConfigPropertiesDictionary = siteConfigPropertiesDictionary; + SupportedFunctionsExtensionVersions = supportedFunctionsExtensionVersions; + IsPreview = isPreview; + IsDeprecated = isDeprecated; + IsHidden = isHidden; + EndOfLifeDate = endOfLifeDate; + IsAutoUpdate = isAutoUpdate; + IsEarlyAccess = isEarlyAccess; + IsDefault = isDefault; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets function App stack minor version (runtime only). + /// + [JsonProperty(PropertyName = "runtimeVersion")] + public string RuntimeVersion { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if remote + /// debugging is supported for the stack; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "remoteDebuggingSupported")] + public bool? RemoteDebuggingSupported { get; private set; } + + /// + /// Gets application Insights settings associated with the minor + /// version. + /// + [JsonProperty(PropertyName = "appInsightsSettings")] + public AppInsightsWebAppStackSettings AppInsightsSettings { get; private set; } + + /// + /// Gets gitHub Actions settings associated with the minor version. + /// + [JsonProperty(PropertyName = "gitHubActionSettings")] + public GitHubActionWebAppStackSettings GitHubActionSettings { get; private set; } + + /// + /// Gets application settings associated with the minor version. + /// + [JsonProperty(PropertyName = "appSettingsDictionary")] + public IDictionary AppSettingsDictionary { get; private set; } + + /// + /// Gets configuration settings associated with the minor version. + /// + [JsonProperty(PropertyName = "siteConfigPropertiesDictionary")] + public SiteConfigPropertiesDictionary SiteConfigPropertiesDictionary { get; private set; } + + /// + /// Gets list of supported Functions extension versions. + /// + [JsonProperty(PropertyName = "supportedFunctionsExtensionVersions")] + public IList SupportedFunctionsExtensionVersions { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// in preview; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// deprecated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDeprecated")] + public bool? IsDeprecated { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// should be hidden; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; private set; } + + /// + /// Gets end-of-life date for the minor version. + /// + [JsonProperty(PropertyName = "endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// version is auto-updated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isAutoUpdate")] + public bool? IsAutoUpdate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the minor + /// version is early-access; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isEarlyAccess")] + public bool? IsEarlyAccess { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the minor + /// version the default; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDefault")] + public bool? IsDefault { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs new file mode 100644 index 000000000000..eab82eef40de --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs @@ -0,0 +1,61 @@ +// +// 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; + + /// + /// Function App stack runtimes. + /// + public partial class FunctionAppRuntimes + { + /// + /// Initializes a new instance of the FunctionAppRuntimes class. + /// + public FunctionAppRuntimes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FunctionAppRuntimes class. + /// + /// Linux-specific settings + /// associated with the minor version. + /// Windows-specific settings + /// associated with the minor version. + public FunctionAppRuntimes(FunctionAppRuntimeSettings linuxRuntimeSettings = default(FunctionAppRuntimeSettings), FunctionAppRuntimeSettings windowsRuntimeSettings = default(FunctionAppRuntimeSettings)) + { + LinuxRuntimeSettings = linuxRuntimeSettings; + WindowsRuntimeSettings = windowsRuntimeSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets linux-specific settings associated with the minor version. + /// + [JsonProperty(PropertyName = "linuxRuntimeSettings")] + public FunctionAppRuntimeSettings LinuxRuntimeSettings { get; private set; } + + /// + /// Gets windows-specific settings associated with the minor version. + /// + [JsonProperty(PropertyName = "windowsRuntimeSettings")] + public FunctionAppRuntimeSettings WindowsRuntimeSettings { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs new file mode 100644 index 000000000000..542801585fbf --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs @@ -0,0 +1,97 @@ +// +// 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; + + /// + /// Function App Stack. + /// + [Rest.Serialization.JsonTransformation] + public partial class FunctionAppStack : ProxyOnlyResource + { + /// + /// Initializes a new instance of the FunctionAppStack class. + /// + public FunctionAppStack() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FunctionAppStack class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Function App stack location. + /// Function App stack (display + /// only). + /// Function App stack name. + /// List of major versions + /// available. + /// Function App stack preferred OS. Possible + /// values include: 'Windows', 'Linux' + public FunctionAppStack(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string location = default(string), string displayText = default(string), string value = default(string), IList majorVersions = default(IList), StackPreferredOs? preferredOs = default(StackPreferredOs?)) + : base(id, name, kind, type) + { + Location = location; + DisplayText = displayText; + Value = value; + MajorVersions = majorVersions; + PreferredOs = preferredOs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets function App stack location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + /// + /// Gets function App stack (display only). + /// + [JsonProperty(PropertyName = "properties.displayText")] + public string DisplayText { get; private set; } + + /// + /// Gets function App stack name. + /// + [JsonProperty(PropertyName = "properties.value")] + public string Value { get; private set; } + + /// + /// Gets list of major versions available. + /// + [JsonProperty(PropertyName = "properties.majorVersions")] + public IList MajorVersions { get; private set; } + + /// + /// Gets function App stack preferred OS. Possible values include: + /// 'Windows', 'Linux' + /// + [JsonProperty(PropertyName = "properties.preferredOs")] + public StackPreferredOs? PreferredOs { get; private 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 8555c23b8f92..01a3ecabe7bb 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the GitHub provider. + /// [Rest.Serialization.JsonTransformation] public partial class GitHub : ProxyOnlyResource { @@ -33,6 +36,13 @@ public GitHub() /// 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>. + /// The configuration settings of the app + /// 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) { @@ -48,16 +58,22 @@ public GitHub() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// GitHub provider should not be enabled despite the set registration; + /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the configuration settings of the app registration for + /// the GitHub provider. /// [JsonProperty(PropertyName = "properties.registration")] public ClientRegistration Registration { get; set; } /// + /// Gets or sets the configuration settings of the login flow. /// [JsonProperty(PropertyName = "properties.login")] public LoginScopes Login { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs new file mode 100644 index 000000000000..6db239e1d461 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs @@ -0,0 +1,65 @@ +// +// 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; + + /// + /// The GitHub action code configuration. + /// + public partial class GitHubActionCodeConfiguration + { + /// + /// Initializes a new instance of the GitHubActionCodeConfiguration + /// class. + /// + public GitHubActionCodeConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GitHubActionCodeConfiguration + /// class. + /// + /// Runtime stack is used to determine the + /// workflow file content for code base apps. + /// Runtime version is used to determine + /// what build version to set in the workflow file. + public GitHubActionCodeConfiguration(string runtimeStack = default(string), string runtimeVersion = default(string)) + { + RuntimeStack = runtimeStack; + RuntimeVersion = runtimeVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets runtime stack is used to determine the workflow file + /// content for code base apps. + /// + [JsonProperty(PropertyName = "runtimeStack")] + public string RuntimeStack { get; set; } + + /// + /// Gets or sets runtime version is used to determine what build + /// version to set in the workflow file. + /// + [JsonProperty(PropertyName = "runtimeVersion")] + public string RuntimeVersion { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs new file mode 100644 index 000000000000..80fbadc40478 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs @@ -0,0 +1,82 @@ +// +// 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; + + /// + /// The GitHub action configuration. + /// + public partial class GitHubActionConfiguration + { + /// + /// Initializes a new instance of the GitHubActionConfiguration class. + /// + public GitHubActionConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GitHubActionConfiguration class. + /// + /// GitHub Action code + /// configuration. + /// GitHub Action container + /// configuration. + /// This will help determine the workflow + /// configuration to select. + /// Workflow option to determine + /// whether the workflow file should be generated and written to the + /// repository. + public GitHubActionConfiguration(GitHubActionCodeConfiguration codeConfiguration = default(GitHubActionCodeConfiguration), GitHubActionContainerConfiguration containerConfiguration = default(GitHubActionContainerConfiguration), bool? isLinux = default(bool?), bool? generateWorkflowFile = default(bool?)) + { + CodeConfiguration = codeConfiguration; + ContainerConfiguration = containerConfiguration; + IsLinux = isLinux; + GenerateWorkflowFile = generateWorkflowFile; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets gitHub Action code configuration. + /// + [JsonProperty(PropertyName = "codeConfiguration")] + public GitHubActionCodeConfiguration CodeConfiguration { get; set; } + + /// + /// Gets or sets gitHub Action container configuration. + /// + [JsonProperty(PropertyName = "containerConfiguration")] + public GitHubActionContainerConfiguration ContainerConfiguration { get; set; } + + /// + /// Gets or sets this will help determine the workflow configuration to + /// select. + /// + [JsonProperty(PropertyName = "isLinux")] + public bool? IsLinux { get; set; } + + /// + /// Gets or sets workflow option to determine whether the workflow file + /// should be generated and written to the repository. + /// + [JsonProperty(PropertyName = "generateWorkflowFile")] + public bool? GenerateWorkflowFile { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs new file mode 100644 index 000000000000..07b4058844c6 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs @@ -0,0 +1,83 @@ +// +// 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; + + /// + /// The GitHub action container configuration. + /// + public partial class GitHubActionContainerConfiguration + { + /// + /// Initializes a new instance of the + /// GitHubActionContainerConfiguration class. + /// + public GitHubActionContainerConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// GitHubActionContainerConfiguration class. + /// + /// The server URL for the container registry + /// where the build will be hosted. + /// The image name for the build. + /// The username used to upload the image to the + /// container registry. + /// The password used to upload the image to the + /// container registry. + public GitHubActionContainerConfiguration(string serverUrl = default(string), string imageName = default(string), string username = default(string), string password = default(string)) + { + ServerUrl = serverUrl; + ImageName = imageName; + Username = username; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the server URL for the container registry where the + /// build will be hosted. + /// + [JsonProperty(PropertyName = "serverUrl")] + public string ServerUrl { get; set; } + + /// + /// Gets or sets the image name for the build. + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets the username used to upload the image to the container + /// registry. + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Gets or sets the password used to upload the image to the container + /// registry. + /// + [JsonProperty(PropertyName = "password")] + public string Password { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.cs new file mode 100644 index 000000000000..6a49283cffe7 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.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.Linq; + + /// + /// GitHub Actions Web App stack settings. + /// + public partial class GitHubActionWebAppStackSettings + { + /// + /// Initializes a new instance of the GitHubActionWebAppStackSettings + /// class. + /// + public GitHubActionWebAppStackSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GitHubActionWebAppStackSettings + /// class. + /// + /// <code>true</code> if GitHub + /// Actions is supported for the stack; otherwise, + /// <code>false</code>. + /// The minor version that is supported + /// for GitHub Actions. + public GitHubActionWebAppStackSettings(bool? isSupported = default(bool?), string supportedVersion = default(string)) + { + IsSupported = isSupported; + SupportedVersion = supportedVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if GitHub + /// Actions is supported for the stack; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isSupported")] + public bool? IsSupported { get; private set; } + + /// + /// Gets the minor version that is supported for GitHub Actions. + /// + [JsonProperty(PropertyName = "supportedVersion")] + public string SupportedVersion { get; private 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 6e668cba711c..10a361a69831 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings that determines the validation flow of users + /// using App Service Authentication/Authorization. + /// [Rest.Serialization.JsonTransformation] public partial class GlobalValidation : ProxyOnlyResource { @@ -35,9 +39,20 @@ public GlobalValidation() /// Resource Name. /// Kind of resource. /// Resource type. - /// Possible values include: - /// 'RedirectToLoginPage', 'AllowAnonymous', 'Return401', - /// 'Return403' + /// <code>true</code> + /// if the authentication flow is required any request is made; + /// otherwise, <code>false</code>. + /// The action to take when + /// an unauthenticated client attempts to access the app. Possible + /// values include: 'RedirectToLoginPage', 'AllowAnonymous', + /// 'Return401', 'Return403' + /// The default authentication + /// provider to use when multiple providers are configured. + /// This setting is only needed if multiple providers are configured + /// and the unauthenticated client + /// 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) { @@ -54,23 +69,34 @@ public GlobalValidation() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the + /// authentication flow is required any request is made; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.requireAuthentication")] public bool? RequireAuthentication { get; set; } /// - /// Gets or sets possible values include: 'RedirectToLoginPage', - /// 'AllowAnonymous', 'Return401', 'Return403' + /// Gets or sets the action to take when an unauthenticated client + /// attempts to access the app. Possible values include: + /// 'RedirectToLoginPage', 'AllowAnonymous', 'Return401', 'Return403' /// [JsonProperty(PropertyName = "properties.unauthenticatedClientAction")] public UnauthenticatedClientActionV2? UnauthenticatedClientAction { get; set; } /// + /// Gets or sets the default authentication provider to use when + /// multiple providers are configured. + /// This setting is only needed if multiple providers are configured + /// and the unauthenticated client + /// action is set to "RedirectToLoginPage". /// [JsonProperty(PropertyName = "properties.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")] 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 26af1e210ab7..88a648867d73 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the Google provider. + /// [Rest.Serialization.JsonTransformation] public partial class Google : ProxyOnlyResource { @@ -33,6 +36,15 @@ public Google() /// 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>. + /// The configuration settings of the app + /// registration for the Google provider. + /// The configuration settings of the login + /// 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) { @@ -49,21 +61,29 @@ public Google() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// Google provider should not be enabled despite the set registration; + /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the configuration settings of the app registration for + /// the Google provider. /// [JsonProperty(PropertyName = "properties.registration")] public ClientRegistration Registration { get; set; } /// + /// Gets or sets the configuration settings of the login flow. /// [JsonProperty(PropertyName = "properties.login")] public LoginScopes Login { get; set; } /// + /// Gets or sets the configuration settings of the Azure Active + /// Directory token validation flow. /// [JsonProperty(PropertyName = "properties.validation")] public AllowedAudiencesValidation Validation { 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 b5090a80f932..e57e53390fcd 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 @@ -15,6 +15,11 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the HTTP requests for authentication and + /// authorization requests made against App Service + /// Authentication/Authorization. + /// [Rest.Serialization.JsonTransformation] public partial class HttpSettings : ProxyOnlyResource { @@ -33,6 +38,13 @@ public HttpSettings() /// 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>. + /// The configuration settings of the paths HTTP + /// 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) { @@ -48,16 +60,23 @@ public HttpSettings() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// authentication/authorization responses not having the HTTPS scheme + /// are permissible; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.requireHttps")] public bool? RequireHttps { get; set; } /// + /// Gets or sets the configuration settings of the paths HTTP requests. /// [JsonProperty(PropertyName = "properties.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")] 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 1c71deecd7f2..92ac617b5368 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the paths HTTP requests. + /// [Rest.Serialization.JsonTransformation] public partial class HttpSettingsRoutes : ProxyOnlyResource { @@ -33,6 +36,8 @@ public HttpSettingsRoutes() /// 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) { @@ -46,6 +51,8 @@ public HttpSettingsRoutes() partial void CustomInit(); /// + /// Gets or sets the prefix that should precede all the + /// authentication/authorization paths. /// [JsonProperty(PropertyName = "properties.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 25b7f98e559f..df08efecfb75 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of each of the identity providers used to + /// configure App Service Authentication/Authorization. + /// [Rest.Serialization.JsonTransformation] public partial class IdentityProviders : ProxyOnlyResource { @@ -35,7 +39,27 @@ public IdentityProviders() /// Resource Name. /// Kind of resource. /// Resource type. - 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)) + /// The configuration settings of + /// the Azure Active directory provider. + /// The configuration settings of the Facebook + /// provider. + /// The configuration settings of the GitHub + /// 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 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) { AzureActiveDirectory = azureActiveDirectory; @@ -44,6 +68,9 @@ public IdentityProviders() Google = google; Twitter = twitter; CustomOpenIdConnectProviders = customOpenIdConnectProviders; + LegacyMicrosoftAccount = legacyMicrosoftAccount; + Apple = apple; + AzureStaticWebApps = azureStaticWebApps; CustomInit(); } @@ -53,34 +80,63 @@ public IdentityProviders() partial void CustomInit(); /// + /// Gets or sets the configuration settings of the Azure Active + /// directory provider. /// [JsonProperty(PropertyName = "properties.azureActiveDirectory")] public AzureActiveDirectory AzureActiveDirectory { get; set; } /// + /// Gets or sets the configuration settings of the Facebook provider. /// [JsonProperty(PropertyName = "properties.facebook")] public Facebook Facebook { get; set; } /// + /// Gets or sets the configuration settings of the GitHub provider. /// [JsonProperty(PropertyName = "properties.gitHub")] public GitHub GitHub { get; set; } /// + /// Gets or sets the configuration settings of the Google provider. /// [JsonProperty(PropertyName = "properties.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")] + public LegacyMicrosoftAccount LegacyMicrosoftAccount { get; set; } + + /// + /// Gets or sets the configuration settings of the Apple provider. + /// + [JsonProperty(PropertyName = "properties.apple")] + public Apple Apple { get; set; } + + /// + /// Gets or sets the configuration settings of the Azure Static Web + /// Apps provider. + /// + [JsonProperty(PropertyName = "properties.azureStaticWebApps")] + public AzureStaticWebApps AzureStaticWebApps { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.cs new file mode 100644 index 000000000000..e625bc5841cd --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.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 Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for InsightStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum InsightStatus + { + [EnumMember(Value = "Critical")] + Critical, + [EnumMember(Value = "Warning")] + Warning, + [EnumMember(Value = "Info")] + Info, + [EnumMember(Value = "Success")] + Success, + [EnumMember(Value = "None")] + None + } + internal static class InsightStatusEnumExtension + { + internal static string ToSerializedValue(this InsightStatus? value) + { + return value == null ? null : ((InsightStatus)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this InsightStatus value) + { + switch( value ) + { + case InsightStatus.Critical: + return "Critical"; + case InsightStatus.Warning: + return "Warning"; + case InsightStatus.Info: + return "Info"; + case InsightStatus.Success: + return "Success"; + case InsightStatus.None: + return "None"; + } + return null; + } + + internal static InsightStatus? ParseInsightStatus(this string value) + { + switch( value ) + { + case "Critical": + return InsightStatus.Critical; + case "Warning": + return InsightStatus.Warning; + case "Info": + return InsightStatus.Info; + case "Success": + return InsightStatus.Success; + case "None": + return InsightStatus.None; + } + return null; + } + } +} 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 b6ac7bf567d9..509b9ba41405 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of the checks that should be made while + /// validating the JWT Claims. + /// [Rest.Serialization.JsonTransformation] public partial class JwtClaimChecks : ProxyOnlyResource { @@ -35,6 +39,9 @@ public JwtClaimChecks() /// 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) { @@ -49,11 +56,13 @@ public JwtClaimChecks() partial void CustomInit(); /// + /// Gets or sets the list of the allowed groups. /// [JsonProperty(PropertyName = "properties.allowedGroups")] public IList AllowedGroups { get; set; } /// + /// Gets or sets the list of the allowed client applications. /// [JsonProperty(PropertyName = "properties.allowedClientApplications")] public IList AllowedClientApplications { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs new file mode 100644 index 000000000000..bcad1cb1452e --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs @@ -0,0 +1,52 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class KeyValuePairStringObject + { + /// + /// Initializes a new instance of the KeyValuePairStringObject class. + /// + public KeyValuePairStringObject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyValuePairStringObject class. + /// + public KeyValuePairStringObject(string key = default(string), object value = default(object)) + { + Key = key; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; private 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 new file mode 100644 index 000000000000..4835a59eda11 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs @@ -0,0 +1,162 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A Kubernetes cluster specialized for web workloads by Azure App Service + /// + [Rest.Serialization.JsonTransformation] + public partial class KubeEnvironment : Resource + { + /// + /// Initializes a new instance of the KubeEnvironment class. + /// + public KubeEnvironment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KubeEnvironment class. + /// + /// Resource Location. + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Resource tags. + /// Provisioning state of the + /// Kubernetes Environment. Possible values include: 'Succeeded', + /// 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', + /// 'InfrastructureSetupInProgress', 'InfrastructureSetupComplete', + /// 'ScheduledForDelete', 'UpgradeRequested', 'UpgradeFailed' + /// Any errors that occurred during + /// deployment or deployment validation + /// Only visible within + /// Vnet/Subnet + /// Default Domain Name for the + /// cluster + /// Static IP of the KubeEnvironment + /// Cluster configuration which + /// determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// Cluster configuration which + /// enables the log daemon to export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + public KubeEnvironment(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), ExtendedLocation kubeEnvironmentPropertiesExtendedLocation = default(ExtendedLocation), KubeEnvironmentProvisioningState? provisioningState = default(KubeEnvironmentProvisioningState?), string deploymentErrors = default(string), bool? internalLoadBalancerEnabled = default(bool?), string defaultDomain = default(string), string staticIp = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), string aksResourceID = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation)) + : base(location, id, name, kind, type, tags) + { + KubeEnvironmentPropertiesExtendedLocation = kubeEnvironmentPropertiesExtendedLocation; + ProvisioningState = provisioningState; + DeploymentErrors = deploymentErrors; + InternalLoadBalancerEnabled = internalLoadBalancerEnabled; + DefaultDomain = defaultDomain; + StaticIp = staticIp; + ArcConfiguration = arcConfiguration; + AppLogsConfiguration = appLogsConfiguration; + AksResourceID = aksResourceID; + ExtendedLocation = extendedLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.extendedLocation")] + public ExtendedLocation KubeEnvironmentPropertiesExtendedLocation { get; set; } + + /// + /// Gets provisioning state of the Kubernetes Environment. Possible + /// values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', + /// 'InitializationInProgress', 'InfrastructureSetupInProgress', + /// 'InfrastructureSetupComplete', 'ScheduledForDelete', + /// 'UpgradeRequested', 'UpgradeFailed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public KubeEnvironmentProvisioningState? ProvisioningState { get; private set; } + + /// + /// Gets any errors that occurred during deployment or deployment + /// validation + /// + [JsonProperty(PropertyName = "properties.deploymentErrors")] + public string DeploymentErrors { get; private set; } + + /// + /// Gets or sets only visible within Vnet/Subnet + /// + [JsonProperty(PropertyName = "properties.internalLoadBalancerEnabled")] + public bool? InternalLoadBalancerEnabled { get; set; } + + /// + /// Gets default Domain Name for the cluster + /// + [JsonProperty(PropertyName = "properties.defaultDomain")] + public string DefaultDomain { get; private set; } + + /// + /// Gets or sets static IP of the KubeEnvironment + /// + [JsonProperty(PropertyName = "properties.staticIp")] + public string StaticIp { get; set; } + + /// + /// Gets or sets cluster configuration which determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// + [JsonProperty(PropertyName = "properties.arcConfiguration")] + public ArcConfiguration ArcConfiguration { get; set; } + + /// + /// Gets or sets cluster configuration which enables the log daemon to + /// export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + /// + [JsonProperty(PropertyName = "properties.appLogsConfiguration")] + public AppLogsConfiguration AppLogsConfiguration { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.aksResourceID")] + public string AksResourceID { get; set; } + + /// + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs new file mode 100644 index 000000000000..735f7a228196 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs @@ -0,0 +1,144 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ARM resource for a KubeEnvironment when patching + /// + [Rest.Serialization.JsonTransformation] + public partial class KubeEnvironmentPatchResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the KubeEnvironmentPatchResource + /// class. + /// + public KubeEnvironmentPatchResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KubeEnvironmentPatchResource + /// class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Provisioning state of the + /// Kubernetes Environment. Possible values include: 'Succeeded', + /// 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', + /// 'InfrastructureSetupInProgress', 'InfrastructureSetupComplete', + /// 'ScheduledForDelete', 'UpgradeRequested', 'UpgradeFailed' + /// Any errors that occurred during + /// deployment or deployment validation + /// Only visible within + /// Vnet/Subnet + /// Default Domain Name for the + /// cluster + /// Static IP of the KubeEnvironment + /// Cluster configuration which + /// determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// Cluster configuration which + /// enables the log daemon to export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + public KubeEnvironmentPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), KubeEnvironmentProvisioningState? provisioningState = default(KubeEnvironmentProvisioningState?), string deploymentErrors = default(string), bool? internalLoadBalancerEnabled = default(bool?), string defaultDomain = default(string), string staticIp = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), string aksResourceID = default(string)) + : base(id, name, kind, type) + { + ExtendedLocation = extendedLocation; + ProvisioningState = provisioningState; + DeploymentErrors = deploymentErrors; + InternalLoadBalancerEnabled = internalLoadBalancerEnabled; + DefaultDomain = defaultDomain; + StaticIp = staticIp; + ArcConfiguration = arcConfiguration; + AppLogsConfiguration = appLogsConfiguration; + AksResourceID = aksResourceID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + + /// + /// Gets provisioning state of the Kubernetes Environment. Possible + /// values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', + /// 'InitializationInProgress', 'InfrastructureSetupInProgress', + /// 'InfrastructureSetupComplete', 'ScheduledForDelete', + /// 'UpgradeRequested', 'UpgradeFailed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public KubeEnvironmentProvisioningState? ProvisioningState { get; private set; } + + /// + /// Gets any errors that occurred during deployment or deployment + /// validation + /// + [JsonProperty(PropertyName = "properties.deploymentErrors")] + public string DeploymentErrors { get; private set; } + + /// + /// Gets or sets only visible within Vnet/Subnet + /// + [JsonProperty(PropertyName = "properties.internalLoadBalancerEnabled")] + public bool? InternalLoadBalancerEnabled { get; set; } + + /// + /// Gets default Domain Name for the cluster + /// + [JsonProperty(PropertyName = "properties.defaultDomain")] + public string DefaultDomain { get; private set; } + + /// + /// Gets or sets static IP of the KubeEnvironment + /// + [JsonProperty(PropertyName = "properties.staticIp")] + public string StaticIp { get; set; } + + /// + /// Gets or sets cluster configuration which determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// + [JsonProperty(PropertyName = "properties.arcConfiguration")] + public ArcConfiguration ArcConfiguration { get; set; } + + /// + /// Gets or sets cluster configuration which enables the log daemon to + /// export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + /// + [JsonProperty(PropertyName = "properties.appLogsConfiguration")] + public AppLogsConfiguration AppLogsConfiguration { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.aksResourceID")] + public string AksResourceID { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs new file mode 100644 index 000000000000..9153aca339a0 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs @@ -0,0 +1,68 @@ +// +// 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; + + /// + /// Specification for a Kubernetes Environment to use for this resource. + /// + public partial class KubeEnvironmentProfile + { + /// + /// Initializes a new instance of the KubeEnvironmentProfile class. + /// + public KubeEnvironmentProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KubeEnvironmentProfile class. + /// + /// Resource ID of the Kubernetes Environment. + /// Name of the Kubernetes Environment. + /// Resource type of the Kubernetes + /// Environment. + public KubeEnvironmentProfile(string id = default(string), string name = default(string), string type = default(string)) + { + Id = id; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource ID of the Kubernetes Environment. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets name of the Kubernetes Environment. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type of the Kubernetes Environment. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs new file mode 100644 index 000000000000..46249dd6048b --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for KubeEnvironmentProvisioningState. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KubeEnvironmentProvisioningState + { + [EnumMember(Value = "Succeeded")] + Succeeded, + [EnumMember(Value = "Failed")] + Failed, + [EnumMember(Value = "Canceled")] + Canceled, + [EnumMember(Value = "Waiting")] + Waiting, + [EnumMember(Value = "InitializationInProgress")] + InitializationInProgress, + [EnumMember(Value = "InfrastructureSetupInProgress")] + InfrastructureSetupInProgress, + [EnumMember(Value = "InfrastructureSetupComplete")] + InfrastructureSetupComplete, + [EnumMember(Value = "ScheduledForDelete")] + ScheduledForDelete, + [EnumMember(Value = "UpgradeRequested")] + UpgradeRequested, + [EnumMember(Value = "UpgradeFailed")] + UpgradeFailed + } + internal static class KubeEnvironmentProvisioningStateEnumExtension + { + internal static string ToSerializedValue(this KubeEnvironmentProvisioningState? value) + { + return value == null ? null : ((KubeEnvironmentProvisioningState)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this KubeEnvironmentProvisioningState value) + { + switch( value ) + { + case KubeEnvironmentProvisioningState.Succeeded: + return "Succeeded"; + case KubeEnvironmentProvisioningState.Failed: + return "Failed"; + case KubeEnvironmentProvisioningState.Canceled: + return "Canceled"; + case KubeEnvironmentProvisioningState.Waiting: + return "Waiting"; + case KubeEnvironmentProvisioningState.InitializationInProgress: + return "InitializationInProgress"; + case KubeEnvironmentProvisioningState.InfrastructureSetupInProgress: + return "InfrastructureSetupInProgress"; + case KubeEnvironmentProvisioningState.InfrastructureSetupComplete: + return "InfrastructureSetupComplete"; + case KubeEnvironmentProvisioningState.ScheduledForDelete: + return "ScheduledForDelete"; + case KubeEnvironmentProvisioningState.UpgradeRequested: + return "UpgradeRequested"; + case KubeEnvironmentProvisioningState.UpgradeFailed: + return "UpgradeFailed"; + } + return null; + } + + internal static KubeEnvironmentProvisioningState? ParseKubeEnvironmentProvisioningState(this string value) + { + switch( value ) + { + case "Succeeded": + return KubeEnvironmentProvisioningState.Succeeded; + case "Failed": + return KubeEnvironmentProvisioningState.Failed; + case "Canceled": + return KubeEnvironmentProvisioningState.Canceled; + case "Waiting": + return KubeEnvironmentProvisioningState.Waiting; + case "InitializationInProgress": + return KubeEnvironmentProvisioningState.InitializationInProgress; + case "InfrastructureSetupInProgress": + return KubeEnvironmentProvisioningState.InfrastructureSetupInProgress; + case "InfrastructureSetupComplete": + return KubeEnvironmentProvisioningState.InfrastructureSetupComplete; + case "ScheduledForDelete": + return KubeEnvironmentProvisioningState.ScheduledForDelete; + case "UpgradeRequested": + return KubeEnvironmentProvisioningState.UpgradeRequested; + case "UpgradeFailed": + return KubeEnvironmentProvisioningState.UpgradeFailed; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs new file mode 100644 index 000000000000..44d19dd1bcfe --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.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 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 + { + /// + /// Initializes a new instance of the LegacyMicrosoftAccount class. + /// + public LegacyMicrosoftAccount() + { + CustomInit(); + } + + /// + /// 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>. + /// The configuration settings of the app + /// registration for the legacy Microsoft Account provider. + /// The configuration settings of the login + /// 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) + { + Enabled = enabled; + Registration = registration; + Login = login; + Validation = validation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// legacy Microsoft Account provider should not be enabled despite the + /// set registration; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.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")] + public ClientRegistration Registration { get; set; } + + /// + /// Gets or sets the configuration settings of the login flow. + /// + [JsonProperty(PropertyName = "properties.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")] + public AllowedAudiencesValidation Validation { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs new file mode 100644 index 000000000000..7abd94c002c7 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs @@ -0,0 +1,127 @@ +// +// 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; + + /// + /// Linux Java Container settings. + /// + public partial class LinuxJavaContainerSettings + { + /// + /// Initializes a new instance of the LinuxJavaContainerSettings class. + /// + public LinuxJavaContainerSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinuxJavaContainerSettings class. + /// + /// Java 11 version (runtime only). + /// Java 8 version (runtime only). + /// <code>true</code> if the stack + /// is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the + /// stack is deprecated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the stack + /// should be hidden; otherwise, + /// <code>false</code>. + /// End-of-life date for the minor + /// version. + /// <code>true</code> if the + /// stack version is auto-updated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the + /// minor version is early-access; otherwise, + /// <code>false</code>. + public LinuxJavaContainerSettings(string java11Runtime = default(string), string java8Runtime = default(string), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) + { + Java11Runtime = java11Runtime; + Java8Runtime = java8Runtime; + IsPreview = isPreview; + IsDeprecated = isDeprecated; + IsHidden = isHidden; + EndOfLifeDate = endOfLifeDate; + IsAutoUpdate = isAutoUpdate; + IsEarlyAccess = isEarlyAccess; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets java 11 version (runtime only). + /// + [JsonProperty(PropertyName = "java11Runtime")] + public string Java11Runtime { get; private set; } + + /// + /// Gets java 8 version (runtime only). + /// + [JsonProperty(PropertyName = "java8Runtime")] + public string Java8Runtime { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// in preview; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// deprecated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDeprecated")] + public bool? IsDeprecated { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// should be hidden; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; private set; } + + /// + /// Gets end-of-life date for the minor version. + /// + [JsonProperty(PropertyName = "endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// version is auto-updated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isAutoUpdate")] + public bool? IsAutoUpdate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the minor + /// version is early-access; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isEarlyAccess")] + public bool? IsEarlyAccess { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs index a4a9f849e4f9..b635569ca214 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs @@ -19,6 +19,6 @@ public static class LoadBalancingMode public const string None = "None"; public const string Web = "Web"; public const string Publishing = "Publishing"; - public const string WebPublishing = "Web,Publishing"; + public const string WebPublishing = "Web, Publishing"; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs new file mode 100644 index 000000000000..c2a3350d2da9 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs @@ -0,0 +1,52 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class LogAnalyticsConfiguration + { + /// + /// Initializes a new instance of the LogAnalyticsConfiguration class. + /// + public LogAnalyticsConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogAnalyticsConfiguration class. + /// + public LogAnalyticsConfiguration(string customerId = default(string), string sharedKey = default(string)) + { + CustomerId = customerId; + SharedKey = sharedKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "customerId")] + public string CustomerId { get; set; } + + /// + /// + [JsonProperty(PropertyName = "sharedKey")] + public string SharedKey { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs index d14e1bc90117..f88dd3ce8e9b 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of the login flow of users using App Service + /// Authentication/Authorization. + /// [Rest.Serialization.JsonTransformation] public partial class Login : ProxyOnlyResource { @@ -35,6 +39,25 @@ public Login() /// 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 + /// store. + /// <code>true</code> + /// if the fragments from the request are preserved after the login + /// request is made; otherwise, <code>false</code>. + /// External URLs that can be + /// redirected to as part of logging in or logging out of the app. Note + /// that the query string part of the URL is ignored. + /// This is an advanced setting typically only needed by Windows Store + /// application backends. + /// Note that URLs within the current domain are always implicitly + /// allowed. + /// The configuration settings of the + /// 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) { @@ -53,31 +76,48 @@ public Login() partial void CustomInit(); /// + /// Gets or sets the routes that specify the endpoints used for login + /// and logout requests. /// [JsonProperty(PropertyName = "properties.routes")] public LoginRoutes Routes { get; set; } /// + /// Gets or sets the configuration settings of the token store. /// [JsonProperty(PropertyName = "properties.tokenStore")] public TokenStore TokenStore { get; set; } /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the + /// fragments from the request are preserved after the login request is + /// made; otherwise, &lt;code&gt;false&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.preserveUrlFragmentsForLogins")] public bool? PreserveUrlFragmentsForLogins { get; set; } /// + /// Gets or sets external URLs that can be redirected to as part of + /// logging in or logging out of the app. Note that the query string + /// part of the URL is ignored. + /// This is an advanced setting typically only needed by Windows Store + /// application backends. + /// Note that URLs within the current domain are always implicitly + /// allowed. /// [JsonProperty(PropertyName = "properties.allowedExternalRedirectUrls")] public IList AllowedExternalRedirectUrls { get; set; } /// + /// Gets or sets the configuration settings of the session cookie's + /// expiration. /// [JsonProperty(PropertyName = "properties.cookieExpiration")] public CookieExpiration CookieExpiration { get; set; } /// + /// Gets or sets the configuration settings of the nonce used in the + /// login flow. /// [JsonProperty(PropertyName = "properties.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 9b31fe5653bb..34b86a866e14 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The routes that specify the endpoints used for login and logout + /// requests. + /// [Rest.Serialization.JsonTransformation] public partial class LoginRoutes : ProxyOnlyResource { @@ -33,6 +37,8 @@ public LoginRoutes() /// 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) { @@ -46,6 +52,7 @@ public LoginRoutes() partial void CustomInit(); /// + /// Gets or sets the endpoint at which a logout request should be made. /// [JsonProperty(PropertyName = "properties.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 ec2430e910eb..6c64485bc850 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of the login flow, including the scopes that + /// should be requested. + /// [Rest.Serialization.JsonTransformation] public partial class LoginScopes : ProxyOnlyResource { @@ -35,6 +39,8 @@ public LoginScopes() /// 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) { @@ -48,6 +54,8 @@ public LoginScopes() partial void CustomInit(); /// + /// Gets or sets a list of the scopes that should be requested while + /// authenticating. /// [JsonProperty(PropertyName = "properties.scopes")] public IList Scopes { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkAccessControlEntry.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkAccessControlEntry.cs deleted file mode 100644 index a09d92546938..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkAccessControlEntry.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Network access control entry. - /// - public partial class NetworkAccessControlEntry - { - /// - /// Initializes a new instance of the NetworkAccessControlEntry class. - /// - public NetworkAccessControlEntry() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NetworkAccessControlEntry class. - /// - /// Action object. Possible values include: - /// 'Permit', 'Deny' - /// Description of network access control - /// entry. - /// Order of precedence. - /// Remote subnet. - public NetworkAccessControlEntry(AccessControlEntryAction? action = default(AccessControlEntryAction?), string description = default(string), int? order = default(int?), string remoteSubnet = default(string)) - { - Action = action; - Description = description; - Order = order; - RemoteSubnet = remoteSubnet; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets action object. Possible values include: 'Permit', - /// 'Deny' - /// - [JsonProperty(PropertyName = "action")] - public AccessControlEntryAction? Action { get; set; } - - /// - /// Gets or sets description of network access control entry. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets order of precedence. - /// - [JsonProperty(PropertyName = "order")] - public int? Order { get; set; } - - /// - /// Gets or sets remote subnet. - /// - [JsonProperty(PropertyName = "remoteSubnet")] - public string RemoteSubnet { 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 0057825eab8b..97bf46e1c018 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models 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 { @@ -33,6 +36,11 @@ public Nonce() /// 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) { @@ -47,11 +55,16 @@ public Nonce() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// nonce should not be validated while completing the login flow; + /// otherwise, &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.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")] 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 c0ce182af5cf..18a8ac948d82 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The authentication client credentials of the custom Open ID Connect + /// provider. + /// [Rest.Serialization.JsonTransformation] public partial class OpenIdConnectClientCredential : ProxyOnlyResource { @@ -35,8 +39,10 @@ public OpenIdConnectClientCredential() /// Resource Name. /// Kind of resource. /// Resource type. - /// Possible values include: - /// 'ClientSecretPost' + /// 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) { @@ -51,12 +57,15 @@ public OpenIdConnectClientCredential() partial void CustomInit(); /// - /// Gets or sets possible values include: 'ClientSecretPost' + /// Gets or sets the method that should be used to authenticate the + /// user. Possible values include: 'ClientSecretPost' /// [JsonProperty(PropertyName = "properties.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")] 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 fe09ee1f099d..70fddef9457a 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the endpoints used for the custom Open ID + /// Connect provider. + /// [Rest.Serialization.JsonTransformation] public partial class OpenIdConnectConfig : ProxyOnlyResource { @@ -33,6 +37,15 @@ public OpenIdConnectConfig() /// 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 + /// token. + /// The endpoint that issues the token. + /// The endpoint that provides the keys + /// 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) { @@ -50,26 +63,34 @@ public OpenIdConnectConfig() partial void CustomInit(); /// + /// Gets or sets the endpoint to be used to make an authorization + /// request. /// [JsonProperty(PropertyName = "properties.authorizationEndpoint")] public string AuthorizationEndpoint { get; set; } /// + /// Gets or sets the endpoint to be used to request a token. /// [JsonProperty(PropertyName = "properties.tokenEndpoint")] public string TokenEndpoint { get; set; } /// + /// Gets or sets the endpoint that issues the token. /// [JsonProperty(PropertyName = "properties.issuer")] public string Issuer { get; set; } /// + /// Gets or sets the endpoint that provides the keys necessary to + /// validate the token. /// [JsonProperty(PropertyName = "properties.certificationUri")] public string CertificationUri { get; set; } /// + /// Gets or sets the endpoint that contains all the configuration + /// endpoints for the provider. /// [JsonProperty(PropertyName = "properties.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 cc0fe8682df0..cc9c4fecabc8 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 @@ -17,6 +17,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using System.Collections.Generic; using System.Linq; + /// + /// The configuration settings of the login flow of the custom Open ID + /// Connect provider. + /// [Rest.Serialization.JsonTransformation] public partial class OpenIdConnectLogin : ProxyOnlyResource { @@ -35,6 +39,10 @@ public OpenIdConnectLogin() /// 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) { @@ -49,11 +57,14 @@ public OpenIdConnectLogin() partial void CustomInit(); /// + /// Gets or sets the name of the claim that contains the users name. /// [JsonProperty(PropertyName = "properties.nameClaimType")] public string NameClaimType { get; set; } /// + /// Gets or sets a list of the scopes that should be requested while + /// authenticating. /// [JsonProperty(PropertyName = "properties.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 810737d9830a..f9ae80692d1a 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the app registration for the custom Open + /// ID Connect provider. + /// [Rest.Serialization.JsonTransformation] public partial class OpenIdConnectRegistration : ProxyOnlyResource { @@ -33,6 +37,13 @@ public OpenIdConnectRegistration() /// Resource Name. /// Kind of resource. /// Resource type. + /// The client id of the custom Open ID Connect + /// provider. + /// The authentication credentials of + /// the custom Open ID Connect provider. + /// 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) { @@ -48,16 +59,21 @@ public OpenIdConnectRegistration() partial void CustomInit(); /// + /// Gets or sets the client id of the custom Open ID Connect provider. /// [JsonProperty(PropertyName = "properties.clientId")] public string ClientId { get; set; } /// + /// Gets or sets the authentication credentials of the custom Open ID + /// Connect provider. /// [JsonProperty(PropertyName = "properties.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")] public OpenIdConnectConfig OpenIdConnectConfiguration { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.cs new file mode 100644 index 000000000000..eeffe769f026 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.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; + + /// + /// Result for utterances query. + /// + public partial class QueryUtterancesResult + { + /// + /// Initializes a new instance of the QueryUtterancesResult class. + /// + public QueryUtterancesResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QueryUtterancesResult class. + /// + /// A sample utterance. + /// Score of a sample utterance. + public QueryUtterancesResult(SampleUtterance sampleUtterance = default(SampleUtterance), double? score = default(double?)) + { + SampleUtterance = sampleUtterance; + Score = score; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a sample utterance. + /// + [JsonProperty(PropertyName = "sampleUtterance")] + public SampleUtterance SampleUtterance { get; set; } + + /// + /// Gets or sets score of a sample utterance. + /// + [JsonProperty(PropertyName = "score")] + public double? Score { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.cs new file mode 100644 index 000000000000..9d352753d920 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Suggested utterances where the detector can be applicable + /// + public partial class QueryUtterancesResults + { + /// + /// Initializes a new instance of the QueryUtterancesResults class. + /// + public QueryUtterancesResults() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QueryUtterancesResults class. + /// + /// Search Query. + /// Array of utterance results for search + /// query. + public QueryUtterancesResults(string query = default(string), IList results = default(IList)) + { + Query = query; + Results = results; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets search Query. + /// + [JsonProperty(PropertyName = "query")] + public string Query { get; set; } + + /// + /// Gets or sets array of utterance results for search query. + /// + [JsonProperty(PropertyName = "results")] + public IList Results { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateEndpointConnectionResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs similarity index 64% rename from sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateEndpointConnectionResource.cs rename to sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs index 2785fb08e062..e2e9a33b6d78 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateEndpointConnectionResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs @@ -13,25 +13,27 @@ 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; /// - /// Private Endpoint Connection ARM resource. + /// A remote private endpoint connection /// [Rest.Serialization.JsonTransformation] - public partial class PrivateEndpointConnectionResource : ProxyOnlyResource + public partial class RemotePrivateEndpointConnection : ProxyOnlyResource { /// - /// Initializes a new instance of the PrivateEndpointConnectionResource + /// Initializes a new instance of the RemotePrivateEndpointConnection /// class. /// - public PrivateEndpointConnectionResource() + public RemotePrivateEndpointConnection() { CustomInit(); } /// - /// Initializes a new instance of the PrivateEndpointConnectionResource + /// Initializes a new instance of the RemotePrivateEndpointConnection /// class. /// /// Resource Id. @@ -40,12 +42,15 @@ public PrivateEndpointConnectionResource() /// Resource type. /// PrivateEndpoint of a remote private /// endpoint connection - public PrivateEndpointConnectionResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string provisioningState = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState)) + /// Private IPAddresses mapped to the remote + /// private endpoint + public RemotePrivateEndpointConnection(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string provisioningState = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState), IList ipAddresses = default(IList)) : base(id, name, kind, type) { ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + IpAddresses = ipAddresses; CustomInit(); } @@ -71,5 +76,12 @@ public PrivateEndpointConnectionResource() [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } + /// + /// Gets or sets private IPAddresses mapped to the remote private + /// endpoint + /// + [JsonProperty(PropertyName = "properties.ipAddresses")] + public IList IpAddresses { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs new file mode 100644 index 000000000000..0d506eacfa07 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs @@ -0,0 +1,87 @@ +// +// 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; + + /// + /// Remote Private Endpoint Connection ARM resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class RemotePrivateEndpointConnectionARMResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the + /// RemotePrivateEndpointConnectionARMResource class. + /// + public RemotePrivateEndpointConnectionARMResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RemotePrivateEndpointConnectionARMResource class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// PrivateEndpoint of a remote private + /// endpoint connection + /// Private IPAddresses mapped to the remote + /// private endpoint + public RemotePrivateEndpointConnectionARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string provisioningState = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState), IList ipAddresses = default(IList)) + : base(id, name, kind, type) + { + ProvisioningState = provisioningState; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + IpAddresses = ipAddresses; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets privateEndpoint of a remote private endpoint + /// connection + /// + [JsonProperty(PropertyName = "properties.privateEndpoint")] + public ArmIdWrapper PrivateEndpoint { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] + public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } + + /// + /// Gets or sets private IPAddresses mapped to the remote private + /// endpoint + /// + [JsonProperty(PropertyName = "properties.ipAddresses")] + public IList IpAddresses { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs index 8080fa872330..b9628aacb6f1 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs @@ -30,7 +30,12 @@ public Rendering() /// Initializes a new instance of the Rendering class. /// /// Rendering Type. Possible values include: - /// 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance' + /// 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance', + /// 'PieChart', 'DataSummary', 'Email', 'Insights', 'DynamicInsight', + /// 'Markdown', 'Detector', 'DropDown', 'Card', 'Solution', 'Guage', + /// 'Form', 'ChangeSets', 'ChangeAnalysisOnboarding', 'ChangesView', + /// 'AppInsight', 'DependencyGraph', 'DownTime', 'SummaryCard', + /// 'SearchComponent', 'AppInsightEnablement' /// Title of data /// Description of the data that will help it /// be interpreted @@ -49,7 +54,12 @@ public Rendering() /// /// Gets or sets rendering Type. Possible values include: 'NoGraph', - /// 'Table', 'TimeSeries', 'TimeSeriesPerInstance' + /// 'Table', 'TimeSeries', 'TimeSeriesPerInstance', 'PieChart', + /// 'DataSummary', 'Email', 'Insights', 'DynamicInsight', 'Markdown', + /// 'Detector', 'DropDown', 'Card', 'Solution', 'Guage', 'Form', + /// 'ChangeSets', 'ChangeAnalysisOnboarding', 'ChangesView', + /// 'AppInsight', 'DependencyGraph', 'DownTime', 'SummaryCard', + /// 'SearchComponent', 'AppInsightEnablement' /// [JsonProperty(PropertyName = "type")] public RenderingType? Type { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs index bf0ebdff16f5..727d7df75757 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs @@ -28,7 +28,49 @@ public enum RenderingType [EnumMember(Value = "TimeSeries")] TimeSeries, [EnumMember(Value = "TimeSeriesPerInstance")] - TimeSeriesPerInstance + TimeSeriesPerInstance, + [EnumMember(Value = "PieChart")] + PieChart, + [EnumMember(Value = "DataSummary")] + DataSummary, + [EnumMember(Value = "Email")] + Email, + [EnumMember(Value = "Insights")] + Insights, + [EnumMember(Value = "DynamicInsight")] + DynamicInsight, + [EnumMember(Value = "Markdown")] + Markdown, + [EnumMember(Value = "Detector")] + Detector, + [EnumMember(Value = "DropDown")] + DropDown, + [EnumMember(Value = "Card")] + Card, + [EnumMember(Value = "Solution")] + Solution, + [EnumMember(Value = "Guage")] + Guage, + [EnumMember(Value = "Form")] + Form, + [EnumMember(Value = "ChangeSets")] + ChangeSets, + [EnumMember(Value = "ChangeAnalysisOnboarding")] + ChangeAnalysisOnboarding, + [EnumMember(Value = "ChangesView")] + ChangesView, + [EnumMember(Value = "AppInsight")] + AppInsight, + [EnumMember(Value = "DependencyGraph")] + DependencyGraph, + [EnumMember(Value = "DownTime")] + DownTime, + [EnumMember(Value = "SummaryCard")] + SummaryCard, + [EnumMember(Value = "SearchComponent")] + SearchComponent, + [EnumMember(Value = "AppInsightEnablement")] + AppInsightEnablement } internal static class RenderingTypeEnumExtension { @@ -49,6 +91,48 @@ internal static string ToSerializedValue(this RenderingType value) return "TimeSeries"; case RenderingType.TimeSeriesPerInstance: return "TimeSeriesPerInstance"; + case RenderingType.PieChart: + return "PieChart"; + case RenderingType.DataSummary: + return "DataSummary"; + case RenderingType.Email: + return "Email"; + case RenderingType.Insights: + return "Insights"; + case RenderingType.DynamicInsight: + return "DynamicInsight"; + case RenderingType.Markdown: + return "Markdown"; + case RenderingType.Detector: + return "Detector"; + case RenderingType.DropDown: + return "DropDown"; + case RenderingType.Card: + return "Card"; + case RenderingType.Solution: + return "Solution"; + case RenderingType.Guage: + return "Guage"; + case RenderingType.Form: + return "Form"; + case RenderingType.ChangeSets: + return "ChangeSets"; + case RenderingType.ChangeAnalysisOnboarding: + return "ChangeAnalysisOnboarding"; + case RenderingType.ChangesView: + return "ChangesView"; + case RenderingType.AppInsight: + return "AppInsight"; + case RenderingType.DependencyGraph: + return "DependencyGraph"; + case RenderingType.DownTime: + return "DownTime"; + case RenderingType.SummaryCard: + return "SummaryCard"; + case RenderingType.SearchComponent: + return "SearchComponent"; + case RenderingType.AppInsightEnablement: + return "AppInsightEnablement"; } return null; } @@ -65,6 +149,48 @@ internal static string ToSerializedValue(this RenderingType value) return RenderingType.TimeSeries; case "TimeSeriesPerInstance": return RenderingType.TimeSeriesPerInstance; + case "PieChart": + return RenderingType.PieChart; + case "DataSummary": + return RenderingType.DataSummary; + case "Email": + return RenderingType.Email; + case "Insights": + return RenderingType.Insights; + case "DynamicInsight": + return RenderingType.DynamicInsight; + case "Markdown": + return RenderingType.Markdown; + case "Detector": + return RenderingType.Detector; + case "DropDown": + return RenderingType.DropDown; + case "Card": + return RenderingType.Card; + case "Solution": + return RenderingType.Solution; + case "Guage": + return RenderingType.Guage; + case "Form": + return RenderingType.Form; + case "ChangeSets": + return RenderingType.ChangeSets; + case "ChangeAnalysisOnboarding": + return RenderingType.ChangeAnalysisOnboarding; + case "ChangesView": + return RenderingType.ChangesView; + case "AppInsight": + return RenderingType.AppInsight; + case "DependencyGraph": + return RenderingType.DependencyGraph; + case "DownTime": + return RenderingType.DownTime; + case "SummaryCard": + return RenderingType.SummaryCard; + case "SearchComponent": + return RenderingType.SearchComponent; + case "AppInsightEnablement": + return RenderingType.AppInsightEnablement; } return null; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs new file mode 100644 index 000000000000..a83588884f36 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs @@ -0,0 +1,114 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ResolveStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ResolveStatus + { + [EnumMember(Value = "Initialized")] + Initialized, + [EnumMember(Value = "Resolved")] + Resolved, + [EnumMember(Value = "InvalidSyntax")] + InvalidSyntax, + [EnumMember(Value = "MSINotEnabled")] + MSINotEnabled, + [EnumMember(Value = "VaultNotFound")] + VaultNotFound, + [EnumMember(Value = "SecretNotFound")] + SecretNotFound, + [EnumMember(Value = "SecretVersionNotFound")] + SecretVersionNotFound, + [EnumMember(Value = "AccessToKeyVaultDenied")] + AccessToKeyVaultDenied, + [EnumMember(Value = "OtherReasons")] + OtherReasons, + [EnumMember(Value = "FetchTimedOut")] + FetchTimedOut, + [EnumMember(Value = "UnauthorizedClient")] + UnauthorizedClient + } + internal static class ResolveStatusEnumExtension + { + internal static string ToSerializedValue(this ResolveStatus? value) + { + return value == null ? null : ((ResolveStatus)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this ResolveStatus value) + { + switch( value ) + { + case ResolveStatus.Initialized: + return "Initialized"; + case ResolveStatus.Resolved: + return "Resolved"; + case ResolveStatus.InvalidSyntax: + return "InvalidSyntax"; + case ResolveStatus.MSINotEnabled: + return "MSINotEnabled"; + case ResolveStatus.VaultNotFound: + return "VaultNotFound"; + case ResolveStatus.SecretNotFound: + return "SecretNotFound"; + case ResolveStatus.SecretVersionNotFound: + return "SecretVersionNotFound"; + case ResolveStatus.AccessToKeyVaultDenied: + return "AccessToKeyVaultDenied"; + case ResolveStatus.OtherReasons: + return "OtherReasons"; + case ResolveStatus.FetchTimedOut: + return "FetchTimedOut"; + case ResolveStatus.UnauthorizedClient: + return "UnauthorizedClient"; + } + return null; + } + + internal static ResolveStatus? ParseResolveStatus(this string value) + { + switch( value ) + { + case "Initialized": + return ResolveStatus.Initialized; + case "Resolved": + return ResolveStatus.Resolved; + case "InvalidSyntax": + return ResolveStatus.InvalidSyntax; + case "MSINotEnabled": + return ResolveStatus.MSINotEnabled; + case "VaultNotFound": + return ResolveStatus.VaultNotFound; + case "SecretNotFound": + return ResolveStatus.SecretNotFound; + case "SecretVersionNotFound": + return ResolveStatus.SecretVersionNotFound; + case "AccessToKeyVaultDenied": + return ResolveStatus.AccessToKeyVaultDenied; + case "OtherReasons": + return ResolveStatus.OtherReasons; + case "FetchTimedOut": + return ResolveStatus.FetchTimedOut; + case "UnauthorizedClient": + return ResolveStatus.UnauthorizedClient; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs new file mode 100644 index 000000000000..9626aeccc566 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -0,0 +1,158 @@ +// +// 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; + + /// + /// Message envelope that contains the common Azure resource manager + /// properties and the resource provider specific content. + /// + public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection + { + /// + /// Initializes a new instance of the + /// ResponseMessageEnvelopeRemotePrivateEndpointConnection class. + /// + public ResponseMessageEnvelopeRemotePrivateEndpointConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ResponseMessageEnvelopeRemotePrivateEndpointConnection class. + /// + /// Resource Id. Typically ID is populated only for + /// responses to GET requests. Caller is responsible for passing in + /// this + /// value for GET requests only. + /// For example: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} + /// Name of resource. + /// Type of resource e.g + /// "Microsoft.Web/sites". + /// Geographical region resource belongs to e.g. + /// SouthCentralUS, SouthEastAsia. + /// Tags associated with resource. + /// Azure resource manager plan. + /// Resource specific properties. + /// SKU description of the resource. + /// Azure-AsyncOperation Status info. + /// Azure-AsyncOperation Error info. + /// MSI resource + /// Logical Availability Zones the service is + /// hosted in + public ResponseMessageEnvelopeRemotePrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ArmPlan plan = default(ArmPlan), RemotePrivateEndpointConnection properties = default(RemotePrivateEndpointConnection), SkuDescription sku = default(SkuDescription), string status = default(string), ErrorEntity error = default(ErrorEntity), ManagedServiceIdentity identity = default(ManagedServiceIdentity), IList zones = default(IList)) + { + Id = id; + Name = name; + Type = type; + Location = location; + Tags = tags; + Plan = plan; + Properties = properties; + Sku = sku; + Status = status; + Error = error; + Identity = identity; + Zones = zones; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource Id. Typically ID is populated only for + /// responses to GET requests. Caller is responsible for passing in + /// this + /// value for GET requests only. + /// For example: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets name of resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets type of resource e.g "Microsoft.Web/sites". + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets geographical region resource belongs to e.g. + /// SouthCentralUS, SouthEastAsia. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets tags associated with resource. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets azure resource manager plan. + /// + [JsonProperty(PropertyName = "plan")] + public ArmPlan Plan { get; set; } + + /// + /// Gets or sets resource specific properties. + /// + [JsonProperty(PropertyName = "properties")] + public RemotePrivateEndpointConnection Properties { get; set; } + + /// + /// Gets or sets SKU description of the resource. + /// + [JsonProperty(PropertyName = "sku")] + public SkuDescription Sku { get; set; } + + /// + /// Gets or sets azure-AsyncOperation Status info. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets azure-AsyncOperation Error info. + /// + [JsonProperty(PropertyName = "error")] + public ErrorEntity Error { get; set; } + + /// + /// Gets or sets MSI resource + /// + [JsonProperty(PropertyName = "identity")] + public ManagedServiceIdentity Identity { get; set; } + + /// + /// Gets or sets logical Availability Zones the service is hosted in + /// + [JsonProperty(PropertyName = "zones")] + public IList Zones { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.cs new file mode 100644 index 000000000000..f649b929bc22 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.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 Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Sample utterance. + /// + public partial class SampleUtterance + { + /// + /// Initializes a new instance of the SampleUtterance class. + /// + public SampleUtterance() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SampleUtterance class. + /// + /// Text attribute of sample utterance. + /// Links attribute of sample utterance. + /// Question id of sample utterance (for + /// stackoverflow questions titles). + public SampleUtterance(string text = default(string), IList links = default(IList), string qid = default(string)) + { + Text = text; + Links = links; + Qid = qid; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets text attribute of sample utterance. + /// + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + + /// + /// Gets or sets links attribute of sample utterance. + /// + [JsonProperty(PropertyName = "links")] + public IList Links { get; set; } + + /// + /// Gets or sets question id of sample utterance (for stackoverflow + /// questions titles). + /// + [JsonProperty(PropertyName = "qid")] + public string Qid { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs index 5a5d96d804c3..cda65a55c0cc 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs @@ -95,7 +95,7 @@ public Site() /// ClientCert is required. /// - ClientCertEnabled: true and ClientCertMode: Optional means /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional' + /// 'Required', 'Optional', 'OptionalInteractiveUser' /// client certificate /// authentication comma-separated exclusion paths /// <code>true</code> to @@ -140,7 +140,16 @@ public Site() /// 'GeoRedundant' /// Specifies an operation id if /// this site has a pending operation. - public Site(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) + /// Checks if Customer provided + /// storage account is required + /// Identity to use for Key + /// Vault Reference authentication. + /// Azure Resource Manager ID of + /// the Virtual network and subnet to be joined by Regional VNET + /// Integration. + /// This must be of the form + /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + public Site(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? storageAccountRequired = default(bool?), string keyVaultReferenceIdentity = default(string), string virtualNetworkSubnetId = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, kind, type, tags) { State = state; @@ -181,7 +190,11 @@ public Site() HttpsOnly = httpsOnly; RedundancyMode = redundancyMode; InProgressOperationId = inProgressOperationId; + StorageAccountRequired = storageAccountRequired; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; + VirtualNetworkSubnetId = virtualNetworkSubnetId; Identity = identity; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -344,7 +357,7 @@ public Site() /// ClientCert is required. /// - ClientCertEnabled: true and ClientCertMode: Optional means /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional' + /// 'Required', 'Optional', 'OptionalInteractiveUser' /// [JsonProperty(PropertyName = "properties.clientCertMode")] public ClientCertMode? ClientCertMode { get; set; } @@ -471,11 +484,39 @@ public Site() [JsonProperty(PropertyName = "properties.inProgressOperationId")] public System.Guid? InProgressOperationId { get; private set; } + /// + /// Gets or sets checks if Customer provided storage account is + /// required + /// + [JsonProperty(PropertyName = "properties.storageAccountRequired")] + public bool? StorageAccountRequired { get; set; } + + /// + /// Gets or sets identity to use for Key Vault Reference + /// authentication. + /// + [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; set; } + + /// + /// Gets or sets azure Resource Manager ID of the Virtual network and + /// subnet to be joined by Regional VNET Integration. + /// This must be of the form + /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + /// + [JsonProperty(PropertyName = "properties.virtualNetworkSubnetId")] + public string VirtualNetworkSubnetId { get; set; } + /// /// [JsonProperty(PropertyName = "identity")] public ManagedServiceIdentity Identity { get; set; } + /// + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs index a87bf293faac..892ce24ecff1 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs @@ -205,7 +205,11 @@ public SiteAuthSettings() /// auth settings. /// If the path is relative, base will the site's root /// directory. - public SiteAuthSettings(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), string runtimeVersion = default(string), UnauthenticatedClientAction? unauthenticatedClientAction = default(UnauthenticatedClientAction?), bool? tokenStoreEnabled = default(bool?), IList allowedExternalRedirectUrls = default(IList), BuiltInAuthenticationProvider? defaultProvider = default(BuiltInAuthenticationProvider?), double? tokenRefreshExtensionHours = default(double?), string clientId = default(string), string clientSecret = default(string), string clientSecretSettingName = default(string), string clientSecretCertificateThumbprint = default(string), string issuer = default(string), bool? validateIssuer = default(bool?), IList allowedAudiences = default(IList), IList additionalLoginParams = default(IList), string aadClaimsAuthorization = default(string), string googleClientId = default(string), string googleClientSecret = default(string), string googleClientSecretSettingName = default(string), IList googleOAuthScopes = default(IList), string facebookAppId = default(string), string facebookAppSecret = default(string), string facebookAppSecretSettingName = default(string), IList facebookOAuthScopes = default(IList), string gitHubClientId = default(string), string gitHubClientSecret = default(string), string gitHubClientSecretSettingName = default(string), IList gitHubOAuthScopes = default(IList), string twitterConsumerKey = default(string), string twitterConsumerSecret = default(string), string twitterConsumerSecretSettingName = default(string), string microsoftAccountClientId = default(string), string microsoftAccountClientSecret = default(string), string microsoftAccountClientSecretSettingName = default(string), IList microsoftAccountOAuthScopes = default(IList), string isAuthFromFile = default(string), string authFilePath = default(string)) + /// The ConfigVersion of the Authentication + /// / Authorization feature in use for the current app. + /// The setting in this value can control the behavior of the control + /// plane for Authentication / Authorization. + public SiteAuthSettings(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), string runtimeVersion = default(string), UnauthenticatedClientAction? unauthenticatedClientAction = default(UnauthenticatedClientAction?), bool? tokenStoreEnabled = default(bool?), IList allowedExternalRedirectUrls = default(IList), BuiltInAuthenticationProvider? defaultProvider = default(BuiltInAuthenticationProvider?), double? tokenRefreshExtensionHours = default(double?), string clientId = default(string), string clientSecret = default(string), string clientSecretSettingName = default(string), string clientSecretCertificateThumbprint = default(string), string issuer = default(string), bool? validateIssuer = default(bool?), IList allowedAudiences = default(IList), IList additionalLoginParams = default(IList), string aadClaimsAuthorization = default(string), string googleClientId = default(string), string googleClientSecret = default(string), string googleClientSecretSettingName = default(string), IList googleOAuthScopes = default(IList), string facebookAppId = default(string), string facebookAppSecret = default(string), string facebookAppSecretSettingName = default(string), IList facebookOAuthScopes = default(IList), string gitHubClientId = default(string), string gitHubClientSecret = default(string), string gitHubClientSecretSettingName = default(string), IList gitHubOAuthScopes = default(IList), string twitterConsumerKey = default(string), string twitterConsumerSecret = default(string), string twitterConsumerSecretSettingName = default(string), string microsoftAccountClientId = default(string), string microsoftAccountClientSecret = default(string), string microsoftAccountClientSecretSettingName = default(string), IList microsoftAccountOAuthScopes = default(IList), string isAuthFromFile = default(string), string authFilePath = default(string), string configVersion = default(string)) : base(id, name, kind, type) { Enabled = enabled; @@ -245,6 +249,7 @@ public SiteAuthSettings() MicrosoftAccountOAuthScopes = microsoftAccountOAuthScopes; IsAuthFromFile = isAuthFromFile; AuthFilePath = authFilePath; + ConfigVersion = configVersion; CustomInit(); } @@ -594,5 +599,14 @@ public SiteAuthSettings() [JsonProperty(PropertyName = "properties.authFilePath")] public string AuthFilePath { get; set; } + /// + /// Gets or sets the ConfigVersion of the Authentication / + /// Authorization feature in use for the current app. + /// The setting in this value can control the behavior of the control + /// plane for Authentication / Authorization. + /// + [JsonProperty(PropertyName = "properties.configVersion")] + public string ConfigVersion { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs index 5a587a3976c4..b2ab90429587 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// Configuration settings for the Azure App Service Authentication / + /// Authorization V2 feature. + /// [Rest.Serialization.JsonTransformation] public partial class SiteAuthSettingsV2 : ProxyOnlyResource { @@ -33,6 +37,19 @@ public SiteAuthSettingsV2() /// Resource Name. /// Kind of resource. /// Resource type. + /// The configuration settings of the platform + /// of App Service Authentication/Authorization. + /// The configuration settings that + /// determines the validation flow of users using App Service + /// Authentication/Authorization. + /// The configuration settings of each + /// of the identity providers used to configure App Service + /// Authentication/Authorization. + /// The configuration settings of the login flow of + /// users using App Service Authentication/Authorization. + /// The configuration settings of the HTTP + /// requests for authentication and authorization requests made against + /// App Service Authentication/Authorization. public SiteAuthSettingsV2(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), AuthPlatform platform = default(AuthPlatform), GlobalValidation globalValidation = default(GlobalValidation), IdentityProviders identityProviders = default(IdentityProviders), Login login = default(Login), HttpSettings httpSettings = default(HttpSettings)) : base(id, name, kind, type) { @@ -50,26 +67,39 @@ public SiteAuthSettingsV2() partial void CustomInit(); /// + /// Gets or sets the configuration settings of the platform of App + /// Service Authentication/Authorization. /// [JsonProperty(PropertyName = "properties.platform")] public AuthPlatform Platform { get; set; } /// + /// Gets or sets the configuration settings that determines the + /// validation flow of users using App Service + /// Authentication/Authorization. /// [JsonProperty(PropertyName = "properties.globalValidation")] public GlobalValidation GlobalValidation { get; set; } /// + /// Gets or sets the configuration settings of each of the identity + /// providers used to configure App Service + /// Authentication/Authorization. /// [JsonProperty(PropertyName = "properties.identityProviders")] public IdentityProviders IdentityProviders { get; set; } /// + /// Gets or sets the configuration settings of the login flow of users + /// using App Service Authentication/Authorization. /// [JsonProperty(PropertyName = "properties.login")] public Login Login { get; set; } /// + /// Gets or sets the configuration settings of the HTTP requests for + /// authentication and authorization requests made against App Service + /// Authentication/Authorization. /// [JsonProperty(PropertyName = "properties.httpSettings")] public HttpSettings HttpSettings { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs index 09a72225be37..a32ecd8ec971 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs @@ -89,7 +89,8 @@ public SiteConfig() /// Virtual applications. /// Site load balancing. Possible values /// include: 'WeightedRoundRobin', 'LeastRequests', - /// 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' + /// 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash', + /// 'PerSiteRoundRobin' /// This is work around for polymorphic /// types. /// Site limits. @@ -98,6 +99,12 @@ public SiteConfig() /// Auto Heal rules. /// Tracing options. /// Virtual Network name. + /// Virtual Network Route All + /// enabled. This causes all outbound traffic to have Virtual Network + /// Security Groups and User Defined Routes applied. + /// The number of private ports + /// assigned to this app. These will be assigned dynamically on + /// runtime. /// Cross-Origin Resource Sharing (CORS) /// settings. /// Push endpoint settings. @@ -113,6 +120,8 @@ public SiteConfig() /// Id /// Explicit Managed Service /// Identity Id + /// Identity to use for Key + /// Vault Reference authentication. /// IP security restrictions for /// main. /// IP security restrictions @@ -124,13 +133,42 @@ public SiteConfig() /// MinTlsVersion: configures the minimum /// version of TLS required for SSL requests. Possible values include: /// '1.0', '1.1', '1.2' + /// ScmMinTlsVersion: configures the + /// minimum version of TLS required for SSL requests for SCM site. + /// Possible values include: '1.0', '1.1', '1.2' /// State of FTP / FTPS service. Possible /// values include: 'AllAllowed', 'FtpsOnly', 'Disabled' /// Number of preWarmed instances. /// This setting only applies to the Consumption and Elastic /// Plans + /// Maximum number of workers that + /// a site can scale out to. + /// This setting only applies to the Consumption and Elastic Premium + /// Plans /// Health check path - public SiteConfig(int? numberOfWorkers = default(int?), IList defaultDocuments = default(IList), string netFrameworkVersion = default(string), string phpVersion = default(string), string pythonVersion = default(string), string nodeVersion = default(string), string powerShellVersion = default(string), string linuxFxVersion = default(string), string windowsFxVersion = default(string), bool? requestTracingEnabled = default(bool?), System.DateTime? requestTracingExpirationTime = default(System.DateTime?), bool? remoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = default(string), bool? httpLoggingEnabled = default(bool?), int? logsDirectorySizeLimit = default(int?), bool? detailedErrorLoggingEnabled = default(bool?), string publishingUsername = default(string), IList appSettings = default(IList), IList connectionStrings = default(IList), SiteMachineKey machineKey = default(SiteMachineKey), IList handlerMappings = default(IList), string documentRoot = default(string), string scmType = default(string), bool? use32BitWorkerProcess = default(bool?), bool? webSocketsEnabled = default(bool?), bool? alwaysOn = default(bool?), string javaVersion = default(string), string javaContainer = default(string), string javaContainerVersion = default(string), string appCommandLine = default(string), ManagedPipelineMode? managedPipelineMode = default(ManagedPipelineMode?), IList virtualApplications = default(IList), SiteLoadBalancing? loadBalancing = default(SiteLoadBalancing?), Experiments experiments = default(Experiments), SiteLimits limits = default(SiteLimits), bool? autoHealEnabled = default(bool?), AutoHealRules autoHealRules = default(AutoHealRules), string tracingOptions = default(string), string vnetName = default(string), CorsSettings cors = default(CorsSettings), PushSettings push = default(PushSettings), ApiDefinitionInfo apiDefinition = default(ApiDefinitionInfo), ApiManagementConfig apiManagementConfig = default(ApiManagementConfig), string autoSwapSlotName = default(string), bool? localMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), IList ipSecurityRestrictions = default(IList), IList scmIpSecurityRestrictions = default(IList), bool? scmIpSecurityRestrictionsUseMain = default(bool?), bool? http20Enabled = default(bool?), string minTlsVersion = default(string), string ftpsState = default(string), int? preWarmedInstanceCount = default(int?), string healthCheckPath = default(string)) + /// Gets or sets a + /// value indicating whether functions runtime scale monitoring is + /// enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but + /// will instead call to the + /// runtime to get scale status. + /// Sets the time zone a site uses for + /// generating timestamps. Compatible with Linux and Windows App + /// Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence + /// over this config. For Linux, expects tz database values + /// https://www.iana.org/time-zones (for a quick reference see + /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For + /// Windows, expects one of the time zones listed under + /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + /// NT\CurrentVersion\Time Zones + /// Number of minimum + /// instance count for a site + /// This setting only applies to the Elastic Plans + /// List of Azure Storage + /// Accounts. + /// Property to allow or block all + /// public traffic. + public SiteConfig(int? numberOfWorkers = default(int?), IList defaultDocuments = default(IList), string netFrameworkVersion = default(string), string phpVersion = default(string), string pythonVersion = default(string), string nodeVersion = default(string), string powerShellVersion = default(string), string linuxFxVersion = default(string), string windowsFxVersion = default(string), bool? requestTracingEnabled = default(bool?), System.DateTime? requestTracingExpirationTime = default(System.DateTime?), bool? remoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = default(string), bool? httpLoggingEnabled = default(bool?), int? logsDirectorySizeLimit = default(int?), bool? detailedErrorLoggingEnabled = default(bool?), string publishingUsername = default(string), IList appSettings = default(IList), IList connectionStrings = default(IList), SiteMachineKey machineKey = default(SiteMachineKey), IList handlerMappings = default(IList), string documentRoot = default(string), string scmType = default(string), bool? use32BitWorkerProcess = default(bool?), bool? webSocketsEnabled = default(bool?), bool? alwaysOn = default(bool?), string javaVersion = default(string), string javaContainer = default(string), string javaContainerVersion = default(string), string appCommandLine = default(string), ManagedPipelineMode? managedPipelineMode = default(ManagedPipelineMode?), IList virtualApplications = default(IList), SiteLoadBalancing? loadBalancing = default(SiteLoadBalancing?), Experiments experiments = default(Experiments), SiteLimits limits = default(SiteLimits), bool? autoHealEnabled = default(bool?), AutoHealRules autoHealRules = default(AutoHealRules), string tracingOptions = default(string), string vnetName = default(string), bool? vnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), CorsSettings cors = default(CorsSettings), PushSettings push = default(PushSettings), ApiDefinitionInfo apiDefinition = default(ApiDefinitionInfo), ApiManagementConfig apiManagementConfig = default(ApiManagementConfig), string autoSwapSlotName = default(string), bool? localMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = default(string), IList ipSecurityRestrictions = default(IList), IList scmIpSecurityRestrictions = default(IList), bool? scmIpSecurityRestrictionsUseMain = default(bool?), bool? http20Enabled = default(bool?), string minTlsVersion = default(string), string scmMinTlsVersion = default(string), string ftpsState = default(string), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = default(string), bool? functionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = default(string), int? minimumElasticInstanceCount = default(int?), IDictionary azureStorageAccounts = default(IDictionary), string publicNetworkAccess = default(string)) { NumberOfWorkers = numberOfWorkers; DefaultDocuments = defaultDocuments; @@ -171,6 +209,8 @@ public SiteConfig() AutoHealRules = autoHealRules; TracingOptions = tracingOptions; VnetName = vnetName; + VnetRouteAllEnabled = vnetRouteAllEnabled; + VnetPrivatePortsCount = vnetPrivatePortsCount; Cors = cors; Push = push; ApiDefinition = apiDefinition; @@ -179,14 +219,22 @@ public SiteConfig() LocalMySqlEnabled = localMySqlEnabled; ManagedServiceIdentityId = managedServiceIdentityId; XManagedServiceIdentityId = xManagedServiceIdentityId; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; IpSecurityRestrictions = ipSecurityRestrictions; ScmIpSecurityRestrictions = scmIpSecurityRestrictions; ScmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; Http20Enabled = http20Enabled; MinTlsVersion = minTlsVersion; + ScmMinTlsVersion = scmMinTlsVersion; FtpsState = ftpsState; PreWarmedInstanceCount = preWarmedInstanceCount; + FunctionAppScaleLimit = functionAppScaleLimit; HealthCheckPath = healthCheckPath; + FunctionsRuntimeScaleMonitoringEnabled = functionsRuntimeScaleMonitoringEnabled; + WebsiteTimeZone = websiteTimeZone; + MinimumElasticInstanceCount = minimumElasticInstanceCount; + AzureStorageAccounts = azureStorageAccounts; + PublicNetworkAccess = publicNetworkAccess; CustomInit(); } @@ -408,7 +456,7 @@ public SiteConfig() /// /// Gets or sets site load balancing. Possible values include: /// 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - /// 'WeightedTotalTraffic', 'RequestHash' + /// 'WeightedTotalTraffic', 'RequestHash', 'PerSiteRoundRobin' /// [JsonProperty(PropertyName = "loadBalancing")] public SiteLoadBalancing? LoadBalancing { get; set; } @@ -451,6 +499,21 @@ public SiteConfig() [JsonProperty(PropertyName = "vnetName")] public string VnetName { get; set; } + /// + /// Gets or sets virtual Network Route All enabled. This causes all + /// outbound traffic to have Virtual Network Security Groups and User + /// Defined Routes applied. + /// + [JsonProperty(PropertyName = "vnetRouteAllEnabled")] + public bool? VnetRouteAllEnabled { get; set; } + + /// + /// Gets or sets the number of private ports assigned to this app. + /// These will be assigned dynamically on runtime. + /// + [JsonProperty(PropertyName = "vnetPrivatePortsCount")] + public int? VnetPrivatePortsCount { get; set; } + /// /// Gets or sets cross-Origin Resource Sharing (CORS) settings. /// @@ -502,6 +565,13 @@ public SiteConfig() [JsonProperty(PropertyName = "xManagedServiceIdentityId")] public int? XManagedServiceIdentityId { get; set; } + /// + /// Gets or sets identity to use for Key Vault Reference + /// authentication. + /// + [JsonProperty(PropertyName = "keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; set; } + /// /// Gets or sets IP security restrictions for main. /// @@ -535,6 +605,14 @@ public SiteConfig() [JsonProperty(PropertyName = "minTlsVersion")] public string MinTlsVersion { get; set; } + /// + /// Gets or sets scmMinTlsVersion: configures the minimum version of + /// TLS required for SSL requests for SCM site. Possible values + /// include: '1.0', '1.1', '1.2' + /// + [JsonProperty(PropertyName = "scmMinTlsVersion")] + public string ScmMinTlsVersion { get; set; } + /// /// Gets or sets state of FTP / FTPS service. Possible values include: /// 'AllAllowed', 'FtpsOnly', 'Disabled' @@ -549,12 +627,64 @@ public SiteConfig() [JsonProperty(PropertyName = "preWarmedInstanceCount")] public int? PreWarmedInstanceCount { get; set; } + /// + /// Gets or sets maximum number of workers that a site can scale out + /// to. + /// This setting only applies to the Consumption and Elastic Premium + /// Plans + /// + [JsonProperty(PropertyName = "functionAppScaleLimit")] + public int? FunctionAppScaleLimit { get; set; } + /// /// Gets or sets health check path /// [JsonProperty(PropertyName = "healthCheckPath")] public string HealthCheckPath { get; set; } + /// + /// Gets or sets a value indicating whether functions runtime scale + /// monitoring is enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but + /// will instead call to the + /// runtime to get scale status. + /// + [JsonProperty(PropertyName = "functionsRuntimeScaleMonitoringEnabled")] + public bool? FunctionsRuntimeScaleMonitoringEnabled { get; set; } + + /// + /// Gets or sets sets the time zone a site uses for generating + /// timestamps. Compatible with Linux and Windows App Service. Setting + /// the WEBSITE_TIME_ZONE app setting takes precedence over this + /// config. For Linux, expects tz database values + /// https://www.iana.org/time-zones (for a quick reference see + /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For + /// Windows, expects one of the time zones listed under + /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + /// NT\CurrentVersion\Time Zones + /// + [JsonProperty(PropertyName = "websiteTimeZone")] + public string WebsiteTimeZone { get; set; } + + /// + /// Gets or sets number of minimum instance count for a site + /// This setting only applies to the Elastic Plans + /// + [JsonProperty(PropertyName = "minimumElasticInstanceCount")] + public int? MinimumElasticInstanceCount { get; set; } + + /// + /// Gets or sets list of Azure Storage Accounts. + /// + [JsonProperty(PropertyName = "azureStorageAccounts")] + public IDictionary AzureStorageAccounts { get; set; } + + /// + /// Gets or sets property to allow or block all public traffic. + /// + [JsonProperty(PropertyName = "publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// /// Validate the object. /// @@ -575,6 +705,18 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMinimum, "PreWarmedInstanceCount", 0); } + if (FunctionAppScaleLimit < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "FunctionAppScaleLimit", 0); + } + if (MinimumElasticInstanceCount > 20) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "MinimumElasticInstanceCount", 20); + } + if (MinimumElasticInstanceCount < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MinimumElasticInstanceCount", 0); + } } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.cs new file mode 100644 index 000000000000..d331ddb6de0e --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.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.Linq; + + /// + /// Site config properties dictionary. + /// + public partial class SiteConfigPropertiesDictionary + { + /// + /// Initializes a new instance of the SiteConfigPropertiesDictionary + /// class. + /// + public SiteConfigPropertiesDictionary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SiteConfigPropertiesDictionary + /// class. + /// + /// <code>true</code> + /// if use32BitWorkerProcess should be set to true for the stack; + /// otherwise, <code>false</code>. + /// LinuxFxVersion configuration + /// setting. + /// JavaVersion configuration + /// setting. + /// PowerShellVersion configuration + /// setting. + public SiteConfigPropertiesDictionary(bool? use32BitWorkerProcess = default(bool?), string linuxFxVersion = default(string), string javaVersion = default(string), string powerShellVersion = default(string)) + { + Use32BitWorkerProcess = use32BitWorkerProcess; + LinuxFxVersion = linuxFxVersion; + JavaVersion = javaVersion; + PowerShellVersion = powerShellVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if + /// use32BitWorkerProcess should be set to true for the stack; + /// otherwise, &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "use32BitWorkerProcess")] + public bool? Use32BitWorkerProcess { get; private set; } + + /// + /// Gets linuxFxVersion configuration setting. + /// + [JsonProperty(PropertyName = "linuxFxVersion")] + public string LinuxFxVersion { get; private set; } + + /// + /// Gets javaVersion configuration setting. + /// + [JsonProperty(PropertyName = "javaVersion")] + public string JavaVersion { get; private set; } + + /// + /// Gets powerShellVersion configuration setting. + /// + [JsonProperty(PropertyName = "powerShellVersion")] + public string PowerShellVersion { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs index c51daa41c62e..5142f2099da2 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs @@ -95,7 +95,8 @@ public SiteConfigResource() /// Virtual applications. /// Site load balancing. Possible values /// include: 'WeightedRoundRobin', 'LeastRequests', - /// 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' + /// 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash', + /// 'PerSiteRoundRobin' /// This is work around for polymorphic /// types. /// Site limits. @@ -104,6 +105,12 @@ public SiteConfigResource() /// Auto Heal rules. /// Tracing options. /// Virtual Network name. + /// Virtual Network Route All + /// enabled. This causes all outbound traffic to have Virtual Network + /// Security Groups and User Defined Routes applied. + /// The number of private ports + /// assigned to this app. These will be assigned dynamically on + /// runtime. /// Cross-Origin Resource Sharing (CORS) /// settings. /// Push endpoint settings. @@ -119,6 +126,8 @@ public SiteConfigResource() /// Id /// Explicit Managed Service /// Identity Id + /// Identity to use for Key + /// Vault Reference authentication. /// IP security restrictions for /// main. /// IP security restrictions @@ -130,13 +139,42 @@ public SiteConfigResource() /// MinTlsVersion: configures the minimum /// version of TLS required for SSL requests. Possible values include: /// '1.0', '1.1', '1.2' + /// ScmMinTlsVersion: configures the + /// minimum version of TLS required for SSL requests for SCM site. + /// Possible values include: '1.0', '1.1', '1.2' /// State of FTP / FTPS service. Possible /// values include: 'AllAllowed', 'FtpsOnly', 'Disabled' /// Number of preWarmed instances. /// This setting only applies to the Consumption and Elastic /// Plans + /// Maximum number of workers that + /// a site can scale out to. + /// This setting only applies to the Consumption and Elastic Premium + /// Plans /// Health check path - public SiteConfigResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? numberOfWorkers = default(int?), IList defaultDocuments = default(IList), string netFrameworkVersion = default(string), string phpVersion = default(string), string pythonVersion = default(string), string nodeVersion = default(string), string powerShellVersion = default(string), string linuxFxVersion = default(string), string windowsFxVersion = default(string), bool? requestTracingEnabled = default(bool?), System.DateTime? requestTracingExpirationTime = default(System.DateTime?), bool? remoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = default(string), bool? httpLoggingEnabled = default(bool?), int? logsDirectorySizeLimit = default(int?), bool? detailedErrorLoggingEnabled = default(bool?), string publishingUsername = default(string), IList appSettings = default(IList), IList connectionStrings = default(IList), SiteMachineKey machineKey = default(SiteMachineKey), IList handlerMappings = default(IList), string documentRoot = default(string), string scmType = default(string), bool? use32BitWorkerProcess = default(bool?), bool? webSocketsEnabled = default(bool?), bool? alwaysOn = default(bool?), string javaVersion = default(string), string javaContainer = default(string), string javaContainerVersion = default(string), string appCommandLine = default(string), ManagedPipelineMode? managedPipelineMode = default(ManagedPipelineMode?), IList virtualApplications = default(IList), SiteLoadBalancing? loadBalancing = default(SiteLoadBalancing?), Experiments experiments = default(Experiments), SiteLimits limits = default(SiteLimits), bool? autoHealEnabled = default(bool?), AutoHealRules autoHealRules = default(AutoHealRules), string tracingOptions = default(string), string vnetName = default(string), CorsSettings cors = default(CorsSettings), PushSettings push = default(PushSettings), ApiDefinitionInfo apiDefinition = default(ApiDefinitionInfo), ApiManagementConfig apiManagementConfig = default(ApiManagementConfig), string autoSwapSlotName = default(string), bool? localMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), IList ipSecurityRestrictions = default(IList), IList scmIpSecurityRestrictions = default(IList), bool? scmIpSecurityRestrictionsUseMain = default(bool?), bool? http20Enabled = default(bool?), string minTlsVersion = default(string), string ftpsState = default(string), int? preWarmedInstanceCount = default(int?), string healthCheckPath = default(string)) + /// Gets or sets a + /// value indicating whether functions runtime scale monitoring is + /// enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but + /// will instead call to the + /// runtime to get scale status. + /// Sets the time zone a site uses for + /// generating timestamps. Compatible with Linux and Windows App + /// Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence + /// over this config. For Linux, expects tz database values + /// https://www.iana.org/time-zones (for a quick reference see + /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For + /// Windows, expects one of the time zones listed under + /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + /// NT\CurrentVersion\Time Zones + /// Number of minimum + /// instance count for a site + /// This setting only applies to the Elastic Plans + /// List of Azure Storage + /// Accounts. + /// Property to allow or block all + /// public traffic. + public SiteConfigResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? numberOfWorkers = default(int?), IList defaultDocuments = default(IList), string netFrameworkVersion = default(string), string phpVersion = default(string), string pythonVersion = default(string), string nodeVersion = default(string), string powerShellVersion = default(string), string linuxFxVersion = default(string), string windowsFxVersion = default(string), bool? requestTracingEnabled = default(bool?), System.DateTime? requestTracingExpirationTime = default(System.DateTime?), bool? remoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = default(string), bool? httpLoggingEnabled = default(bool?), int? logsDirectorySizeLimit = default(int?), bool? detailedErrorLoggingEnabled = default(bool?), string publishingUsername = default(string), IList appSettings = default(IList), IList connectionStrings = default(IList), SiteMachineKey machineKey = default(SiteMachineKey), IList handlerMappings = default(IList), string documentRoot = default(string), string scmType = default(string), bool? use32BitWorkerProcess = default(bool?), bool? webSocketsEnabled = default(bool?), bool? alwaysOn = default(bool?), string javaVersion = default(string), string javaContainer = default(string), string javaContainerVersion = default(string), string appCommandLine = default(string), ManagedPipelineMode? managedPipelineMode = default(ManagedPipelineMode?), IList virtualApplications = default(IList), SiteLoadBalancing? loadBalancing = default(SiteLoadBalancing?), Experiments experiments = default(Experiments), SiteLimits limits = default(SiteLimits), bool? autoHealEnabled = default(bool?), AutoHealRules autoHealRules = default(AutoHealRules), string tracingOptions = default(string), string vnetName = default(string), bool? vnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), CorsSettings cors = default(CorsSettings), PushSettings push = default(PushSettings), ApiDefinitionInfo apiDefinition = default(ApiDefinitionInfo), ApiManagementConfig apiManagementConfig = default(ApiManagementConfig), string autoSwapSlotName = default(string), bool? localMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = default(string), IList ipSecurityRestrictions = default(IList), IList scmIpSecurityRestrictions = default(IList), bool? scmIpSecurityRestrictionsUseMain = default(bool?), bool? http20Enabled = default(bool?), string minTlsVersion = default(string), string scmMinTlsVersion = default(string), string ftpsState = default(string), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = default(string), bool? functionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = default(string), int? minimumElasticInstanceCount = default(int?), IDictionary azureStorageAccounts = default(IDictionary), string publicNetworkAccess = default(string)) : base(id, name, kind, type) { NumberOfWorkers = numberOfWorkers; @@ -178,6 +216,8 @@ public SiteConfigResource() AutoHealRules = autoHealRules; TracingOptions = tracingOptions; VnetName = vnetName; + VnetRouteAllEnabled = vnetRouteAllEnabled; + VnetPrivatePortsCount = vnetPrivatePortsCount; Cors = cors; Push = push; ApiDefinition = apiDefinition; @@ -186,14 +226,22 @@ public SiteConfigResource() LocalMySqlEnabled = localMySqlEnabled; ManagedServiceIdentityId = managedServiceIdentityId; XManagedServiceIdentityId = xManagedServiceIdentityId; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; IpSecurityRestrictions = ipSecurityRestrictions; ScmIpSecurityRestrictions = scmIpSecurityRestrictions; ScmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; Http20Enabled = http20Enabled; MinTlsVersion = minTlsVersion; + ScmMinTlsVersion = scmMinTlsVersion; FtpsState = ftpsState; PreWarmedInstanceCount = preWarmedInstanceCount; + FunctionAppScaleLimit = functionAppScaleLimit; HealthCheckPath = healthCheckPath; + FunctionsRuntimeScaleMonitoringEnabled = functionsRuntimeScaleMonitoringEnabled; + WebsiteTimeZone = websiteTimeZone; + MinimumElasticInstanceCount = minimumElasticInstanceCount; + AzureStorageAccounts = azureStorageAccounts; + PublicNetworkAccess = publicNetworkAccess; CustomInit(); } @@ -415,7 +463,7 @@ public SiteConfigResource() /// /// Gets or sets site load balancing. Possible values include: /// 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - /// 'WeightedTotalTraffic', 'RequestHash' + /// 'WeightedTotalTraffic', 'RequestHash', 'PerSiteRoundRobin' /// [JsonProperty(PropertyName = "properties.loadBalancing")] public SiteLoadBalancing? LoadBalancing { get; set; } @@ -458,6 +506,21 @@ public SiteConfigResource() [JsonProperty(PropertyName = "properties.vnetName")] public string VnetName { get; set; } + /// + /// Gets or sets virtual Network Route All enabled. This causes all + /// outbound traffic to have Virtual Network Security Groups and User + /// Defined Routes applied. + /// + [JsonProperty(PropertyName = "properties.vnetRouteAllEnabled")] + public bool? VnetRouteAllEnabled { get; set; } + + /// + /// Gets or sets the number of private ports assigned to this app. + /// These will be assigned dynamically on runtime. + /// + [JsonProperty(PropertyName = "properties.vnetPrivatePortsCount")] + public int? VnetPrivatePortsCount { get; set; } + /// /// Gets or sets cross-Origin Resource Sharing (CORS) settings. /// @@ -509,6 +572,13 @@ public SiteConfigResource() [JsonProperty(PropertyName = "properties.xManagedServiceIdentityId")] public int? XManagedServiceIdentityId { get; set; } + /// + /// Gets or sets identity to use for Key Vault Reference + /// authentication. + /// + [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; set; } + /// /// Gets or sets IP security restrictions for main. /// @@ -542,6 +612,14 @@ public SiteConfigResource() [JsonProperty(PropertyName = "properties.minTlsVersion")] public string MinTlsVersion { get; set; } + /// + /// Gets or sets scmMinTlsVersion: configures the minimum version of + /// TLS required for SSL requests for SCM site. Possible values + /// include: '1.0', '1.1', '1.2' + /// + [JsonProperty(PropertyName = "properties.scmMinTlsVersion")] + public string ScmMinTlsVersion { get; set; } + /// /// Gets or sets state of FTP / FTPS service. Possible values include: /// 'AllAllowed', 'FtpsOnly', 'Disabled' @@ -556,12 +634,64 @@ public SiteConfigResource() [JsonProperty(PropertyName = "properties.preWarmedInstanceCount")] public int? PreWarmedInstanceCount { get; set; } + /// + /// Gets or sets maximum number of workers that a site can scale out + /// to. + /// This setting only applies to the Consumption and Elastic Premium + /// Plans + /// + [JsonProperty(PropertyName = "properties.functionAppScaleLimit")] + public int? FunctionAppScaleLimit { get; set; } + /// /// Gets or sets health check path /// [JsonProperty(PropertyName = "properties.healthCheckPath")] public string HealthCheckPath { get; set; } + /// + /// Gets or sets a value indicating whether functions runtime scale + /// monitoring is enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but + /// will instead call to the + /// runtime to get scale status. + /// + [JsonProperty(PropertyName = "properties.functionsRuntimeScaleMonitoringEnabled")] + public bool? FunctionsRuntimeScaleMonitoringEnabled { get; set; } + + /// + /// Gets or sets sets the time zone a site uses for generating + /// timestamps. Compatible with Linux and Windows App Service. Setting + /// the WEBSITE_TIME_ZONE app setting takes precedence over this + /// config. For Linux, expects tz database values + /// https://www.iana.org/time-zones (for a quick reference see + /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For + /// Windows, expects one of the time zones listed under + /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + /// NT\CurrentVersion\Time Zones + /// + [JsonProperty(PropertyName = "properties.websiteTimeZone")] + public string WebsiteTimeZone { get; set; } + + /// + /// Gets or sets number of minimum instance count for a site + /// This setting only applies to the Elastic Plans + /// + [JsonProperty(PropertyName = "properties.minimumElasticInstanceCount")] + public int? MinimumElasticInstanceCount { get; set; } + + /// + /// Gets or sets list of Azure Storage Accounts. + /// + [JsonProperty(PropertyName = "properties.azureStorageAccounts")] + public IDictionary AzureStorageAccounts { get; set; } + + /// + /// Gets or sets property to allow or block all public traffic. + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// /// Validate the object. /// @@ -582,6 +712,18 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMinimum, "PreWarmedInstanceCount", 0); } + if (FunctionAppScaleLimit < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "FunctionAppScaleLimit", 0); + } + if (MinimumElasticInstanceCount > 20) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "MinimumElasticInstanceCount", 20); + } + if (MinimumElasticInstanceCount < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MinimumElasticInstanceCount", 0); + } } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs index f7bae36f84b6..8b93ae4f1798 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs @@ -30,7 +30,9 @@ public enum SiteLoadBalancing [EnumMember(Value = "WeightedTotalTraffic")] WeightedTotalTraffic, [EnumMember(Value = "RequestHash")] - RequestHash + RequestHash, + [EnumMember(Value = "PerSiteRoundRobin")] + PerSiteRoundRobin } internal static class SiteLoadBalancingEnumExtension { @@ -53,6 +55,8 @@ internal static string ToSerializedValue(this SiteLoadBalancing value) return "WeightedTotalTraffic"; case SiteLoadBalancing.RequestHash: return "RequestHash"; + case SiteLoadBalancing.PerSiteRoundRobin: + return "PerSiteRoundRobin"; } return null; } @@ -71,6 +75,8 @@ internal static string ToSerializedValue(this SiteLoadBalancing value) return SiteLoadBalancing.WeightedTotalTraffic; case "RequestHash": return SiteLoadBalancing.RequestHash; + case "PerSiteRoundRobin": + return SiteLoadBalancing.PerSiteRoundRobin; } return null; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs index 567a5fb54af7..9d1f55080f11 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs @@ -93,7 +93,7 @@ public SitePatchResource() /// ClientCert is required. /// - ClientCertEnabled: true and ClientCertMode: Optional means /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional' + /// 'Required', 'Optional', 'OptionalInteractiveUser' /// client certificate /// authentication comma-separated exclusion paths /// <code>true</code> to @@ -138,7 +138,16 @@ public SitePatchResource() /// 'GeoRedundant' /// Specifies an operation id if /// this site has a pending operation. - public SitePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) + /// Checks if Customer provided + /// storage account is required + /// Identity to use for Key + /// Vault Reference authentication. + /// Azure Resource Manager ID of + /// the Virtual network and subnet to be joined by Regional VNET + /// Integration. + /// This must be of the form + /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + public SitePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? storageAccountRequired = default(bool?), string keyVaultReferenceIdentity = default(string), string virtualNetworkSubnetId = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) : base(id, name, kind, type) { State = state; @@ -179,6 +188,9 @@ public SitePatchResource() HttpsOnly = httpsOnly; RedundancyMode = redundancyMode; InProgressOperationId = inProgressOperationId; + StorageAccountRequired = storageAccountRequired; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; + VirtualNetworkSubnetId = virtualNetworkSubnetId; Identity = identity; CustomInit(); } @@ -342,7 +354,7 @@ public SitePatchResource() /// ClientCert is required. /// - ClientCertEnabled: true and ClientCertMode: Optional means /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional' + /// 'Required', 'Optional', 'OptionalInteractiveUser' /// [JsonProperty(PropertyName = "properties.clientCertMode")] public ClientCertMode? ClientCertMode { get; set; } @@ -469,6 +481,29 @@ public SitePatchResource() [JsonProperty(PropertyName = "properties.inProgressOperationId")] public System.Guid? InProgressOperationId { get; private set; } + /// + /// Gets or sets checks if Customer provided storage account is + /// required + /// + [JsonProperty(PropertyName = "properties.storageAccountRequired")] + public bool? StorageAccountRequired { get; set; } + + /// + /// Gets or sets identity to use for Key Vault Reference + /// authentication. + /// + [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; set; } + + /// + /// Gets or sets azure Resource Manager ID of the Virtual network and + /// subnet to be joined by Regional VNET Integration. + /// This must be of the form + /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + /// + [JsonProperty(PropertyName = "properties.virtualNetworkSubnetId")] + public string VirtualNetworkSubnetId { get; set; } + /// /// [JsonProperty(PropertyName = "identity")] diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs index c2544d5f558f..5cd75347d76b 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs @@ -51,7 +51,9 @@ public SiteSourceControl() /// <code>true</code> for a /// Mercurial repository; <code>false</code> for a Git /// repository. - public SiteSourceControl(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string repoUrl = default(string), string branch = default(string), bool? isManualIntegration = default(bool?), bool? isGitHubAction = default(bool?), bool? deploymentRollbackEnabled = default(bool?), bool? isMercurial = default(bool?)) + /// If GitHub Action is + /// selected, than the associated configuration. + public SiteSourceControl(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string repoUrl = default(string), string branch = default(string), bool? isManualIntegration = default(bool?), bool? isGitHubAction = default(bool?), bool? deploymentRollbackEnabled = default(bool?), bool? isMercurial = default(bool?), GitHubActionConfiguration gitHubActionConfiguration = default(GitHubActionConfiguration)) : base(id, name, kind, type) { RepoUrl = repoUrl; @@ -60,6 +62,7 @@ public SiteSourceControl() IsGitHubAction = isGitHubAction; DeploymentRollbackEnabled = deploymentRollbackEnabled; IsMercurial = isMercurial; + GitHubActionConfiguration = gitHubActionConfiguration; CustomInit(); } @@ -114,5 +117,12 @@ public SiteSourceControl() [JsonProperty(PropertyName = "properties.isMercurial")] public bool? IsMercurial { get; set; } + /// + /// Gets or sets if GitHub Action is selected, than the associated + /// configuration. + /// + [JsonProperty(PropertyName = "properties.gitHubActionConfiguration")] + public GitHubActionConfiguration GitHubActionConfiguration { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs index 87d1de6bc667..dfa25b2e6273 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs @@ -33,14 +33,17 @@ public SkuCapacity() /// Service plan SKU. /// Maximum number of workers for this App /// Service plan SKU. + /// Maximum number of Elastic workers for + /// this App Service plan SKU. /// Default number of workers for this /// App Service plan SKU. /// Available scale configurations for an App /// Service plan. - public SkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? defaultProperty = default(int?), string scaleType = default(string)) + public SkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? elasticMaximum = default(int?), int? defaultProperty = default(int?), string scaleType = default(string)) { Minimum = minimum; Maximum = maximum; + ElasticMaximum = elasticMaximum; DefaultProperty = defaultProperty; ScaleType = scaleType; CustomInit(); @@ -65,6 +68,13 @@ public SkuCapacity() [JsonProperty(PropertyName = "maximum")] public int? Maximum { get; set; } + /// + /// Gets or sets maximum number of Elastic workers for this App Service + /// plan SKU. + /// + [JsonProperty(PropertyName = "elasticMaximum")] + public int? ElasticMaximum { get; set; } + /// /// Gets or sets default number of workers for this App Service plan /// SKU. diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs index a990199a9a26..a3a68be1409f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs @@ -23,7 +23,10 @@ public static class SkuName public const string Premium = "Premium"; public const string Dynamic = "Dynamic"; public const string Isolated = "Isolated"; + public const string IsolatedV2 = "IsolatedV2"; public const string PremiumV2 = "PremiumV2"; + public const string PremiumV3 = "PremiumV3"; + public const string PremiumContainer = "PremiumContainer"; public const string ElasticPremium = "ElasticPremium"; public const string ElasticIsolated = "ElasticIsolated"; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs index 72d2b4cc304e..8eb176a65999 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs @@ -30,11 +30,13 @@ public SlowRequestsBasedTrigger() /// Initializes a new instance of the SlowRequestsBasedTrigger class. /// /// Time taken. + /// Request Path. /// Request Count. /// Time interval. - public SlowRequestsBasedTrigger(string timeTaken = default(string), int? count = default(int?), string timeInterval = default(string)) + public SlowRequestsBasedTrigger(string timeTaken = default(string), string path = default(string), int? count = default(int?), string timeInterval = default(string)) { TimeTaken = timeTaken; + Path = path; Count = count; TimeInterval = timeInterval; CustomInit(); @@ -51,6 +53,12 @@ public SlowRequestsBasedTrigger() [JsonProperty(PropertyName = "timeTaken")] public string TimeTaken { get; set; } + /// + /// Gets or sets request Path. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + /// /// Gets or sets request Count. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs index 4bc2716c9e59..cb090801ecf0 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs @@ -51,7 +51,19 @@ public StackMajorVersion() /// <code>true</code> if this stack /// should be hidden for new customers on portal, otherwise /// <code>false</code>. - public StackMajorVersion(string displayVersion = default(string), string runtimeVersion = default(string), bool? isDefault = default(bool?), IList minorVersions = default(IList), bool? applicationInsights = default(bool?), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?)) + /// <appSettings> + /// <appSetting name="FUNCTIONS_WORKER_RUNTIME" value="dotnet" /> + /// </appSettings> + /// Example: All the function apps need AppSetting: + /// "FUNCTIONS_WORKER_RUNTIME" to be set stack name + /// <siteConfigProperties> + /// <siteConfigProperty name="Use32BitWorkerProcess" value="false" + /// /> + /// </siteConfigProperties> + /// Example: All Linux Function Apps, need Use32BitWorkerProcess to be + /// set to 0 + public StackMajorVersion(string displayVersion = default(string), string runtimeVersion = default(string), bool? isDefault = default(bool?), IList minorVersions = default(IList), bool? applicationInsights = default(bool?), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), IDictionary appSettingsDictionary = default(IDictionary), IDictionary siteConfigPropertiesDictionary = default(IDictionary)) { DisplayVersion = displayVersion; RuntimeVersion = runtimeVersion; @@ -61,6 +73,8 @@ public StackMajorVersion() IsPreview = isPreview; IsDeprecated = isDeprecated; IsHidden = isHidden; + AppSettingsDictionary = appSettingsDictionary; + SiteConfigPropertiesDictionary = siteConfigPropertiesDictionary; CustomInit(); } @@ -127,5 +141,27 @@ public StackMajorVersion() [JsonProperty(PropertyName = "isHidden")] public bool? IsHidden { get; set; } + /// + /// Gets or sets &lt;appSettings&gt; + /// &lt;appSetting name="FUNCTIONS_WORKER_RUNTIME" value="dotnet" + /// /&gt; + /// &lt;/appSettings&gt; + /// Example: All the function apps need AppSetting: + /// "FUNCTIONS_WORKER_RUNTIME" to be set stack name + /// + [JsonProperty(PropertyName = "appSettingsDictionary")] + public IDictionary AppSettingsDictionary { get; set; } + + /// + /// Gets or sets &lt;siteConfigProperties&gt; + /// &lt;siteConfigProperty name="Use32BitWorkerProcess" + /// value="false" /&gt; + /// &lt;/siteConfigProperties&gt; + /// Example: All Linux Function Apps, need Use32BitWorkerProcess to be + /// set to 0 + /// + [JsonProperty(PropertyName = "siteConfigPropertiesDictionary")] + public IDictionary SiteConfigPropertiesDictionary { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs new file mode 100644 index 000000000000..d12283ab5958 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for StackPreferredOs. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StackPreferredOs + { + [EnumMember(Value = "Windows")] + Windows, + [EnumMember(Value = "Linux")] + Linux + } + internal static class StackPreferredOsEnumExtension + { + internal static string ToSerializedValue(this StackPreferredOs? value) + { + return value == null ? null : ((StackPreferredOs)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this StackPreferredOs value) + { + switch( value ) + { + case StackPreferredOs.Windows: + return "Windows"; + case StackPreferredOs.Linux: + return "Linux"; + } + return null; + } + + internal static StackPreferredOs? ParseStackPreferredOs(this string value) + { + switch( value ) + { + case "Windows": + return StackPreferredOs.Windows; + case "Linux": + return StackPreferredOs.Linux; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs new file mode 100644 index 000000000000..ecc4ba1af774 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for StagingEnvironmentPolicy. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StagingEnvironmentPolicy + { + [EnumMember(Value = "Enabled")] + Enabled, + [EnumMember(Value = "Disabled")] + Disabled + } + internal static class StagingEnvironmentPolicyEnumExtension + { + internal static string ToSerializedValue(this StagingEnvironmentPolicy? value) + { + return value == null ? null : ((StagingEnvironmentPolicy)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this StagingEnvironmentPolicy value) + { + switch( value ) + { + case StagingEnvironmentPolicy.Enabled: + return "Enabled"; + case StagingEnvironmentPolicy.Disabled: + return "Disabled"; + } + return null; + } + + internal static StagingEnvironmentPolicy? ParseStagingEnvironmentPolicy(this string value) + { + switch( value ) + { + case "Enabled": + return StagingEnvironmentPolicy.Enabled; + case "Disabled": + return StagingEnvironmentPolicy.Disabled; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs index c775cdc8eb11..05fb910f6b8d 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs @@ -38,8 +38,9 @@ public StampCapacity() /// Shared/dedicated workers. Possible values /// include: 'Shared', 'Dedicated', 'Dynamic' /// Size of the machines. Possible values - /// include: 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', - /// 'NestedSmall', 'Default' + /// include: 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'SmallV3', + /// 'MediumV3', 'LargeV3', 'NestedSmall', 'NestedSmallLinux', + /// 'Default' /// Size ID of machines: /// 0 - Small /// 1 - Medium @@ -109,8 +110,8 @@ public StampCapacity() /// /// Gets or sets size of the machines. Possible values include: - /// 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', - /// 'Default' + /// 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'SmallV3', + /// 'MediumV3', 'LargeV3', 'NestedSmall', 'NestedSmallLinux', 'Default' /// [JsonProperty(PropertyName = "workerSize")] public WorkerSizeOptions? WorkerSize { get; set; } 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 656ca9e54a50..01182698e415 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 @@ -52,7 +52,25 @@ public StaticSiteARMResource() /// secrets. /// Build properties to configure on the /// repository. - 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), SkuDescription sku = default(SkuDescription)) + /// Private endpoint + /// connections + /// State indicating whether + /// staging environments are allowed or not allowed for a static web + /// app. Possible values include: 'Enabled', 'Disabled' + /// <code>false</code> + /// if config file is locked for this static web app; otherwise, + /// <code>true</code>. + /// Template options for generating a + /// new repository. + /// The content distribution + /// endpoint for the static site. + /// Identity to use for Key + /// Vault Reference authentication. + /// User provided function apps + /// 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)) : base(location, id, name, kind, type, tags) { DefaultHostname = defaultHostname; @@ -61,7 +79,16 @@ public StaticSiteARMResource() CustomDomains = customDomains; RepositoryToken = repositoryToken; BuildProperties = buildProperties; + PrivateEndpointConnections = privateEndpointConnections; + StagingEnvironmentPolicy = stagingEnvironmentPolicy; + AllowConfigFileUpdates = allowConfigFileUpdates; + TemplateProperties = templateProperties; + ContentDistributionEndpoint = contentDistributionEndpoint; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; + UserProvidedFunctionApps = userProvidedFunctionApps; + Provider = provider; Sku = sku; + Identity = identity; CustomInit(); } @@ -107,11 +134,69 @@ public StaticSiteARMResource() [JsonProperty(PropertyName = "properties.buildProperties")] public StaticSiteBuildProperties BuildProperties { get; set; } + /// + /// Gets private endpoint connections + /// + [JsonProperty(PropertyName = "properties.privateEndpointConnections")] + public IList PrivateEndpointConnections { get; private set; } + + /// + /// Gets or sets state indicating whether staging environments are + /// allowed or not allowed for a static web app. Possible values + /// include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.stagingEnvironmentPolicy")] + public StagingEnvironmentPolicy? StagingEnvironmentPolicy { get; set; } + + /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if + /// config file is locked for this static web app; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.allowConfigFileUpdates")] + public bool? AllowConfigFileUpdates { get; set; } + + /// + /// Gets or sets template options for generating a new repository. + /// + [JsonProperty(PropertyName = "properties.templateProperties")] + public StaticSiteTemplateOptions TemplateProperties { get; set; } + + /// + /// Gets the content distribution endpoint for the static site. + /// + [JsonProperty(PropertyName = "properties.contentDistributionEndpoint")] + public string ContentDistributionEndpoint { get; private set; } + + /// + /// Gets identity to use for Key Vault Reference authentication. + /// + [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; private set; } + + /// + /// Gets user provided function apps registered with the static site + /// + [JsonProperty(PropertyName = "properties.userProvidedFunctionApps")] + public IList UserProvidedFunctionApps { get; private set; } + + /// + /// Gets 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; } + /// /// [JsonProperty(PropertyName = "sku")] public SkuDescription Sku { get; set; } + /// + /// + [JsonProperty(PropertyName = "identity")] + public ManagedServiceIdentity Identity { get; set; } + /// /// Validate the object. /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs index b82f1efcf925..12a4c431d1fe 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs @@ -13,6 +13,8 @@ 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; /// @@ -48,7 +50,9 @@ public StaticSiteBuildARMResource() /// The status of the static site build. Possible /// values include: 'WaitingForDeployment', 'Uploading', 'Deploying', /// 'Ready', 'Failed', 'Deleting', 'Detached' - public StaticSiteBuildARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string buildId = default(string), string sourceBranch = default(string), string pullRequestTitle = default(string), string hostname = default(string), System.DateTime? createdTimeUtc = default(System.DateTime?), System.DateTime? lastUpdatedOn = default(System.DateTime?), string status = default(string)) + /// User provided function apps + /// registered with the static site build + public StaticSiteBuildARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string buildId = default(string), string sourceBranch = default(string), string pullRequestTitle = default(string), string hostname = default(string), System.DateTime? createdTimeUtc = default(System.DateTime?), System.DateTime? lastUpdatedOn = default(System.DateTime?), string status = default(string), IList userProvidedFunctionApps = default(IList)) : base(id, name, kind, type) { BuildId = buildId; @@ -58,6 +62,7 @@ public StaticSiteBuildARMResource() CreatedTimeUtc = createdTimeUtc; LastUpdatedOn = lastUpdatedOn; Status = status; + UserProvidedFunctionApps = userProvidedFunctionApps; CustomInit(); } @@ -111,5 +116,12 @@ public StaticSiteBuildARMResource() [JsonProperty(PropertyName = "properties.status")] public string Status { get; private set; } + /// + /// Gets user provided function apps registered with the static site + /// build + /// + [JsonProperty(PropertyName = "properties.userProvidedFunctionApps")] + public IList UserProvidedFunctionApps { get; private set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs index be1c6117947d..1fb669c33640 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs @@ -33,13 +33,29 @@ public StaticSiteBuildProperties() /// repository. /// The path to the api code within the /// repository. - /// The path of the app artifacts - /// after building. - public StaticSiteBuildProperties(string appLocation = default(string), string apiLocation = default(string), string appArtifactLocation = default(string)) + /// Deprecated: The path of the app + /// artifacts after building (deprecated in favor of + /// OutputLocation) + /// The output path of the app after + /// building. + /// A custom command to run during + /// deployment of the static content application. + /// A custom command to run during + /// deployment of the Azure Functions API application. + /// Skip Github Action + /// workflow generation. + /// Github Action secret + /// name override. + public StaticSiteBuildProperties(string appLocation = default(string), string apiLocation = default(string), string appArtifactLocation = default(string), string outputLocation = default(string), string appBuildCommand = default(string), string apiBuildCommand = default(string), bool? skipGithubActionWorkflowGeneration = default(bool?), string githubActionSecretNameOverride = default(string)) { AppLocation = appLocation; ApiLocation = apiLocation; AppArtifactLocation = appArtifactLocation; + OutputLocation = outputLocation; + AppBuildCommand = appBuildCommand; + ApiBuildCommand = apiBuildCommand; + SkipGithubActionWorkflowGeneration = skipGithubActionWorkflowGeneration; + GithubActionSecretNameOverride = githubActionSecretNameOverride; CustomInit(); } @@ -61,10 +77,43 @@ public StaticSiteBuildProperties() public string ApiLocation { get; set; } /// - /// Gets or sets the path of the app artifacts after building. + /// Gets or sets deprecated: The path of the app artifacts after + /// building (deprecated in favor of OutputLocation) /// [JsonProperty(PropertyName = "appArtifactLocation")] public string AppArtifactLocation { get; set; } + /// + /// Gets or sets the output path of the app after building. + /// + [JsonProperty(PropertyName = "outputLocation")] + public string OutputLocation { get; set; } + + /// + /// Gets or sets a custom command to run during deployment of the + /// static content application. + /// + [JsonProperty(PropertyName = "appBuildCommand")] + public string AppBuildCommand { get; set; } + + /// + /// Gets or sets a custom command to run during deployment of the Azure + /// Functions API application. + /// + [JsonProperty(PropertyName = "apiBuildCommand")] + public string ApiBuildCommand { get; set; } + + /// + /// Gets or sets skip Github Action workflow generation. + /// + [JsonProperty(PropertyName = "skipGithubActionWorkflowGeneration")] + public bool? SkipGithubActionWorkflowGeneration { get; set; } + + /// + /// Gets or sets github Action secret name override. + /// + [JsonProperty(PropertyName = "githubActionSecretNameOverride")] + public string GithubActionSecretNameOverride { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs index b2dca77065cf..2a2403117477 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs @@ -42,11 +42,19 @@ public StaticSiteCustomDomainOverviewARMResource() /// domain. /// The date and time on which the custom /// domain was created for the static site. - public StaticSiteCustomDomainOverviewARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string domainName = default(string), System.DateTime? createdOn = default(System.DateTime?)) + /// The status of the custom domain. Possible + /// values include: 'RetrievingValidationToken', 'Validating', + /// 'Adding', 'Ready', 'Failed', 'Deleting' + /// The TXT record validation + /// token + public StaticSiteCustomDomainOverviewARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string domainName = default(string), System.DateTime? createdOn = default(System.DateTime?), string status = default(string), string validationToken = default(string), string errorMessage = default(string)) : base(id, name, kind, type) { DomainName = domainName; CreatedOn = createdOn; + Status = status; + ValidationToken = validationToken; + ErrorMessage = errorMessage; CustomInit(); } @@ -68,5 +76,24 @@ public StaticSiteCustomDomainOverviewARMResource() [JsonProperty(PropertyName = "properties.createdOn")] public System.DateTime? CreatedOn { get; private set; } + /// + /// Gets the status of the custom domain. Possible values include: + /// 'RetrievingValidationToken', 'Validating', 'Adding', 'Ready', + /// 'Failed', 'Deleting' + /// + [JsonProperty(PropertyName = "properties.status")] + public string Status { get; private set; } + + /// + /// Gets the TXT record validation token + /// + [JsonProperty(PropertyName = "properties.validationToken")] + public string ValidationToken { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "properties.errorMessage")] + public string ErrorMessage { get; private set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.cs new file mode 100644 index 000000000000..caee85ae6064 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.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 Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Static Site Custom Domain Request Properties ARM resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class StaticSiteCustomDomainRequestPropertiesARMResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the + /// StaticSiteCustomDomainRequestPropertiesARMResource class. + /// + public StaticSiteCustomDomainRequestPropertiesARMResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// StaticSiteCustomDomainRequestPropertiesARMResource class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Validation method for adding a + /// custom domain + public StaticSiteCustomDomainRequestPropertiesARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string validationMethod = default(string)) + : base(id, name, kind, type) + { + ValidationMethod = validationMethod; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets validation method for adding a custom domain + /// + [JsonProperty(PropertyName = "properties.validationMethod")] + public string ValidationMethod { 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 a4de50863546..c7c8eb15aff9 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 @@ -50,7 +50,25 @@ public StaticSitePatchResource() /// secrets. /// Build properties to configure on the /// repository. - 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)) + /// Private endpoint + /// connections + /// State indicating whether + /// staging environments are allowed or not allowed for a static web + /// app. Possible values include: 'Enabled', 'Disabled' + /// <code>false</code> + /// if config file is locked for this static web app; otherwise, + /// <code>true</code>. + /// Template options for generating a + /// new repository. + /// The content distribution + /// endpoint for the static site. + /// Identity to use for Key + /// Vault Reference authentication. + /// User provided function apps + /// 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)) : base(id, name, kind, type) { DefaultHostname = defaultHostname; @@ -59,6 +77,14 @@ public StaticSitePatchResource() CustomDomains = customDomains; RepositoryToken = repositoryToken; BuildProperties = buildProperties; + PrivateEndpointConnections = privateEndpointConnections; + StagingEnvironmentPolicy = stagingEnvironmentPolicy; + AllowConfigFileUpdates = allowConfigFileUpdates; + TemplateProperties = templateProperties; + ContentDistributionEndpoint = contentDistributionEndpoint; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; + UserProvidedFunctionApps = userProvidedFunctionApps; + Provider = provider; CustomInit(); } @@ -104,5 +130,58 @@ public StaticSitePatchResource() [JsonProperty(PropertyName = "properties.buildProperties")] public StaticSiteBuildProperties BuildProperties { get; set; } + /// + /// Gets private endpoint connections + /// + [JsonProperty(PropertyName = "properties.privateEndpointConnections")] + public IList PrivateEndpointConnections { get; private set; } + + /// + /// Gets or sets state indicating whether staging environments are + /// allowed or not allowed for a static web app. Possible values + /// include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.stagingEnvironmentPolicy")] + public StagingEnvironmentPolicy? StagingEnvironmentPolicy { get; set; } + + /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if + /// config file is locked for this static web app; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "properties.allowConfigFileUpdates")] + public bool? AllowConfigFileUpdates { get; set; } + + /// + /// Gets or sets template options for generating a new repository. + /// + [JsonProperty(PropertyName = "properties.templateProperties")] + public StaticSiteTemplateOptions TemplateProperties { get; set; } + + /// + /// Gets the content distribution endpoint for the static site. + /// + [JsonProperty(PropertyName = "properties.contentDistributionEndpoint")] + public string ContentDistributionEndpoint { get; private set; } + + /// + /// Gets identity to use for Key Vault Reference authentication. + /// + [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; private set; } + + /// + /// Gets user provided function apps registered with the static site + /// + [JsonProperty(PropertyName = "properties.userProvidedFunctionApps")] + public IList UserProvidedFunctionApps { get; private set; } + + /// + /// Gets 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; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs new file mode 100644 index 000000000000..ad8cb9674adf --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs @@ -0,0 +1,91 @@ +// +// 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; + + /// + /// Template Options for the static site. + /// + public partial class StaticSiteTemplateOptions + { + /// + /// Initializes a new instance of the StaticSiteTemplateOptions class. + /// + public StaticSiteTemplateOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StaticSiteTemplateOptions class. + /// + /// URL of the template repository. + /// The newly generated repository will be based on this one. + /// Owner of the newly generated + /// repository. + /// Name of the newly generated + /// repository. + /// Description of the newly generated + /// repository. + /// Whether or not the newly generated + /// repository is a private repository. Defaults to false (i.e. + /// public). + public StaticSiteTemplateOptions(string templateRepositoryUrl = default(string), string owner = default(string), string repositoryName = default(string), string description = default(string), bool? isPrivate = default(bool?)) + { + TemplateRepositoryUrl = templateRepositoryUrl; + Owner = owner; + RepositoryName = repositoryName; + Description = description; + IsPrivate = isPrivate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URL of the template repository. The newly generated + /// repository will be based on this one. + /// + [JsonProperty(PropertyName = "templateRepositoryUrl")] + public string TemplateRepositoryUrl { get; set; } + + /// + /// Gets or sets owner of the newly generated repository. + /// + [JsonProperty(PropertyName = "owner")] + public string Owner { get; set; } + + /// + /// Gets or sets name of the newly generated repository. + /// + [JsonProperty(PropertyName = "repositoryName")] + public string RepositoryName { get; set; } + + /// + /// Gets or sets description of the newly generated repository. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets whether or not the newly generated repository is a + /// private repository. Defaults to false (i.e. public). + /// + [JsonProperty(PropertyName = "isPrivate")] + public bool? IsPrivate { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs new file mode 100644 index 000000000000..d21a687e9567 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs @@ -0,0 +1,83 @@ +// +// 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; + + /// + /// A static site user provided function. + /// + [Rest.Serialization.JsonTransformation] + public partial class StaticSiteUserProvidedFunctionApp : ProxyOnlyResource + { + /// + /// Initializes a new instance of the StaticSiteUserProvidedFunctionApp + /// class. + /// + public StaticSiteUserProvidedFunctionApp() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StaticSiteUserProvidedFunctionApp + /// class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// The resource id of the function + /// app registered with the static site + /// The region of the function app + /// registered with the static site + /// The date and time on which the function app + /// was registered with the static site. + public StaticSiteUserProvidedFunctionApp(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string functionAppResourceId = default(string), string functionAppRegion = default(string), System.DateTime? createdOn = default(System.DateTime?)) + : base(id, name, kind, type) + { + FunctionAppResourceId = functionAppResourceId; + FunctionAppRegion = functionAppRegion; + CreatedOn = createdOn; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource id of the function app registered with + /// the static site + /// + [JsonProperty(PropertyName = "properties.functionAppResourceId")] + public string FunctionAppResourceId { get; set; } + + /// + /// Gets or sets the region of the function app registered with the + /// static site + /// + [JsonProperty(PropertyName = "properties.functionAppRegion")] + public string FunctionAppRegion { get; set; } + + /// + /// Gets the date and time on which the function app was registered + /// with the static site. + /// + [JsonProperty(PropertyName = "properties.createdOn")] + public System.DateTime? CreatedOn { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs new file mode 100644 index 000000000000..b7652412f1c0 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs @@ -0,0 +1,83 @@ +// +// 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; + + /// + /// Static Site User Provided Function App ARM resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class StaticSiteUserProvidedFunctionAppARMResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the + /// StaticSiteUserProvidedFunctionAppARMResource class. + /// + public StaticSiteUserProvidedFunctionAppARMResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// StaticSiteUserProvidedFunctionAppARMResource class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// The resource id of the function + /// app registered with the static site + /// The region of the function app + /// registered with the static site + /// The date and time on which the function app + /// was registered with the static site. + public StaticSiteUserProvidedFunctionAppARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string functionAppResourceId = default(string), string functionAppRegion = default(string), System.DateTime? createdOn = default(System.DateTime?)) + : base(id, name, kind, type) + { + FunctionAppResourceId = functionAppResourceId; + FunctionAppRegion = functionAppRegion; + CreatedOn = createdOn; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource id of the function app registered with + /// the static site + /// + [JsonProperty(PropertyName = "properties.functionAppResourceId")] + public string FunctionAppResourceId { get; set; } + + /// + /// Gets or sets the region of the function app registered with the + /// static site + /// + [JsonProperty(PropertyName = "properties.functionAppRegion")] + public string FunctionAppRegion { get; set; } + + /// + /// Gets the date and time on which the function app was registered + /// with the static site. + /// + [JsonProperty(PropertyName = "properties.createdOn")] + public System.DateTime? CreatedOn { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs new file mode 100644 index 000000000000..ec3255096a8f --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs @@ -0,0 +1,96 @@ +// +// 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; + + /// + /// Static site zip deployment ARM resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class StaticSiteZipDeploymentARMResource : ProxyOnlyResource + { + /// + /// Initializes a new instance of the + /// StaticSiteZipDeploymentARMResource class. + /// + public StaticSiteZipDeploymentARMResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// StaticSiteZipDeploymentARMResource class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// URL for the zipped app content + /// URL for the zipped api content + /// A title to label the + /// deployment + /// The provider submitting this + /// deployment + /// The language of the api content, if + /// it exists + public StaticSiteZipDeploymentARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string appZipUrl = default(string), string apiZipUrl = default(string), string deploymentTitle = default(string), string provider = default(string), string functionLanguage = default(string)) + : base(id, name, kind, type) + { + AppZipUrl = appZipUrl; + ApiZipUrl = apiZipUrl; + DeploymentTitle = deploymentTitle; + Provider = provider; + FunctionLanguage = functionLanguage; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URL for the zipped app content + /// + [JsonProperty(PropertyName = "properties.appZipUrl")] + public string AppZipUrl { get; set; } + + /// + /// Gets or sets URL for the zipped api content + /// + [JsonProperty(PropertyName = "properties.apiZipUrl")] + public string ApiZipUrl { get; set; } + + /// + /// Gets or sets a title to label the deployment + /// + [JsonProperty(PropertyName = "properties.deploymentTitle")] + public string DeploymentTitle { get; set; } + + /// + /// Gets or sets the provider submitting this deployment + /// + [JsonProperty(PropertyName = "properties.provider")] + public string Provider { get; set; } + + /// + /// Gets or sets the language of the api content, if it exists + /// + [JsonProperty(PropertyName = "properties.functionLanguage")] + public string FunctionLanguage { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.cs new file mode 100644 index 000000000000..33b41a8623e2 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.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 Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Preview for the Static Site Workflow to be generated + /// + [Rest.Serialization.JsonTransformation] + public partial class StaticSitesWorkflowPreview : ProxyOnlyResource + { + /// + /// Initializes a new instance of the StaticSitesWorkflowPreview class. + /// + public StaticSitesWorkflowPreview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StaticSitesWorkflowPreview class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// The path for the workflow file to be + /// generated + /// The contents for the workflow file to be + /// generated + public StaticSitesWorkflowPreview(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string path = default(string), string contents = default(string)) + : base(id, name, kind, type) + { + Path = path; + Contents = contents; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the path for the workflow file to be generated + /// + [JsonProperty(PropertyName = "properties.path")] + public string Path { get; private set; } + + /// + /// Gets the contents for the workflow file to be generated + /// + [JsonProperty(PropertyName = "properties.contents")] + public string Contents { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs new file mode 100644 index 000000000000..98297a655dbd --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs @@ -0,0 +1,79 @@ +// +// 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; + + /// + /// Request entity for previewing the Static Site workflow + /// + [Rest.Serialization.JsonTransformation] + public partial class StaticSitesWorkflowPreviewRequest : ProxyOnlyResource + { + /// + /// Initializes a new instance of the StaticSitesWorkflowPreviewRequest + /// class. + /// + public StaticSitesWorkflowPreviewRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StaticSitesWorkflowPreviewRequest + /// class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// URL for the repository of the static + /// site. + /// The target branch in the repository. + /// Build properties to configure on the + /// repository. + public StaticSitesWorkflowPreviewRequest(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string repositoryUrl = default(string), string branch = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties)) + : base(id, name, kind, type) + { + RepositoryUrl = repositoryUrl; + Branch = branch; + BuildProperties = buildProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URL for the repository of the static site. + /// + [JsonProperty(PropertyName = "properties.repositoryUrl")] + public string RepositoryUrl { get; set; } + + /// + /// Gets or sets the target branch in the repository. + /// + [JsonProperty(PropertyName = "properties.branch")] + public string Branch { get; set; } + + /// + /// Gets or sets build properties to configure on the repository. + /// + [JsonProperty(PropertyName = "properties.buildProperties")] + public StaticSiteBuildProperties BuildProperties { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs new file mode 100644 index 000000000000..c53ab12d6064 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs @@ -0,0 +1,64 @@ +// +// 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; + + /// + /// Identify the status of the most severe insight generated by the + /// detector. + /// + public partial class Status + { + /// + /// Initializes a new instance of the Status class. + /// + public Status() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Status class. + /// + /// Descriptive message. + /// Level of the most severe insight generated + /// by the detector. Possible values include: 'Critical', 'Warning', + /// 'Info', 'Success', 'None' + public Status(string message = default(string), InsightStatus? statusId = default(InsightStatus?)) + { + Message = message; + StatusId = statusId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets descriptive message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets level of the most severe insight generated by the + /// detector. Possible values include: 'Critical', 'Warning', 'Info', + /// 'Success', 'None' + /// + [JsonProperty(PropertyName = "statusId")] + public InsightStatus? StatusId { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs index f5a0016591e9..de810774d66c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs @@ -34,13 +34,15 @@ public StatusCodesBasedTrigger() /// Win32 error code. /// Request Count. /// Time interval. - public StatusCodesBasedTrigger(int? status = default(int?), int? subStatus = default(int?), int? win32Status = default(int?), int? count = default(int?), string timeInterval = default(string)) + /// Request Path + public StatusCodesBasedTrigger(int? status = default(int?), int? subStatus = default(int?), int? win32Status = default(int?), int? count = default(int?), string timeInterval = default(string), string path = default(string)) { Status = status; SubStatus = subStatus; Win32Status = win32Status; Count = count; TimeInterval = timeInterval; + Path = path; CustomInit(); } @@ -79,5 +81,11 @@ public StatusCodesBasedTrigger() [JsonProperty(PropertyName = "timeInterval")] public string TimeInterval { get; set; } + /// + /// Gets or sets request Path + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.cs new file mode 100644 index 000000000000..e3d3dfe55380 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.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; + + /// + /// Trigger based on range of status codes. + /// + public partial class StatusCodesRangeBasedTrigger + { + /// + /// Initializes a new instance of the StatusCodesRangeBasedTrigger + /// class. + /// + public StatusCodesRangeBasedTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StatusCodesRangeBasedTrigger + /// class. + /// + /// HTTP status code. + /// Request Count. + /// Time interval. + public StatusCodesRangeBasedTrigger(string statusCodes = default(string), string path = default(string), int? count = default(int?), string timeInterval = default(string)) + { + StatusCodes = statusCodes; + Path = path; + Count = count; + TimeInterval = timeInterval; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets HTTP status code. + /// + [JsonProperty(PropertyName = "statusCodes")] + public string StatusCodes { get; set; } + + /// + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets request Count. + /// + [JsonProperty(PropertyName = "count")] + public int? Count { get; set; } + + /// + /// Gets or sets time interval. + /// + [JsonProperty(PropertyName = "timeInterval")] + public string TimeInterval { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs new file mode 100644 index 000000000000..4303d47c3dee --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.WebSites.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for StorageType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StorageType + { + [EnumMember(Value = "LocalNode")] + LocalNode, + [EnumMember(Value = "NetworkFileSystem")] + NetworkFileSystem + } + internal static class StorageTypeEnumExtension + { + internal static string ToSerializedValue(this StorageType? value) + { + return value == null ? null : ((StorageType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this StorageType value) + { + switch( value ) + { + case StorageType.LocalNode: + return "LocalNode"; + case StorageType.NetworkFileSystem: + return "NetworkFileSystem"; + } + return null; + } + + internal static StorageType? ParseStorageType(this string value) + { + switch( value ) + { + case "LocalNode": + return StorageType.LocalNode; + case "NetworkFileSystem": + return StorageType.NetworkFileSystem; + } + return null; + } + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs new file mode 100644 index 000000000000..cb1f2518c84d --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs @@ -0,0 +1,58 @@ +// +// 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; + + /// + /// String list resource. + /// + public partial class StringList : ProxyOnlyResource + { + /// + /// Initializes a new instance of the StringList class. + /// + public StringList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StringList class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// List of string resources. + public StringList(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList properties = default(IList)) + : base(id, name, kind, type) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of string resources. + /// + [JsonProperty(PropertyName = "properties")] + public IList Properties { get; set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.cs new file mode 100644 index 000000000000..46fd238f182d --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.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; + + /// + /// Defines a unique Support Topic + /// + public partial class SupportTopic + { + /// + /// Initializes a new instance of the SupportTopic class. + /// + public SupportTopic() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SupportTopic class. + /// + /// Support Topic Id + /// Unique resource Id + public SupportTopic(string id = default(string), string pesId = default(string)) + { + Id = id; + PesId = pesId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets support Topic Id + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets unique resource Id + /// + [JsonProperty(PropertyName = "pesId")] + public string PesId { get; private 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 ffe3edf35446..3bab06bd3ab3 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the token store. + /// [Rest.Serialization.JsonTransformation] public partial class TokenStore : ProxyOnlyResource { @@ -33,6 +36,17 @@ public TokenStore() /// 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>. + /// The default is <code>false</code>. + /// The number of hours after + /// session token expiration that a session token can be used to + /// call the token refresh API. The default is 72 hours. + /// The configuration settings of the storage + /// 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) { @@ -49,21 +63,33 @@ public TokenStore() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;true&lt;/code&gt; to + /// durably store platform-specific security tokens that are obtained + /// during login flows; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// The default is &lt;code&gt;false&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the number of hours after session token expiration + /// that a session token can be used to + /// call the token refresh API. The default is 72 hours. /// [JsonProperty(PropertyName = "properties.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")] 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")] public BlobStorageTokenStore AzureBlobStorage { 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 c2c7bdf49b9c..32d8b05a116a 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 @@ -15,6 +15,9 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the Twitter provider. + /// [Rest.Serialization.JsonTransformation] public partial class Twitter : ProxyOnlyResource { @@ -33,6 +36,11 @@ public Twitter() /// 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) { @@ -47,11 +55,17 @@ public Twitter() partial void CustomInit(); /// + /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the + /// Twitter provider should not be enabled despite the set + /// registration; otherwise, + /// &lt;code&gt;true&lt;/code&gt;. /// [JsonProperty(PropertyName = "properties.enabled")] public bool? Enabled { get; set; } /// + /// Gets or sets the configuration settings of the app registration for + /// the Twitter provider. /// [JsonProperty(PropertyName = "properties.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 92b77941cf02..466cd1f256f8 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 @@ -15,6 +15,10 @@ namespace Microsoft.Azure.Management.WebSites.Models using Newtonsoft.Json; using System.Linq; + /// + /// The configuration settings of the app registration for the Twitter + /// provider. + /// [Rest.Serialization.JsonTransformation] public partial class TwitterRegistration : ProxyOnlyResource { @@ -33,6 +37,14 @@ public TwitterRegistration() /// 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. + /// Twitter Sign-In documentation: + /// https://dev.twitter.com/web/sign-in + /// 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) { @@ -47,11 +59,18 @@ public TwitterRegistration() partial void CustomInit(); /// + /// Gets or sets the OAuth 1.0a consumer key of the Twitter application + /// used for sign-in. + /// This setting is required for enabling Twitter Sign-In. + /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in /// [JsonProperty(PropertyName = "properties.consumerKey")] public string ConsumerKey { get; set; } /// + /// Gets or sets the app setting name that contains the OAuth 1.0a + /// consumer secret of the Twitter + /// application used for sign-in. /// [JsonProperty(PropertyName = "properties.consumerSecretSettingName")] public string ConsumerSecretSettingName { get; set; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs index a582a0780b0e..cfab40caac5c 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs @@ -34,7 +34,8 @@ public ValidateRequest() /// /// Resource name to verify. /// Resource type used for verification. Possible - /// values include: 'ServerFarm', 'Site' + /// values include: 'ServerFarm', 'Site', + /// 'Microsoft.Web/hostingEnvironments' /// Expected location of the resource. /// ARM resource ID of an App Service plan /// that would host the app. @@ -63,7 +64,9 @@ public ValidateRequest() /// Image tag /// Platform (windows or /// linux) - public ValidateRequest(string name, string type, string location, string serverFarmId = default(string), string skuName = default(string), bool? needLinuxWorkers = default(bool?), bool? isSpot = default(bool?), int? capacity = default(int?), string hostingEnvironment = default(string), bool? isXenon = default(bool?), string containerRegistryBaseUrl = default(string), string containerRegistryUsername = default(string), string containerRegistryPassword = default(string), string containerImageRepository = default(string), string containerImageTag = default(string), string containerImagePlatform = default(string)) + /// App Service Environment + /// Properties + public ValidateRequest(string name, string type, string location, string serverFarmId = default(string), string skuName = default(string), bool? needLinuxWorkers = default(bool?), bool? isSpot = default(bool?), int? capacity = default(int?), string hostingEnvironment = default(string), bool? isXenon = default(bool?), string containerRegistryBaseUrl = default(string), string containerRegistryUsername = default(string), string containerRegistryPassword = default(string), string containerImageRepository = default(string), string containerImageTag = default(string), string containerImagePlatform = default(string), AppServiceEnvironment appServiceEnvironment = default(AppServiceEnvironment)) { Name = name; Type = type; @@ -81,6 +84,7 @@ public ValidateRequest() ContainerImageRepository = containerImageRepository; ContainerImageTag = containerImageTag; ContainerImagePlatform = containerImagePlatform; + AppServiceEnvironment = appServiceEnvironment; CustomInit(); } @@ -97,7 +101,7 @@ public ValidateRequest() /// /// Gets or sets resource type used for verification. Possible values - /// include: 'ServerFarm', 'Site' + /// include: 'ServerFarm', 'Site', 'Microsoft.Web/hostingEnvironments' /// [JsonProperty(PropertyName = "type")] public string Type { get; set; } @@ -194,6 +198,12 @@ public ValidateRequest() [JsonProperty(PropertyName = "properties.containerImagePlatform")] public string ContainerImagePlatform { get; set; } + /// + /// Gets or sets app Service Environment Properties + /// + [JsonProperty(PropertyName = "properties.appServiceEnvironment")] + public AppServiceEnvironment AppServiceEnvironment { get; set; } + /// /// Validate the object. /// @@ -218,6 +228,10 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMinimum, "Capacity", 1); } + if (AppServiceEnvironment != null) + { + AppServiceEnvironment.Validate(); + } } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs index 511049be371b..1c771a665519 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs @@ -18,5 +18,6 @@ public static class ValidateResourceTypes { public const string ServerFarm = "ServerFarm"; public const string Site = "Site"; + public const string MicrosoftWebHostingEnvironments = "Microsoft.Web/hostingEnvironments"; } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs index a9162d3a1626..55e03d256121 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.WebSites.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -34,7 +35,7 @@ public VirtualNetworkProfile() /// Resource type of the Virtual Network /// (read-only). /// Subnet within the Virtual Network. - public VirtualNetworkProfile(string id = default(string), string name = default(string), string type = default(string), string subnet = default(string)) + public VirtualNetworkProfile(string id, string name = default(string), string type = default(string), string subnet = default(string)) { Id = id; Name = name; @@ -72,5 +73,18 @@ public VirtualNetworkProfile() [JsonProperty(PropertyName = "subnet")] public string Subnet { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Id"); + } + } } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs index 0afb85613b5f..bfd2641e12d9 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs @@ -41,12 +41,15 @@ public VnetParameters() /// The name of the VNET to be validated /// The subnet name to be /// validated - public VnetParameters(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetResourceGroup = default(string), string vnetName = default(string), string vnetSubnetName = default(string)) + /// The ARM Resource ID of the subnet to + /// validate + public VnetParameters(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetResourceGroup = default(string), string vnetName = default(string), string vnetSubnetName = default(string), string subnetResourceId = default(string)) : base(id, name, kind, type) { VnetResourceGroup = vnetResourceGroup; VnetName = vnetName; VnetSubnetName = vnetSubnetName; + SubnetResourceId = subnetResourceId; CustomInit(); } @@ -73,5 +76,11 @@ public VnetParameters() [JsonProperty(PropertyName = "properties.vnetSubnetName")] public string VnetSubnetName { get; set; } + /// + /// Gets or sets the ARM Resource ID of the subnet to validate + /// + [JsonProperty(PropertyName = "properties.subnetResourceId")] + public string SubnetResourceId { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs index f72ab080b2cf..fc6cb6a7c8e2 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs @@ -40,15 +40,21 @@ public VnetValidationFailureDetails() /// Resource Name. /// Kind of resource. /// Resource type. + /// Text describing the validation + /// outcome. /// A flag describing whether or not validation /// failed. /// A list of tests that failed in the /// validation. - public VnetValidationFailureDetails(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? failed = default(bool?), IList failedTests = default(IList)) + /// A list of warnings generated during + /// validation. + public VnetValidationFailureDetails(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string message = default(string), bool? failed = default(bool?), IList failedTests = default(IList), IList warnings = default(IList)) : base(id, name, kind, type) { + Message = message; Failed = failed; FailedTests = failedTests; + Warnings = warnings; CustomInit(); } @@ -57,6 +63,12 @@ public VnetValidationFailureDetails() /// partial void CustomInit(); + /// + /// Gets or sets text describing the validation outcome. + /// + [JsonProperty(PropertyName = "properties.message")] + public string Message { get; set; } + /// /// Gets or sets a flag describing whether or not validation failed. /// @@ -69,5 +81,11 @@ public VnetValidationFailureDetails() [JsonProperty(PropertyName = "properties.failedTests")] public IList FailedTests { get; set; } + /// + /// Gets or sets a list of warnings generated during validation. + /// + [JsonProperty(PropertyName = "properties.warnings")] + public IList Warnings { get; set; } + } } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.cs new file mode 100644 index 000000000000..1401f5751420 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.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 Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Web App stack major version. + /// + public partial class WebAppMajorVersion + { + /// + /// Initializes a new instance of the WebAppMajorVersion class. + /// + public WebAppMajorVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebAppMajorVersion class. + /// + /// Web App stack major version (display + /// only). + /// Web App stack major version name. + /// Minor versions associated with the + /// major version. + public WebAppMajorVersion(string displayText = default(string), string value = default(string), IList minorVersions = default(IList)) + { + DisplayText = displayText; + Value = value; + MinorVersions = minorVersions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets web App stack major version (display only). + /// + [JsonProperty(PropertyName = "displayText")] + public string DisplayText { get; private set; } + + /// + /// Gets web App stack major version name. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; private set; } + + /// + /// Gets minor versions associated with the major version. + /// + [JsonProperty(PropertyName = "minorVersions")] + public IList MinorVersions { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.cs new file mode 100644 index 000000000000..3b7864390773 --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.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; + + /// + /// Web App stack minor version. + /// + public partial class WebAppMinorVersion + { + /// + /// Initializes a new instance of the WebAppMinorVersion class. + /// + public WebAppMinorVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebAppMinorVersion class. + /// + /// Web App stack minor version (display + /// only). + /// Web App stack major version name. + /// Settings associated with the minor + /// version. + public WebAppMinorVersion(string displayText = default(string), string value = default(string), WebAppRuntimes stackSettings = default(WebAppRuntimes)) + { + DisplayText = displayText; + Value = value; + StackSettings = stackSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets web App stack minor version (display only). + /// + [JsonProperty(PropertyName = "displayText")] + public string DisplayText { get; private set; } + + /// + /// Gets web App stack major version name. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; private set; } + + /// + /// Gets settings associated with the minor version. + /// + [JsonProperty(PropertyName = "stackSettings")] + public WebAppRuntimes StackSettings { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs new file mode 100644 index 000000000000..9b2842b0248a --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs @@ -0,0 +1,152 @@ +// +// 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; + + /// + /// Web App runtime settings. + /// + public partial class WebAppRuntimeSettings + { + /// + /// Initializes a new instance of the WebAppRuntimeSettings class. + /// + public WebAppRuntimeSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebAppRuntimeSettings class. + /// + /// Web App stack minor version (runtime + /// only). + /// <code>true</code> if + /// remote debugging is supported for the stack; otherwise, + /// <code>false</code>. + /// Application Insights settings + /// associated with the minor version. + /// GitHub Actions settings + /// associated with the minor version. + /// <code>true</code> if the stack + /// is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the + /// stack is deprecated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the stack + /// should be hidden; otherwise, + /// <code>false</code>. + /// End-of-life date for the minor + /// version. + /// <code>true</code> if the + /// stack version is auto-updated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the + /// minor version is early-access; otherwise, + /// <code>false</code>. + public WebAppRuntimeSettings(string runtimeVersion = default(string), bool? remoteDebuggingSupported = default(bool?), AppInsightsWebAppStackSettings appInsightsSettings = default(AppInsightsWebAppStackSettings), GitHubActionWebAppStackSettings gitHubActionSettings = default(GitHubActionWebAppStackSettings), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) + { + RuntimeVersion = runtimeVersion; + RemoteDebuggingSupported = remoteDebuggingSupported; + AppInsightsSettings = appInsightsSettings; + GitHubActionSettings = gitHubActionSettings; + IsPreview = isPreview; + IsDeprecated = isDeprecated; + IsHidden = isHidden; + EndOfLifeDate = endOfLifeDate; + IsAutoUpdate = isAutoUpdate; + IsEarlyAccess = isEarlyAccess; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets web App stack minor version (runtime only). + /// + [JsonProperty(PropertyName = "runtimeVersion")] + public string RuntimeVersion { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if remote + /// debugging is supported for the stack; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "remoteDebuggingSupported")] + public bool? RemoteDebuggingSupported { get; private set; } + + /// + /// Gets application Insights settings associated with the minor + /// version. + /// + [JsonProperty(PropertyName = "appInsightsSettings")] + public AppInsightsWebAppStackSettings AppInsightsSettings { get; private set; } + + /// + /// Gets gitHub Actions settings associated with the minor version. + /// + [JsonProperty(PropertyName = "gitHubActionSettings")] + public GitHubActionWebAppStackSettings GitHubActionSettings { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// in preview; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// deprecated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDeprecated")] + public bool? IsDeprecated { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// should be hidden; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; private set; } + + /// + /// Gets end-of-life date for the minor version. + /// + [JsonProperty(PropertyName = "endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// version is auto-updated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isAutoUpdate")] + public bool? IsAutoUpdate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the minor + /// version is early-access; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isEarlyAccess")] + public bool? IsEarlyAccess { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs new file mode 100644 index 000000000000..06510ee15e8e --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs @@ -0,0 +1,81 @@ +// +// 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; + + /// + /// Web App stack runtimes. + /// + public partial class WebAppRuntimes + { + /// + /// Initializes a new instance of the WebAppRuntimes class. + /// + public WebAppRuntimes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebAppRuntimes class. + /// + /// Linux-specific settings + /// associated with the minor version. + /// Windows-specific settings + /// associated with the minor version. + /// Linux-specific settings + /// associated with the Java container minor version. + /// Windows-specific settings + /// associated with the Java container minor version. + public WebAppRuntimes(WebAppRuntimeSettings linuxRuntimeSettings = default(WebAppRuntimeSettings), WebAppRuntimeSettings windowsRuntimeSettings = default(WebAppRuntimeSettings), LinuxJavaContainerSettings linuxContainerSettings = default(LinuxJavaContainerSettings), WindowsJavaContainerSettings windowsContainerSettings = default(WindowsJavaContainerSettings)) + { + LinuxRuntimeSettings = linuxRuntimeSettings; + WindowsRuntimeSettings = windowsRuntimeSettings; + LinuxContainerSettings = linuxContainerSettings; + WindowsContainerSettings = windowsContainerSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets linux-specific settings associated with the minor version. + /// + [JsonProperty(PropertyName = "linuxRuntimeSettings")] + public WebAppRuntimeSettings LinuxRuntimeSettings { get; private set; } + + /// + /// Gets windows-specific settings associated with the minor version. + /// + [JsonProperty(PropertyName = "windowsRuntimeSettings")] + public WebAppRuntimeSettings WindowsRuntimeSettings { get; private set; } + + /// + /// Gets linux-specific settings associated with the Java container + /// minor version. + /// + [JsonProperty(PropertyName = "linuxContainerSettings")] + public LinuxJavaContainerSettings LinuxContainerSettings { get; private set; } + + /// + /// Gets windows-specific settings associated with the Java container + /// minor version. + /// + [JsonProperty(PropertyName = "windowsContainerSettings")] + public WindowsJavaContainerSettings WindowsContainerSettings { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs new file mode 100644 index 000000000000..37690ec2fb2d --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs @@ -0,0 +1,96 @@ +// +// 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; + + /// + /// Web App stack. + /// + [Rest.Serialization.JsonTransformation] + public partial class WebAppStack : ProxyOnlyResource + { + /// + /// Initializes a new instance of the WebAppStack class. + /// + public WebAppStack() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebAppStack class. + /// + /// Resource Id. + /// Resource Name. + /// Kind of resource. + /// Resource type. + /// Web App stack location. + /// Web App stack (display only). + /// Web App stack name. + /// List of major versions + /// available. + /// Web App stack preferred OS. Possible + /// values include: 'Windows', 'Linux' + public WebAppStack(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string location = default(string), string displayText = default(string), string value = default(string), IList majorVersions = default(IList), StackPreferredOs? preferredOs = default(StackPreferredOs?)) + : base(id, name, kind, type) + { + Location = location; + DisplayText = displayText; + Value = value; + MajorVersions = majorVersions; + PreferredOs = preferredOs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets web App stack location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + /// + /// Gets web App stack (display only). + /// + [JsonProperty(PropertyName = "properties.displayText")] + public string DisplayText { get; private set; } + + /// + /// Gets web App stack name. + /// + [JsonProperty(PropertyName = "properties.value")] + public string Value { get; private set; } + + /// + /// Gets list of major versions available. + /// + [JsonProperty(PropertyName = "properties.majorVersions")] + public IList MajorVersions { get; private set; } + + /// + /// Gets web App stack preferred OS. Possible values include: + /// 'Windows', 'Linux' + /// + [JsonProperty(PropertyName = "properties.preferredOs")] + public StackPreferredOs? PreferredOs { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs new file mode 100644 index 000000000000..a773a9d589ab --- /dev/null +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs @@ -0,0 +1,130 @@ +// +// 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; + + /// + /// Windows Java Container settings. + /// + public partial class WindowsJavaContainerSettings + { + /// + /// Initializes a new instance of the WindowsJavaContainerSettings + /// class. + /// + public WindowsJavaContainerSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindowsJavaContainerSettings + /// class. + /// + /// Java container (runtime only). + /// Java container version (runtime + /// only). + /// <code>true</code> if the stack + /// is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the + /// stack is deprecated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the stack + /// should be hidden; otherwise, + /// <code>false</code>. + /// End-of-life date for the minor + /// version. + /// <code>true</code> if the + /// stack version is auto-updated; otherwise, + /// <code>false</code>. + /// <code>true</code> if the + /// minor version is early-access; otherwise, + /// <code>false</code>. + public WindowsJavaContainerSettings(string javaContainer = default(string), string javaContainerVersion = default(string), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) + { + JavaContainer = javaContainer; + JavaContainerVersion = javaContainerVersion; + IsPreview = isPreview; + IsDeprecated = isDeprecated; + IsHidden = isHidden; + EndOfLifeDate = endOfLifeDate; + IsAutoUpdate = isAutoUpdate; + IsEarlyAccess = isEarlyAccess; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets java container (runtime only). + /// + [JsonProperty(PropertyName = "javaContainer")] + public string JavaContainer { get; private set; } + + /// + /// Gets java container version (runtime only). + /// + [JsonProperty(PropertyName = "javaContainerVersion")] + public string JavaContainerVersion { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// in preview; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is + /// deprecated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isDeprecated")] + public bool? IsDeprecated { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// should be hidden; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; private set; } + + /// + /// Gets end-of-life date for the minor version. + /// + [JsonProperty(PropertyName = "endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the stack + /// version is auto-updated; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isAutoUpdate")] + public bool? IsAutoUpdate { get; private set; } + + /// + /// Gets &lt;code&gt;true&lt;/code&gt; if the minor + /// version is early-access; otherwise, + /// &lt;code&gt;false&lt;/code&gt;. + /// + [JsonProperty(PropertyName = "isEarlyAccess")] + public bool? IsEarlyAccess { get; private set; } + + } +} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPool.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPool.cs deleted file mode 100644 index 326c9ba160f2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPool.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Worker pool of an App Service Environment. - /// - public partial class WorkerPool - { - /// - /// Initializes a new instance of the WorkerPool class. - /// - public WorkerPool() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WorkerPool class. - /// - /// Worker size ID for referencing this - /// worker pool. - /// Shared or dedicated app hosting. Possible - /// values include: 'Shared', 'Dedicated', 'Dynamic' - /// VM size of the worker pool - /// instances. - /// Number of instances in the worker - /// pool. - /// Names of all instances in the worker - /// pool (read only). - public WorkerPool(int? workerSizeId = default(int?), ComputeModeOptions? computeMode = default(ComputeModeOptions?), string workerSize = default(string), int? workerCount = default(int?), IList instanceNames = default(IList)) - { - WorkerSizeId = workerSizeId; - ComputeMode = computeMode; - WorkerSize = workerSize; - WorkerCount = workerCount; - InstanceNames = instanceNames; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets worker size ID for referencing this worker pool. - /// - [JsonProperty(PropertyName = "workerSizeId")] - public int? WorkerSizeId { get; set; } - - /// - /// Gets or sets shared or dedicated app hosting. Possible values - /// include: 'Shared', 'Dedicated', 'Dynamic' - /// - [JsonProperty(PropertyName = "computeMode")] - public ComputeModeOptions? ComputeMode { get; set; } - - /// - /// Gets or sets VM size of the worker pool instances. - /// - [JsonProperty(PropertyName = "workerSize")] - public string WorkerSize { get; set; } - - /// - /// Gets or sets number of instances in the worker pool. - /// - [JsonProperty(PropertyName = "workerCount")] - public int? WorkerCount { get; set; } - - /// - /// Gets names of all instances in the worker pool (read only). - /// - [JsonProperty(PropertyName = "instanceNames")] - public IList InstanceNames { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs index 32d869df6f66..0d125a3fdfe8 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs @@ -33,8 +33,16 @@ public enum WorkerSizeOptions D2, [EnumMember(Value = "D3")] D3, + [EnumMember(Value = "SmallV3")] + SmallV3, + [EnumMember(Value = "MediumV3")] + MediumV3, + [EnumMember(Value = "LargeV3")] + LargeV3, [EnumMember(Value = "NestedSmall")] NestedSmall, + [EnumMember(Value = "NestedSmallLinux")] + NestedSmallLinux, [EnumMember(Value = "Default")] Default } @@ -61,8 +69,16 @@ internal static string ToSerializedValue(this WorkerSizeOptions value) return "D2"; case WorkerSizeOptions.D3: return "D3"; + case WorkerSizeOptions.SmallV3: + return "SmallV3"; + case WorkerSizeOptions.MediumV3: + return "MediumV3"; + case WorkerSizeOptions.LargeV3: + return "LargeV3"; case WorkerSizeOptions.NestedSmall: return "NestedSmall"; + case WorkerSizeOptions.NestedSmallLinux: + return "NestedSmallLinux"; case WorkerSizeOptions.Default: return "Default"; } @@ -85,8 +101,16 @@ internal static string ToSerializedValue(this WorkerSizeOptions value) return WorkerSizeOptions.D2; case "D3": return WorkerSizeOptions.D3; + case "SmallV3": + return WorkerSizeOptions.SmallV3; + case "MediumV3": + return WorkerSizeOptions.MediumV3; + case "LargeV3": + return WorkerSizeOptions.LargeV3; case "NestedSmall": return WorkerSizeOptions.NestedSmall; + case "NestedSmallLinux": + return WorkerSizeOptions.NestedSmallLinux; case "Default": return WorkerSizeOptions.Default; } diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs index 547de71de032..cb24dc93b4ce 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs @@ -58,7 +58,7 @@ internal ProviderOperations(WebSiteManagementClient client) /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// /// /// Headers that will be added to request. @@ -231,13 +231,14 @@ internal ProviderOperations(WebSiteManagementClient client) } /// - /// Gets all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions + /// Get available Function app frameworks and their versions /// /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions + /// Description for Get available Function app frameworks and their versions /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// /// /// Headers that will be added to request. /// @@ -259,7 +260,7 @@ internal ProviderOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetFunctionAppStacksWithHttpMessagesAsync(string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -272,13 +273,18 @@ internal ProviderOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("stackOsType", stackOsType); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOperations", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetFunctionAppStacks", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/operations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/functionAppStacks").ToString(); List _queryParameters = new List(); + if (stackOsType != null) + { + _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, Client.SerializationSettings).Trim('"')))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -371,7 +377,7 @@ internal ProviderOperations(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")) @@ -384,7 +390,7 @@ internal ProviderOperations(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) { @@ -404,14 +410,17 @@ internal ProviderOperations(WebSiteManagementClient client) } /// - /// Get available application frameworks and their versions + /// Get available Function app frameworks and their versions for location /// /// - /// Description for Get available application frameworks and their versions + /// Description for Get available Function app frameworks and their versions + /// for location /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// + /// Function App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' /// /// /// Headers that will be added to request. @@ -434,11 +443,11 @@ internal ProviderOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetAvailableStacksOnPremWithHttpMessagesAsync(string osTypeSelected = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetFunctionAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.SubscriptionId == null) + if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "location"); } if (Client.ApiVersion == null) { @@ -451,18 +460,19 @@ internal ProviderOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("osTypeSelected", osTypeSelected); + tracingParameters.Add("location", location); + tracingParameters.Add("stackOsType", stackOsType); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAvailableStacksOnPrem", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetFunctionAppStacksForLocation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/locations/{location}/functionAppStacks").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (osTypeSelected != null) + if (stackOsType != null) { - _queryParameters.Add(string.Format("osTypeSelected={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(osTypeSelected, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, Client.SerializationSettings).Trim('"')))); } if (Client.ApiVersion != null) { @@ -556,7 +566,7 @@ internal ProviderOperations(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")) @@ -569,7 +579,7 @@ internal ProviderOperations(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) { @@ -589,13 +599,17 @@ internal ProviderOperations(WebSiteManagementClient client) } /// - /// Get available application frameworks and their versions + /// Get available Web app frameworks and their versions for location /// /// - /// Description for Get available application frameworks and their versions + /// Description for Get available Web app frameworks and their versions for + /// location /// - /// - /// The NextLink from the previous successful call to List operation. + /// + /// Web App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' /// /// /// Headers that will be added to request. @@ -618,11 +632,15 @@ internal ProviderOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetAvailableStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetWebAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextPageLink == null) + if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -631,14 +649,24 @@ internal ProviderOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("location", location); + tracingParameters.Add("stackOsType", stackOsType); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAvailableStacksNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebAppStacksForLocation", tracingParameters); } // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/locations/{location}/webAppStacks").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); + if (stackOsType != null) + { + _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, Client.SerializationSettings).Trim('"')))); + } + 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); @@ -727,7 +755,7 @@ internal ProviderOperations(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")) @@ -740,7 +768,7 @@ internal ProviderOperations(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) { @@ -767,9 +795,6 @@ internal ProviderOperations(WebSiteManagementClient client) /// Description for Gets all available operations for the Microsoft.Web /// resource provider. Also exposes resource metric definitions /// - /// - /// The NextLink from the previous successful call to List operation. - /// /// /// Headers that will be added to request. /// @@ -791,11 +816,11 @@ internal ProviderOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextPageLink == null) + if (Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -804,14 +829,17 @@ internal ProviderOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOperationsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListOperations", tracingParameters); } // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/operations").ToString(); 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); @@ -932,6 +960,1400 @@ internal ProviderOperations(WebSiteManagementClient client) return _result; } + /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// 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>> GetWebAppStacksWithHttpMessagesAsync(string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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("stackOsType", stackOsType); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetWebAppStacks", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/webAppStacks").ToString(); + List _queryParameters = new List(); + if (stackOsType != null) + { + _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, Client.SerializationSettings).Trim('"')))); + } + 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 available application frameworks and their versions + /// + /// + /// Description for Get available application frameworks and their versions + /// + /// + /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', + /// 'LinuxFunctions', 'All' + /// + /// + /// 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>> GetAvailableStacksOnPremWithHttpMessagesAsync(string osTypeSelected = default(string), 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("osTypeSelected", osTypeSelected); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAvailableStacksOnPrem", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (osTypeSelected != null) + { + _queryParameters.Add(string.Format("osTypeSelected={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(osTypeSelected, Client.SerializationSettings).Trim('"')))); + } + 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 available application frameworks and their versions + /// + /// + /// Description for Get available application frameworks and their versions + /// + /// + /// 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>> GetAvailableStacksNextWithHttpMessagesAsync(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, "GetAvailableStacksNext", 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 available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their versions + /// + /// + /// 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>> GetFunctionAppStacksNextWithHttpMessagesAsync(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, "GetFunctionAppStacksNext", 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 available Function app frameworks and their versions for location + /// + /// + /// Description for Get available Function app frameworks and their versions + /// for location + /// + /// + /// 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>> GetFunctionAppStacksForLocationNextWithHttpMessagesAsync(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, "GetFunctionAppStacksForLocationNext", 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 available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions for + /// location + /// + /// + /// 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>> GetWebAppStacksForLocationNextWithHttpMessagesAsync(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, "GetWebAppStacksForLocationNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all available operations for the Microsoft.Web resource provider. Also + /// exposes resource metric definitions + /// + /// + /// Description for Gets all available operations for the Microsoft.Web + /// resource provider. Also exposes resource metric definitions + /// + /// + /// 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>> ListOperationsNextWithHttpMessagesAsync(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, "ListOperationsNext", 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 available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// 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>> GetWebAppStacksNextWithHttpMessagesAsync(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, "GetWebAppStacksNext", 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 available application frameworks and their versions /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs index 0e9f90c4e7ac..0ee4f139be05 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs @@ -32,7 +32,7 @@ public static partial class ProviderOperationsExtensions /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// public static IPage GetAvailableStacks(this IProviderOperations operations, string osTypeSelected = default(string)) { @@ -50,7 +50,7 @@ public static partial class ProviderOperationsExtensions /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// /// /// The cancellation token. @@ -63,6 +63,142 @@ public static partial class ProviderOperationsExtensions } } + /// + /// Get available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + public static IPage GetFunctionAppStacks(this IProviderOperations operations, string stackOsType = default(string)) + { + return operations.GetFunctionAppStacksAsync(stackOsType).GetAwaiter().GetResult(); + } + + /// + /// Get available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// The cancellation token. + /// + public static async Task> GetFunctionAppStacksAsync(this IProviderOperations operations, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFunctionAppStacksWithHttpMessagesAsync(stackOsType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get available Function app frameworks and their versions for location + /// + /// + /// Description for Get available Function app frameworks and their versions + /// for location + /// + /// + /// The operations group for this extension method. + /// + /// + /// Function App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + public static IPage GetFunctionAppStacksForLocation(this IProviderOperations operations, string location, string stackOsType = default(string)) + { + return operations.GetFunctionAppStacksForLocationAsync(location, stackOsType).GetAwaiter().GetResult(); + } + + /// + /// Get available Function app frameworks and their versions for location + /// + /// + /// Description for Get available Function app frameworks and their versions + /// for location + /// + /// + /// The operations group for this extension method. + /// + /// + /// Function App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// The cancellation token. + /// + public static async Task> GetFunctionAppStacksForLocationAsync(this IProviderOperations operations, string location, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFunctionAppStacksForLocationWithHttpMessagesAsync(location, stackOsType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions for + /// location + /// + /// + /// The operations group for this extension method. + /// + /// + /// Web App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + public static IPage GetWebAppStacksForLocation(this IProviderOperations operations, string location, string stackOsType = default(string)) + { + return operations.GetWebAppStacksForLocationAsync(location, stackOsType).GetAwaiter().GetResult(); + } + + /// + /// Get available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions for + /// location + /// + /// + /// The operations group for this extension method. + /// + /// + /// Web App stack location. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// The cancellation token. + /// + public static async Task> GetWebAppStacksForLocationAsync(this IProviderOperations operations, string location, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWebAppStacksForLocationWithHttpMessagesAsync(location, stackOsType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets all available operations for the Microsoft.Web resource provider. Also /// exposes resource metric definitions @@ -101,6 +237,46 @@ public static IPage ListOperations(this IProviderOperat } } + /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + public static IPage GetWebAppStacks(this IProviderOperations operations, string stackOsType = default(string)) + { + return operations.GetWebAppStacksAsync(stackOsType).GetAwaiter().GetResult(); + } + + /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' + /// + /// + /// The cancellation token. + /// + public static async Task> GetWebAppStacksAsync(this IProviderOperations operations, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWebAppStacksWithHttpMessagesAsync(stackOsType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get available application frameworks and their versions /// @@ -112,7 +288,7 @@ public static IPage ListOperations(this IProviderOperat /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// public static IPage GetAvailableStacksOnPrem(this IProviderOperations operations, string osTypeSelected = default(string)) { @@ -130,7 +306,7 @@ public static IPage ListOperations(this IProviderOperat /// /// /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions' + /// 'LinuxFunctions', 'All' /// /// /// The cancellation token. @@ -183,6 +359,130 @@ public static IPage GetAvailableStacksNext(this IProvi } } + /// + /// Get available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetFunctionAppStacksNext(this IProviderOperations operations, string nextPageLink) + { + return operations.GetFunctionAppStacksNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get available Function app frameworks and their versions + /// + /// + /// Description for Get available Function app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetFunctionAppStacksNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFunctionAppStacksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get available Function app frameworks and their versions for location + /// + /// + /// Description for Get available Function app frameworks and their versions + /// for location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetFunctionAppStacksForLocationNext(this IProviderOperations operations, string nextPageLink) + { + return operations.GetFunctionAppStacksForLocationNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get available Function app frameworks and their versions for location + /// + /// + /// Description for Get available Function app frameworks and their versions + /// for location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetFunctionAppStacksForLocationNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFunctionAppStacksForLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions for + /// location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetWebAppStacksForLocationNext(this IProviderOperations operations, string nextPageLink) + { + return operations.GetWebAppStacksForLocationNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get available Web app frameworks and their versions for location + /// + /// + /// Description for Get available Web app frameworks and their versions for + /// location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetWebAppStacksForLocationNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWebAppStacksForLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets all available operations for the Microsoft.Web resource provider. Also /// exposes resource metric definitions @@ -227,6 +527,46 @@ public static IPage ListOperationsNext(this IProviderOp } } + /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetWebAppStacksNext(this IProviderOperations operations, string nextPageLink) + { + return operations.GetWebAppStacksNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get available Web app frameworks and their versions + /// + /// + /// Description for Get available Web app frameworks and their versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetWebAppStacksNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWebAppStacksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get available application frameworks and their versions /// diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs index 984a84495f08..728f46e9f9c6 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs @@ -119,14 +119,14 @@ internal RecommendationsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("featured={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(featured, Client.SerializationSettings).Trim('"')))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -673,14 +673,14 @@ internal RecommendationsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("expiredOnly={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(expiredOnly, Client.SerializationSettings).Trim('"')))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -902,14 +902,14 @@ internal RecommendationsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("featured={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(featured, Client.SerializationSettings).Trim('"')))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1976,14 +1976,14 @@ internal RecommendationsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("expiredOnly={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(expiredOnly, Client.SerializationSettings).Trim('"')))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -2205,14 +2205,14 @@ internal RecommendationsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("featured={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(featured, Client.SerializationSettings).Trim('"')))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); 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 1c65562c417c..f96d148856db 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs @@ -19,50 +19,43 @@ public static IEnumerable> ApiInfo_WebSiteManageme { return new Tuple[] { - new Tuple("CertificateRegistration", "AppServiceCertificateOrders", "2020-06-01"), - new Tuple("CertificateRegistration", "CertificateRegistrationProvider", "2020-06-01"), - new Tuple("DomainRegistration", "DomainRegistrationProvider", "2020-06-01"), - new Tuple("DomainRegistration", "Domains", "2020-06-01"), - new Tuple("DomainRegistration", "TopLevelDomains", "2020-06-01"), - new Tuple("Web", "AppServiceEnvironments", "2020-06-01"), - new Tuple("Web", "AppServicePlans", "2020-06-01"), - new Tuple("Web", "Certificates", "2020-06-01"), - new Tuple("Web", "CheckNameAvailability", "2020-06-01"), - new Tuple("Web", "DeletedWebApps", "2020-06-01"), - new Tuple("Web", "Diagnostics", "2020-06-01"), - new Tuple("Web", "GetPublishingUser", "2020-06-01"), - new Tuple("Web", "GetSourceControl", "2020-06-01"), - new Tuple("Web", "GetSubscriptionDeploymentLocations", "2020-06-01"), - new Tuple("Web", "ListBillingMeters", "2020-06-01"), - new Tuple("Web", "ListGeoRegions", "2020-06-01"), - new Tuple("Web", "ListPremierAddOnOffers", "2020-06-01"), - new Tuple("Web", "ListSiteIdentifiersAssignedToHostName", "2020-06-01"), - new Tuple("Web", "ListSkus", "2020-06-01"), - new Tuple("Web", "ListSourceControls", "2020-06-01"), - new Tuple("Web", "Provider", "2020-06-01"), - new Tuple("Web", "Recommendations", "2020-06-01"), - new Tuple("Web", "ResourceHealthMetadata", "2020-06-01"), - new Tuple("Web", "StaticSites", "2020-06-01"), - new Tuple("Web", "UpdatePublishingUser", "2020-06-01"), - new Tuple("Web", "UpdateSourceControl", "2020-06-01"), - new Tuple("Web", "Validate", "2020-06-01"), - new Tuple("Web", "VerifyHostingEnvironmentVnet", "2020-06-01"), - new Tuple("Web", "WebApps", "2020-06-01"), - new Tuple("WebSiteManagementClient", "Move", "2020-06-01"), - new Tuple("WebSiteManagementClient", "ValidateMove", "2020-06-01"), + new Tuple("CertificateRegistration", "AppServiceCertificateOrders", "2021-01-01"), + new Tuple("CertificateRegistration", "CertificateOrdersDiagnostics", "2021-01-01"), + new Tuple("CertificateRegistration", "CertificateRegistrationProvider", "2021-01-01"), + new Tuple("DomainRegistration", "DomainRegistrationProvider", "2021-01-01"), + new Tuple("DomainRegistration", "Domains", "2021-01-01"), + new Tuple("DomainRegistration", "TopLevelDomains", "2021-01-01"), + new Tuple("Web", "AppServiceEnvironments", "2021-01-01"), + new Tuple("Web", "AppServicePlans", "2021-01-01"), + new Tuple("Web", "Certificates", "2021-01-01"), + new Tuple("Web", "CheckNameAvailability", "2021-01-01"), + new Tuple("Web", "DeletedWebApps", "2021-01-01"), + new Tuple("Web", "Diagnostics", "2021-01-01"), + new Tuple("Web", "GenerateGithubAccessTokenForAppserviceCLIAsync", "2021-01-01"), + new Tuple("Web", "GetPublishingUser", "2021-01-01"), + new Tuple("Web", "GetSourceControl", "2021-01-01"), + new Tuple("Web", "GetSubscriptionDeploymentLocations", "2021-01-01"), + new Tuple("Web", "Global", "2021-01-01"), + new Tuple("Web", "KubeEnvironments", "2021-01-01"), + new Tuple("Web", "ListBillingMeters", "2021-01-01"), + new Tuple("Web", "ListGeoRegions", "2021-01-01"), + new Tuple("Web", "ListPremierAddOnOffers", "2021-01-01"), + new Tuple("Web", "ListSiteIdentifiersAssignedToHostName", "2021-01-01"), + new Tuple("Web", "ListSkus", "2021-01-01"), + new Tuple("Web", "ListSourceControls", "2021-01-01"), + new Tuple("Web", "Provider", "2021-01-01"), + new Tuple("Web", "Recommendations", "2021-01-01"), + new Tuple("Web", "ResourceHealthMetadata", "2021-01-01"), + new Tuple("Web", "StaticSites", "2021-01-01"), + new Tuple("Web", "UpdatePublishingUser", "2021-01-01"), + new Tuple("Web", "UpdateSourceControl", "2021-01-01"), + new Tuple("Web", "Validate", "2021-01-01"), + new Tuple("Web", "VerifyHostingEnvironmentVnet", "2021-01-01"), + new Tuple("Web", "WebApps", "2021-01-01"), + new Tuple("WebSiteManagementClient", "Move", "2021-01-01"), + new Tuple("WebSiteManagementClient", "ValidateMove", "2021-01-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 --tag=package-2020-06 --csharp-sdks-folder=K:\\DotNet-SDK\\Sep-2020\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "1b04f5fce19cd330dcc0eec11a98e499c0cda50d"; - 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/StaticSitesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs index a8a84874472b..197075937acc 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs @@ -51,11 +51,18 @@ internal StaticSitesOperations(WebSiteManagementClient client) public WebSiteManagementClient Client { get; private set; } /// - /// Get all Static Sites for a subscription. + /// Generates a preview workflow file for the static site /// /// - /// Description for Get all Static Sites for a subscription. + /// Description for Generates a preview workflow file for the static site /// + /// + /// Location where you plan to create the static site. + /// + /// + /// A JSON representation of the StaticSitesWorkflowPreviewRequest properties. + /// See example. + /// /// /// Headers that will be added to request. /// @@ -77,8 +84,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PreviewWorkflowWithHttpMessagesAsync(string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (staticSitesWorkflowPreviewRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSitesWorkflowPreviewRequest"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -94,12 +109,15 @@ internal StaticSitesOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("staticSitesWorkflowPreviewRequest", staticSitesWorkflowPreviewRequest); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "PreviewWorkflow", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -113,7 +131,7 @@ internal StaticSitesOperations(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) @@ -144,6 +162,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(staticSitesWorkflowPreviewRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSitesWorkflowPreviewRequest, 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) { @@ -194,7 +218,7 @@ internal StaticSitesOperations(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")) @@ -207,7 +231,7 @@ internal StaticSitesOperations(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) { @@ -227,14 +251,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets all static sites in the specified resource group. + /// Get all Static Sites for a subscription. /// /// - /// Description for Gets all static sites in the specified resource group. + /// Description for Get all Static Sites for a subscription. /// - /// - /// Name of the resource group to which the resource belongs. - /// /// /// Headers that will be added to request. /// @@ -256,27 +277,8 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetStaticSitesByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(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"); @@ -292,14 +294,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSitesByResourceGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "List", 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/staticSites").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -427,17 +427,14 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the details of a static site. + /// Gets all static sites in the specified resource group. /// /// - /// Description for Gets the details of a static site. + /// Description for Gets all static sites in the specified resource group. /// /// /// Name of the resource group to which the resource belongs. /// - /// - /// Name of the static site. - /// /// /// Headers that will be added to request. /// @@ -459,7 +456,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetStaticSitesByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -480,10 +477,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) 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"); @@ -500,15 +493,13 @@ internal StaticSitesOperations(WebSiteManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSite", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSitesByResourceGroup", 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/staticSites/{name}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites").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) @@ -603,7 +594,7 @@ internal StaticSitesOperations(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")) @@ -616,7 +607,7 @@ internal StaticSitesOperations(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) { @@ -636,21 +627,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. + /// Gets the details of a static site. /// /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. + /// Description for Gets the details of a static site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. + /// Name of the static site. /// /// /// Headers that will be added to request. @@ -673,7 +659,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -698,14 +684,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (staticSiteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteEnvelope"); - } - if (staticSiteEnvelope != null) - { - staticSiteEnvelope.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -723,9 +701,8 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("staticSiteEnvelope", staticSiteEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSite", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSite", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -745,7 +722,7 @@ internal StaticSitesOperations(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) @@ -776,12 +753,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(staticSiteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteEnvelope, 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) { @@ -802,7 +773,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -857,24 +828,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -882,6 +835,36 @@ internal StaticSitesOperations(WebSiteManagementClient client) return _result; } + /// + /// Creates a new static site in an existing resource group, or updates an + /// existing static site. + /// + /// + /// Description for Creates a new static site in an existing resource group, or + /// updates an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to create or update. + /// + /// + /// A JSON representation of the staticsite properties. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Deletes a static site. /// @@ -895,6 +878,36 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// Name of the static site to delete. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteStaticSiteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates a new static site in an existing resource group, or updates an + /// existing static site. + /// + /// + /// Description for Creates a new static site in an existing resource group, or + /// updates an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to create or update. + /// + /// + /// A JSON representation of the staticsite properties. See example. + /// + /// /// Headers that will be added to request. /// /// @@ -903,6 +916,9 @@ internal StaticSitesOperations(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 /// @@ -912,7 +928,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSitePatchResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -937,6 +953,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (staticSiteEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -954,8 +974,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("staticSiteEnvelope", staticSiteEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteStaticSite", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateStaticSite", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -975,7 +996,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1006,6 +1027,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(staticSiteEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteEnvelope, 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) { @@ -1056,13 +1083,49 @@ internal StaticSitesOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -1071,21 +1134,19 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. + /// Gets the list of users of a static site. /// /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. + /// Description for Gets the list of users of a static site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site to create or update. + /// Name of the static site. /// - /// - /// A JSON representation of the staticsite properties. See example. + /// + /// The auth provider for the users. /// /// /// Headers that will be added to request. @@ -1108,7 +1169,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSitePatchResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteUsersWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1133,9 +1194,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (staticSiteEnvelope == null) + if (authprovider == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "authprovider"); } if (Client.SubscriptionId == null) { @@ -1154,15 +1215,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("staticSiteEnvelope", staticSiteEnvelope); + tracingParameters.Add("authprovider", authprovider); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateStaticSite", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteUsers", 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/staticSites/{name}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{authprovider}", System.Uri.EscapeDataString(authprovider)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -1176,7 +1238,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1207,12 +1269,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(staticSiteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteEnvelope, 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) { @@ -1233,7 +1289,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1263,7 +1319,7 @@ internal StaticSitesOperations(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")) @@ -1276,25 +1332,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1314,19 +1352,22 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the list of users of a static site. + /// Deletes the user entry from the static site. /// /// - /// Description for Gets the list of users of a static site. + /// Description for Deletes the user entry from the static site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site. + /// Name of the staticsite. /// /// - /// The auth provider for the users. + /// The auth provider for this user. + /// + /// + /// The user id of the user. /// /// /// Headers that will be added to request. @@ -1337,9 +1378,6 @@ internal StaticSitesOperations(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 /// @@ -1349,7 +1387,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteUsersWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1378,6 +1416,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "authprovider"); } + if (userid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "userid"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1396,15 +1438,17 @@ internal StaticSitesOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("authprovider", authprovider); + tracingParameters.Add("userid", userid); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteUsers", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteStaticSiteUser", 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/staticSites/{name}/authproviders/{authprovider}/listUsers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{authprovider}", System.Uri.EscapeDataString(authprovider)); + _url = _url.Replace("{userid}", System.Uri.EscapeDataString(userid)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -1418,7 +1462,7 @@ internal StaticSitesOperations(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) @@ -1499,31 +1543,13 @@ internal StaticSitesOperations(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); @@ -1532,16 +1558,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Deletes the user entry from the static site. + /// Updates a user entry with the listed roles /// /// - /// Description for Deletes the user entry from the static site. + /// Description for Updates a user entry with the listed roles /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the staticsite. + /// Name of the static site. /// /// /// The auth provider for this user. @@ -1549,6 +1575,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// The user id of the user. /// + /// + /// A JSON representation of the StaticSiteUser properties. See example. + /// /// /// Headers that will be added to request. /// @@ -1558,6 +1587,9 @@ internal StaticSitesOperations(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 /// @@ -1567,7 +1599,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, StaticSiteUserARMResource staticSiteUserEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1600,6 +1632,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "userid"); } + if (staticSiteUserEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1619,8 +1655,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("authprovider", authprovider); tracingParameters.Add("userid", userid); + tracingParameters.Add("staticSiteUserEnvelope", staticSiteUserEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteStaticSiteUser", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateStaticSiteUser", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -1642,7 +1679,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1673,6 +1710,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(staticSiteUserEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserEnvelope, 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) { @@ -1723,13 +1766,31 @@ internal StaticSitesOperations(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); @@ -1738,10 +1799,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Updates a user entry with the listed roles + /// Gets all static site builds for a particular static site. /// /// - /// Description for Updates a user entry with the listed roles + /// Description for Gets all static site builds for a particular static site. /// /// /// Name of the resource group to which the resource belongs. @@ -1749,15 +1810,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// A JSON representation of the StaticSiteUser properties. See example. - /// /// /// Headers that will be added to request. /// @@ -1779,7 +1831,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, StaticSiteUserARMResource staticSiteUserEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetStaticSiteBuildsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1804,18 +1856,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (authprovider == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "authprovider"); - } - if (userid == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "userid"); - } - if (staticSiteUserEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1833,19 +1873,14 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("authprovider", authprovider); - tracingParameters.Add("userid", userid); - tracingParameters.Add("staticSiteUserEnvelope", staticSiteUserEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateStaticSiteUser", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuilds", 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/staticSites/{name}/authproviders/{authprovider}/users/{userid}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{authprovider}", System.Uri.EscapeDataString(authprovider)); - _url = _url.Replace("{userid}", System.Uri.EscapeDataString(userid)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -1859,7 +1894,7 @@ internal StaticSitesOperations(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) @@ -1890,12 +1925,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(staticSiteUserEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserEnvelope, 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) { @@ -1946,7 +1975,7 @@ internal StaticSitesOperations(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")) @@ -1959,7 +1988,7 @@ internal StaticSitesOperations(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) { @@ -1979,10 +2008,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets all static site builds for a particular static site. + /// Gets the details of a static site build. /// /// - /// Description for Gets all static site builds for a particular static site. + /// Description for Gets the details of a static site build. /// /// /// Name of the resource group to which the resource belongs. @@ -1990,6 +2019,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// + /// + /// The stage site identifier. + /// /// /// Headers that will be added to request. /// @@ -2011,7 +2043,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetStaticSiteBuildsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2036,6 +2068,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (environmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -2053,14 +2089,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("environmentName", environmentName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuilds", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuild", 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/staticSites/{name}/builds").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2155,7 +2193,7 @@ internal StaticSitesOperations(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")) @@ -2168,7 +2206,7 @@ internal StaticSitesOperations(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) { @@ -2188,10 +2226,38 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the details of a static site build. + /// Deletes a static site build. /// /// - /// Description for Gets the details of a static site build. + /// Description for Deletes a static site build. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates the app settings of a static site build. + /// + /// + /// Description for Creates or updates the app settings of a static site build. /// /// /// Name of the resource group to which the resource belongs. @@ -2199,9 +2265,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// + /// + /// The dictionary containing the static site app settings to update. + /// /// /// Headers that will be added to request. /// @@ -2223,7 +2292,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2248,9 +2317,13 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (prId == null) + if (environmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } + if (appSettings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "prId"); + throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); } if (Client.SubscriptionId == null) { @@ -2269,16 +2342,17 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("prId", prId); + tracingParameters.Add("environmentName", environmentName); + tracingParameters.Add("appSettings", appSettings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuild", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteBuildAppSettings", 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/staticSites/{name}/builds/{prId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{prId}", System.Uri.EscapeDataString(prId)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2292,7 +2366,7 @@ internal StaticSitesOperations(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) @@ -2323,6 +2397,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(appSettings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -2373,7 +2453,7 @@ internal StaticSitesOperations(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")) @@ -2386,7 +2466,7 @@ internal StaticSitesOperations(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) { @@ -2406,10 +2486,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Deletes a static site build. + /// Creates or updates the function app settings of a static site build. /// /// - /// Description for Deletes a static site build. + /// Description for Creates or updates the function app settings of a static + /// site build. /// /// /// Name of the resource group to which the resource belongs. @@ -2417,9 +2498,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// + /// + /// The dictionary containing the static site function app settings to update. + /// /// /// Headers that will be added to request. /// @@ -2429,6 +2513,9 @@ internal StaticSitesOperations(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 /// @@ -2438,7 +2525,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2463,13 +2550,17 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (prId == null) + if (environmentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "prId"); + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); } - if (Client.SubscriptionId == null) + if (appSettings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } if (Client.ApiVersion == null) { @@ -2484,16 +2575,17 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("prId", prId); + tracingParameters.Add("environmentName", environmentName); + tracingParameters.Add("appSettings", appSettings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteStaticSiteBuild", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteBuildFunctionAppSettings", 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/staticSites/{name}/builds/{prId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{prId}", System.Uri.EscapeDataString(prId)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2507,7 +2599,7 @@ internal StaticSitesOperations(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) @@ -2538,6 +2630,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(appSettings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -2558,7 +2656,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2588,13 +2686,31 @@ internal StaticSitesOperations(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); @@ -2603,11 +2719,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Creates or updates the function app settings of a static site build. + /// Gets the functions of a particular static site build. /// /// - /// Description for Creates or updates the function app settings of a static - /// site build. + /// Description for Gets the functions of a particular static site build. /// /// /// Name of the resource group to which the resource belongs. @@ -2615,11 +2730,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// - /// - /// /// /// Headers that will be added to request. /// @@ -2641,7 +2754,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string prId, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteBuildFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2666,13 +2779,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (prId == null) + if (environmentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "prId"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); } if (Client.SubscriptionId == null) { @@ -2691,17 +2800,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("prId", prId); - tracingParameters.Add("appSettings", appSettings); + tracingParameters.Add("environmentName", environmentName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteBuildFunctionAppSettings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctions", 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/staticSites/{name}/builds/{prId}/config/functionappsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{prId}", System.Uri.EscapeDataString(prId)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2715,7 +2823,7 @@ internal StaticSitesOperations(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) @@ -2746,12 +2854,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -2772,7 +2874,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2802,7 +2904,7 @@ internal StaticSitesOperations(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")) @@ -2815,25 +2917,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2853,10 +2937,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the functions of a particular static site build. + /// Gets the application settings of a static site build. /// /// - /// Description for Gets the functions of a particular static site build. + /// Description for Gets the application settings of a static site build. /// /// /// Name of the resource group to which the resource belongs. @@ -2864,7 +2948,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// @@ -2888,7 +2972,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteBuildFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2913,9 +2997,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (prId == null) + if (environmentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "prId"); + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); } if (Client.SubscriptionId == null) { @@ -2934,16 +3018,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("prId", prId); + tracingParameters.Add("environmentName", environmentName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildAppSettings", 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/staticSites/{name}/builds/{prId}/functions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{prId}", System.Uri.EscapeDataString(prId)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -2957,7 +3041,7 @@ internal StaticSitesOperations(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) @@ -3038,7 +3122,7 @@ internal StaticSitesOperations(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")) @@ -3051,7 +3135,7 @@ internal StaticSitesOperations(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) { @@ -3071,10 +3155,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the application settings of a static site. + /// Gets the application settings of a static site build. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Gets the application settings of a static site build. /// /// /// Name of the resource group to which the resource belongs. @@ -3082,7 +3166,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// @@ -3106,7 +3190,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string prId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3131,9 +3215,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (prId == null) + if (environmentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "prId"); + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); } if (Client.SubscriptionId == null) { @@ -3152,16 +3236,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("prId", prId); + tracingParameters.Add("environmentName", environmentName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctionAppSettings", 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/staticSites/{name}/builds/{prId}/listFunctionAppSettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{prId}", System.Uri.EscapeDataString(prId)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -3226,7 +3310,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3281,24 +3365,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -3307,11 +3373,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Creates or updates the function app settings of a static site. + /// Gets the details of the user provided function apps registered with a + /// static site build /// /// - /// Description for Creates or updates the function app settings of a static - /// site. + /// Description for Gets the details of the user provided function apps + /// registered with a static site build /// /// /// Name of the resource group to which the resource belongs. @@ -3319,7 +3386,8 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// /// /// Headers that will be added to request. @@ -3342,7 +3410,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetUserProvidedFunctionAppsForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3367,9 +3435,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (appSettings == null) + if (environmentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); } if (Client.SubscriptionId == null) { @@ -3388,15 +3456,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("appSettings", appSettings); + tracingParameters.Add("environmentName", environmentName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteFunctionAppSettings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppsForStaticSiteBuild", 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/staticSites/{name}/config/functionappsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -3410,7 +3479,7 @@ internal StaticSitesOperations(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) @@ -3441,12 +3510,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -3467,7 +3530,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -3497,7 +3560,7 @@ internal StaticSitesOperations(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")) @@ -3510,25 +3573,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3548,10 +3593,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Creates an invitation link for a user with the role + /// Gets the details of the user provided function app registered with a static + /// site build /// /// - /// Description for Creates an invitation link for a user with the role + /// Description for Gets the details of the user provided function app + /// registered with a static site build /// /// /// Name of the resource group to which the resource belongs. @@ -3559,7 +3606,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// /// /// Headers that will be added to request. @@ -3582,7 +3633,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateUserRolesInvitationLinkWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetUserProvidedFunctionAppForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3607,9 +3658,13 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (staticSiteUserRolesInvitationEnvelope == null) + if (environmentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserRolesInvitationEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } + if (functionAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); } if (Client.SubscriptionId == null) { @@ -3628,15 +3683,18 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("staticSiteUserRolesInvitationEnvelope", staticSiteUserRolesInvitationEnvelope); + tracingParameters.Add("environmentName", environmentName); + tracingParameters.Add("functionAppName", functionAppName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateUserRolesInvitationLink", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppForStaticSiteBuild", 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/staticSites/{name}/createUserInvitation").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); + _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -3650,7 +3708,7 @@ internal StaticSitesOperations(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) @@ -3681,12 +3739,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(staticSiteUserRolesInvitationEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserRolesInvitationEnvelope, 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) { @@ -3737,7 +3789,7 @@ internal StaticSitesOperations(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")) @@ -3750,7 +3802,7 @@ internal StaticSitesOperations(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) { @@ -3770,17 +3822,65 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets all static site custom domains for a particular static site. + /// Register a user provided function app with a static site build /// /// - /// Description for Gets all static site custom domains for a particular static - /// site. + /// Description for Register a user provided function app with a static site + /// build /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site resource to search in. + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Detach the user provided function app from the static site build + /// + /// + /// Description for Detach the user provided function app from the static site + /// build + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// /// /// Headers that will be added to request. @@ -3791,9 +3891,6 @@ internal StaticSitesOperations(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 /// @@ -3803,7 +3900,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteCustomDomainsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DetachUserProvidedFunctionAppFromStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -3828,6 +3925,14 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (environmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } + if (functionAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -3845,14 +3950,18 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("environmentName", environmentName); + tracingParameters.Add("functionAppName", functionAppName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteCustomDomains", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DetachUserProvidedFunctionAppFromStaticSiteBuild", 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/staticSites/{name}/customDomains").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); + _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -3866,7 +3975,7 @@ internal StaticSitesOperations(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) @@ -3917,7 +4026,7 @@ internal StaticSitesOperations(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 @@ -3947,31 +4056,13 @@ internal StaticSitesOperations(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); @@ -3980,12 +4071,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. + /// Deploys zipped content to a specific environment of a static site. /// /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. + /// Description for Deploys zipped content to a specific environment of a + /// static site. /// /// /// Name of the resource group to which the resource belongs. @@ -3993,19 +4083,51 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// - /// The custom domain to create. + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// + public async Task CreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates the app settings of a static site. + /// + /// + /// Description for Creates or updates the app settings of a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The dictionary containing the static site app settings to update. + /// + /// + /// 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 /// /// @@ -4017,7 +4139,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4042,9 +4164,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainName == null) + if (appSettings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); } if (Client.SubscriptionId == null) { @@ -4063,16 +4185,15 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainName", domainName); + tracingParameters.Add("appSettings", appSettings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteCustomDomain", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteAppSettings", 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/staticSites/{name}/customDomains/{domainName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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) @@ -4117,6 +4238,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(appSettings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -4137,7 +4264,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -4167,7 +4294,7 @@ internal StaticSitesOperations(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")) @@ -4180,25 +4307,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4218,10 +4327,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Deletes a custom domain. + /// Creates or updates the function app settings of a static site. /// /// - /// Description for Deletes a custom domain. + /// Description for Creates or updates the function app settings of a static + /// site. /// /// /// Name of the resource group to which the resource belongs. @@ -4229,8 +4339,8 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// - /// The custom domain to delete. + /// + /// The dictionary containing the static site function app settings to update. /// /// /// Headers that will be added to request. @@ -4241,6 +4351,9 @@ internal StaticSitesOperations(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 /// @@ -4250,7 +4363,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4275,9 +4388,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainName == null) + if (appSettings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); } if (Client.SubscriptionId == null) { @@ -4296,16 +4409,15 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainName", domainName); + tracingParameters.Add("appSettings", appSettings); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteStaticSiteCustomDomain", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteFunctionAppSettings", 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/staticSites/{name}/customDomains/{domainName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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) @@ -4319,7 +4431,7 @@ internal StaticSitesOperations(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) @@ -4350,6 +4462,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(appSettings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -4370,7 +4488,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -4400,13 +4518,31 @@ internal StaticSitesOperations(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); @@ -4415,11 +4551,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Validates a particular custom domain can be added to a static site. + /// Creates an invitation link for a user with the role /// /// - /// Description for Validates a particular custom domain can be added to a - /// static site. + /// Description for Creates an invitation link for a user with the role /// /// /// Name of the resource group to which the resource belongs. @@ -4427,8 +4562,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// - /// - /// The custom domain to validate. + /// /// /// /// Headers that will be added to request. @@ -4439,6 +4573,9 @@ internal StaticSitesOperations(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 /// @@ -4448,7 +4585,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateUserRolesInvitationLinkWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4473,9 +4610,9 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainName == null) + if (staticSiteUserRolesInvitationEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserRolesInvitationEnvelope"); } if (Client.SubscriptionId == null) { @@ -4494,16 +4631,15 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainName", domainName); + tracingParameters.Add("staticSiteUserRolesInvitationEnvelope", staticSiteUserRolesInvitationEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ValidateCustomDomainCanBeAddedToStaticSite", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateUserRolesInvitationLink", 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/staticSites/{name}/customDomains/{domainName}/validate").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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) @@ -4548,6 +4684,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(staticSiteUserRolesInvitationEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserRolesInvitationEnvelope, 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) { @@ -4568,7 +4710,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -4598,13 +4740,31 @@ internal StaticSitesOperations(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); @@ -4613,16 +4773,17 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Detaches a static site. + /// Gets all static site custom domains for a particular static site. /// /// - /// Description for Detaches a static site. + /// Description for Gets all static site custom domains for a particular static + /// site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site to detach. + /// Name of the static site resource to search in. /// /// /// Headers that will be added to request. @@ -4633,6 +4794,9 @@ internal StaticSitesOperations(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 /// @@ -4642,7 +4806,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteCustomDomainsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4685,11 +4849,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DetachStaticSite", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteCustomDomains", 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/staticSites/{name}/detach").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains").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)); @@ -4705,7 +4869,7 @@ internal StaticSitesOperations(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) @@ -4756,7 +4920,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -4786,13 +4950,31 @@ internal StaticSitesOperations(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); @@ -4801,16 +4983,20 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the functions of a static site. + /// Gets an existing custom domain for a particular static site. /// /// - /// Description for Gets the functions of a static site. + /// Description for Gets an existing custom domain for a particular static + /// site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site. + /// Name of the static site resource to search in. + /// + /// + /// The custom domain name. /// /// /// Headers that will be added to request. @@ -4833,7 +5019,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4858,6 +5044,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (domainName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -4875,14 +5065,16 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("domainName", domainName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteFunctions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteCustomDomain", 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/staticSites/{name}/functions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _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) @@ -4977,7 +5169,7 @@ internal StaticSitesOperations(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")) @@ -4990,7 +5182,7 @@ internal StaticSitesOperations(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) { @@ -5010,10 +5202,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the application settings of a static site. + /// Creates a new static site custom domain in an existing resource group and + /// static site. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Creates a new static site custom domain in an existing + /// resource group and static site. /// /// /// Name of the resource group to which the resource belongs. @@ -5021,32 +5215,5522 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// Name of the static site. /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// /// - /// Headers that will be added to request. + /// 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 - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added to a + /// static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the functions of a static site. + /// + /// + /// Description for Gets the functions of a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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>> ListStaticSiteFunctionsWithHttpMessagesAsync(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, "ListStaticSiteFunctions", 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/staticSites/{name}/functions").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; + } + + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteAppSettingsWithHttpMessagesAsync(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, "ListStaticSiteAppSettings", 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/staticSites/{name}/listAppSettings").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("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; + } + + /// + /// Lists the roles configured for the static site. + /// + /// + /// Description for Lists the roles configured for the static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteConfiguredRolesWithHttpMessagesAsync(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, "ListStaticSiteConfiguredRoles", 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/staticSites/{name}/listConfiguredRoles").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("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; + } + + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(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, "ListStaticSiteFunctionAppSettings", 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/staticSites/{name}/listFunctionAppSettings").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("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; + } + + /// + /// Lists the secrets for an existing static site. + /// + /// + /// Description for Lists the secrets for an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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> ListStaticSiteSecretsWithHttpMessagesAsync(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, "ListStaticSiteSecrets", 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/staticSites/{name}/listSecrets").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("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; + } + + /// + /// Gets the list of private endpoint connections associated with a static site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(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, "GetPrivateEndpointConnectionList", 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/staticSites/{name}/privateEndpointConnections").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; + } + + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, 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 (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + 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("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", 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/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _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; + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// 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> GetPrivateLinkResourcesWithHttpMessagesAsync(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, "GetPrivateLinkResources", 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/staticSites/{name}/privateLinkResources").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; + } + + /// + /// Resets the api key for an existing static site. + /// + /// + /// Description for Resets the api key for an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// + /// + /// 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 ResetStaticSiteApiKeyWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, 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 (resetPropertiesEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resetPropertiesEnvelope"); + } + 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("resetPropertiesEnvelope", resetPropertiesEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ResetStaticSiteApiKey", 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/staticSites/{name}/resetapikey").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("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; + if(resetPropertiesEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resetPropertiesEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the user provided function apps registered with a + /// static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// 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>> GetUserProvidedFunctionAppsForStaticSiteWithHttpMessagesAsync(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, "GetUserProvidedFunctionAppsForStaticSite", 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/staticSites/{name}/userProvidedFunctionApps").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; + } + + /// + /// Gets the details of the user provided function app registered with a static + /// site + /// + /// + /// Description for Gets the details of the user provided function app + /// registered with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + /// + /// 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> GetUserProvidedFunctionAppForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, 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 (functionAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); + } + 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("functionAppName", functionAppName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppForStaticSite", 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/staticSites/{name}/userProvidedFunctionApps/{functionAppName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); + _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; + } + + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Detach the user provided function app from the static site + /// + /// + /// Description for Detach the user provided function app from the static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + /// + /// 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 DetachUserProvidedFunctionAppFromStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, 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 (functionAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); + } + 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("functionAppName", functionAppName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DetachUserProvidedFunctionAppFromStaticSite", 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/staticSites/{name}/userProvidedFunctionApps/{functionAppName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); + _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 != 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; + } + + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task CreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates a new static site in an existing resource group, or updates an + /// existing static site. + /// + /// + /// Description for Creates a new static site in an existing resource group, or + /// updates an existing static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to create or update. + /// + /// + /// A JSON representation of the staticsite properties. See example. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, 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 (staticSiteEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteEnvelope"); + } + if (staticSiteEnvelope != null) + { + staticSiteEnvelope.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("staticSiteEnvelope", staticSiteEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateStaticSite", 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/staticSites/{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(staticSiteEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a static site. + /// + /// + /// Description for Deletes a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to delete. + /// + /// + /// 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 BeginDeleteStaticSiteWithHttpMessagesAsync(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, "BeginDeleteStaticSite", 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/staticSites/{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) + { + 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; + } + + /// + /// Deletes a static site build. + /// + /// + /// Description for Deletes a static site build. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// 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 BeginDeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, 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 (environmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } + 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("environmentName", environmentName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteStaticSiteBuild", 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/staticSites/{name}/builds/{environmentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); + _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; + } + + /// + /// Register a user provided function app with a static site build + /// + /// + /// Description for Register a user provided function app with a static site + /// build + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), 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 (environmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } + if (functionAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); + } + if (staticSiteUserProvidedFunctionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserProvidedFunctionEnvelope"); + } + 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("environmentName", environmentName); + tracingParameters.Add("functionAppName", functionAppName); + tracingParameters.Add("staticSiteUserProvidedFunctionEnvelope", staticSiteUserProvidedFunctionEnvelope); + tracingParameters.Add("isForced", isForced); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild", 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/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); + _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (isForced != null) + { + _queryParameters.Add(string.Format("isForced={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isForced, Client.SerializationSettings).Trim('"')))); + } + 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(staticSiteUserProvidedFunctionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserProvidedFunctionEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deploys zipped content to a specific environment of a static site. + /// + /// + /// Description for Deploys zipped content to a specific environment of a + /// static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + /// + /// 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 BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, 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 (environmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); + } + if (staticSiteZipDeploymentEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteZipDeploymentEnvelope"); + } + 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("environmentName", environmentName); + tracingParameters.Add("staticSiteZipDeploymentEnvelope", staticSiteZipDeploymentEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateZipDeploymentForStaticSiteBuild", 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/staticSites/{name}/builds/{environmentName}/zipdeploy").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); + _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; + if(staticSiteZipDeploymentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteZipDeploymentEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a new static site custom domain in an existing resource group and + /// static site. + /// + /// + /// Description for Creates a new static site custom domain in an existing + /// resource group and static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, 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 (domainName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + } + if (staticSiteCustomDomainRequestPropertiesEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteCustomDomainRequestPropertiesEnvelope"); + } + 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("domainName", domainName); + tracingParameters.Add("staticSiteCustomDomainRequestPropertiesEnvelope", staticSiteCustomDomainRequestPropertiesEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateStaticSiteCustomDomain", 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/staticSites/{name}/customDomains/{domainName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _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; + if(staticSiteCustomDomainRequestPropertiesEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteCustomDomainRequestPropertiesEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + /// + /// 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 BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, 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 (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + 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("name", name); + tracingParameters.Add("domainName", domainName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteStaticSiteCustomDomain", 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/staticSites/{name}/customDomains/{domainName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _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("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) + { + 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; + } + + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added to a + /// static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// 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 BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, 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 (domainName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); + } + if (staticSiteCustomDomainRequestPropertiesEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteCustomDomainRequestPropertiesEnvelope"); + } + 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("domainName", domainName); + tracingParameters.Add("staticSiteCustomDomainRequestPropertiesEnvelope", staticSiteCustomDomainRequestPropertiesEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginValidateCustomDomainCanBeAddedToStaticSite", 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/staticSites/{name}/customDomains/{domainName}/validate").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _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("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; + if(staticSiteCustomDomainRequestPropertiesEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteCustomDomainRequestPropertiesEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + /// + /// 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 BeginDetachStaticSiteWithHttpMessagesAsync(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, "BeginDetachStaticSite", 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/staticSites/{name}/detach").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("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + /// + /// 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, 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 (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (privateEndpointWrapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + 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("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", 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/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _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(privateEndpointWrapper != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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) + { + 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 == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, 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 (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + 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("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _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(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static site + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), 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 (functionAppName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); + } + if (staticSiteUserProvidedFunctionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserProvidedFunctionEnvelope"); + } + 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("functionAppName", functionAppName); + tracingParameters.Add("staticSiteUserProvidedFunctionEnvelope", staticSiteUserProvidedFunctionEnvelope); + tracingParameters.Add("isForced", isForced); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRegisterUserProvidedFunctionAppWithStaticSite", 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/staticSites/{name}/userProvidedFunctionApps/{functionAppName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (isForced != null) + { + _queryParameters.Add(string.Format("isForced={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isForced, Client.SerializationSettings).Trim('"')))); + } + 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(staticSiteUserProvidedFunctionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserProvidedFunctionEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + /// + /// 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 BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { @@ -5067,6 +10751,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (staticSiteZipDeploymentEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteZipDeploymentEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -5084,12 +10772,13 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("staticSiteZipDeploymentEnvelope", staticSiteZipDeploymentEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteFunctionAppSettings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateZipDeploymentForStaticSite", 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/staticSites/{name}/listFunctionAppSettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy").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)); @@ -5105,7 +10794,166 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _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; + if(staticSiteZipDeploymentEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteZipDeploymentEnvelope, 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 != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all Static Sites for a subscription. + /// + /// + /// Description for Get all Static Sites for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(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, "ListNext", 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) @@ -5156,7 +11004,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -5186,7 +11034,7 @@ internal StaticSitesOperations(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")) @@ -5199,25 +11047,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -5237,16 +11067,13 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Lists the secrets for an existing static site. + /// Gets all static sites in the specified resource group. /// /// - /// Description for Lists the secrets for an existing static site. + /// Description for Gets all static sites in the specified resource group. /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -5269,38 +11096,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListStaticSiteSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, 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) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -5309,22 +11109,14 @@ internal StaticSitesOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("name", name); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteSecrets", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSitesByResourceGroupNext", 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/staticSites/{name}/listSecrets").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)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); 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); @@ -5332,7 +11124,7 @@ internal StaticSitesOperations(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) @@ -5413,7 +11205,7 @@ internal StaticSitesOperations(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")) @@ -5426,7 +11218,7 @@ internal StaticSitesOperations(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) { @@ -5446,18 +11238,13 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Resets the api key for an existing static site. + /// Gets the list of users of a static site. /// /// - /// Description for Resets the api key for an existing static site. + /// Description for Gets the list of users of a static site. /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -5468,6 +11255,9 @@ internal StaticSitesOperations(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 /// @@ -5477,42 +11267,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ResetStaticSiteApiKeyWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteUsersNextWithHttpMessagesAsync(string nextPageLink, 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 (resetPropertiesEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resetPropertiesEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.ApiVersion == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -5521,23 +11280,14 @@ internal StaticSitesOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("name", name); - tracingParameters.Add("resetPropertiesEnvelope", resetPropertiesEnvelope); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetStaticSiteApiKey", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteUsersNext", 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/staticSites/{name}/resetapikey").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)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); 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); @@ -5576,12 +11326,6 @@ internal StaticSitesOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(resetPropertiesEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resetPropertiesEnvelope, 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) { @@ -5632,13 +11376,31 @@ internal StaticSitesOperations(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); @@ -5647,10 +11409,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Get all Static Sites for a subscription. + /// Gets all static site builds for a particular static site. /// /// - /// Description for Get all Static Sites for a subscription. + /// Description for Gets all static site builds for a particular static site. /// /// /// The NextLink from the previous successful call to List operation. @@ -5676,7 +11438,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetStaticSiteBuildsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -5691,7 +11453,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuildsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -5785,7 +11547,7 @@ internal StaticSitesOperations(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")) @@ -5798,7 +11560,7 @@ internal StaticSitesOperations(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) { @@ -5818,10 +11580,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets all static sites in the specified resource group. + /// Gets the functions of a particular static site build. /// /// - /// Description for Gets all static sites in the specified resource group. + /// Description for Gets the functions of a particular static site build. /// /// /// The NextLink from the previous successful call to List operation. @@ -5847,7 +11609,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -5862,7 +11624,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSitesByResourceGroupNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctionsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -5956,7 +11718,7 @@ internal StaticSitesOperations(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")) @@ -5969,7 +11731,7 @@ internal StaticSitesOperations(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) { @@ -5989,10 +11751,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the list of users of a static site. + /// Gets the details of the user provided function apps registered with a + /// static site build /// /// - /// Description for Gets the list of users of a static site. + /// Description for Gets the details of the user provided function apps + /// registered with a static site build /// /// /// The NextLink from the previous successful call to List operation. @@ -6018,7 +11782,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteUsersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetUserProvidedFunctionAppsForStaticSiteBuildNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6033,7 +11797,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteUsersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppsForStaticSiteBuildNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -6046,7 +11810,7 @@ internal StaticSitesOperations(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) @@ -6127,7 +11891,7 @@ internal StaticSitesOperations(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")) @@ -6140,7 +11904,7 @@ internal StaticSitesOperations(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) { @@ -6160,10 +11924,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets all static site builds for a particular static site. + /// Gets all static site custom domains for a particular static site. /// /// - /// Description for Gets all static site builds for a particular static site. + /// Description for Gets all static site custom domains for a particular static + /// site. /// /// /// The NextLink from the previous successful call to List operation. @@ -6189,7 +11954,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetStaticSiteBuildsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6204,7 +11969,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuildsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteCustomDomainsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -6298,7 +12063,7 @@ internal StaticSitesOperations(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")) @@ -6311,7 +12076,7 @@ internal StaticSitesOperations(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) { @@ -6331,10 +12096,10 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the functions of a particular static site build. + /// Gets the functions of a static site. /// /// - /// Description for Gets the functions of a particular static site build. + /// Description for Gets the functions of a static site. /// /// /// The NextLink from the previous successful call to List operation. @@ -6360,7 +12125,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListStaticSiteFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6375,7 +12140,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctionsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteFunctionsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -6502,11 +12267,11 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets all static site custom domains for a particular static site. + /// Gets the list of private endpoint connections associated with a static site /// /// - /// Description for Gets all static site custom domains for a particular static - /// site. + /// Description for Gets the list of private endpoint connections associated + /// with a static site /// /// /// The NextLink from the previous successful call to List operation. @@ -6532,7 +12297,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6547,7 +12312,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteCustomDomainsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -6641,7 +12406,7 @@ internal StaticSitesOperations(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")) @@ -6654,7 +12419,7 @@ internal StaticSitesOperations(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) { @@ -6674,10 +12439,12 @@ internal StaticSitesOperations(WebSiteManagementClient client) } /// - /// Gets the functions of a static site. + /// Gets the details of the user provided function apps registered with a + /// static site /// /// - /// Description for Gets the functions of a static site. + /// Description for Gets the details of the user provided function apps + /// registered with a static site /// /// /// The NextLink from the previous successful call to List operation. @@ -6703,7 +12470,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListStaticSiteFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetUserProvidedFunctionAppsForStaticSiteNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -6718,7 +12485,7 @@ internal StaticSitesOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteFunctionsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppsForStaticSiteNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -6812,7 +12579,7 @@ internal StaticSitesOperations(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")) @@ -6825,7 +12592,7 @@ internal StaticSitesOperations(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/StaticSitesOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs index 4fea3668e831..78c4805f4470 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs @@ -21,6 +21,54 @@ namespace Microsoft.Azure.Management.WebSites /// public static partial class StaticSitesOperationsExtensions { + /// + /// Generates a preview workflow file for the static site + /// + /// + /// Description for Generates a preview workflow file for the static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Location where you plan to create the static site. + /// + /// + /// A JSON representation of the StaticSitesWorkflowPreviewRequest properties. + /// See example. + /// + public static StaticSitesWorkflowPreview PreviewWorkflow(this IStaticSitesOperations operations, string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest) + { + return operations.PreviewWorkflowAsync(location, staticSitesWorkflowPreviewRequest).GetAwaiter().GetResult(); + } + + /// + /// Generates a preview workflow file for the static site + /// + /// + /// Description for Generates a preview workflow file for the static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Location where you plan to create the static site. + /// + /// + /// A JSON representation of the StaticSitesWorkflowPreviewRequest properties. + /// See example. + /// + /// + /// The cancellation token. + /// + public static async Task PreviewWorkflowAsync(this IStaticSitesOperations operations, string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PreviewWorkflowWithHttpMessagesAsync(location, staticSitesWorkflowPreviewRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get all Static Sites for a subscription. /// @@ -528,12 +576,12 @@ public static IPage GetStaticSiteBuilds(this IStatic /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// - public static StaticSiteBuildARMResource GetStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId) + public static StaticSiteBuildARMResource GetStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) { - return operations.GetStaticSiteBuildAsync(resourceGroupName, name, prId).GetAwaiter().GetResult(); + return operations.GetStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); } /// @@ -551,15 +599,15 @@ public static StaticSiteBuildARMResource GetStaticSiteBuild(this IStaticSitesOpe /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// /// The cancellation token. /// - public static async Task GetStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, prId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -580,12 +628,12 @@ public static StaticSiteBuildARMResource GetStaticSiteBuild(this IStaticSitesOpe /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// - public static void DeleteStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId) + public static void DeleteStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) { - operations.DeleteStaticSiteBuildAsync(resourceGroupName, name, prId).GetAwaiter().GetResult(); + operations.DeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); } /// @@ -603,23 +651,22 @@ public static void DeleteStaticSiteBuild(this IStaticSitesOperations operations, /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// /// The cancellation token. /// - public static async Task DeleteStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, prId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Creates or updates the function app settings of a static site build. + /// Creates or updates the app settings of a static site build. /// /// - /// Description for Creates or updates the function app settings of a static - /// site build. + /// Description for Creates or updates the app settings of a static site build. /// /// /// The operations group for this extension method. @@ -630,22 +677,22 @@ public static void DeleteStaticSiteBuild(this IStaticSitesOperations operations, /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// + /// The dictionary containing the static site app settings to update. /// - public static StringDictionary CreateOrUpdateStaticSiteBuildFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId, StringDictionary appSettings) + public static StringDictionary CreateOrUpdateStaticSiteBuildAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings) { - return operations.CreateOrUpdateStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, prId, appSettings).GetAwaiter().GetResult(); + return operations.CreateOrUpdateStaticSiteBuildAppSettingsAsync(resourceGroupName, name, environmentName, appSettings).GetAwaiter().GetResult(); } /// - /// Creates or updates the function app settings of a static site build. + /// Creates or updates the app settings of a static site build. /// /// - /// Description for Creates or updates the function app settings of a static - /// site build. + /// Description for Creates or updates the app settings of a static site build. /// /// /// The operations group for this extension method. @@ -656,27 +703,29 @@ public static StringDictionary CreateOrUpdateStaticSiteBuildFunctionAppSettings( /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// + /// The dictionary containing the static site app settings to update. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateStaticSiteBuildFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateStaticSiteBuildAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, prId, appSettings, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateStaticSiteBuildAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, appSettings, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets the functions of a particular static site build. + /// Creates or updates the function app settings of a static site build. /// /// - /// Description for Gets the functions of a particular static site build. + /// Description for Creates or updates the function app settings of a static + /// site build. /// /// /// The operations group for this extension method. @@ -687,19 +736,23 @@ public static StringDictionary CreateOrUpdateStaticSiteBuildFunctionAppSettings( /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// - public static IPage ListStaticSiteBuildFunctions(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId) + /// + /// The dictionary containing the static site function app settings to update. + /// + public static StringDictionary CreateOrUpdateStaticSiteBuildFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings) { - return operations.ListStaticSiteBuildFunctionsAsync(resourceGroupName, name, prId).GetAwaiter().GetResult(); + return operations.CreateOrUpdateStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, environmentName, appSettings).GetAwaiter().GetResult(); } /// - /// Gets the functions of a particular static site build. + /// Creates or updates the function app settings of a static site build. /// /// - /// Description for Gets the functions of a particular static site build. + /// Description for Creates or updates the function app settings of a static + /// site build. /// /// /// The operations group for this extension method. @@ -710,25 +763,28 @@ public static IPage ListStaticSiteBuildFu /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// + /// + /// The dictionary containing the static site function app settings to update. + /// /// /// The cancellation token. /// - public static async Task> ListStaticSiteBuildFunctionsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateStaticSiteBuildFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListStaticSiteBuildFunctionsWithHttpMessagesAsync(resourceGroupName, name, prId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, appSettings, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets the application settings of a static site. + /// Gets the functions of a particular static site build. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Gets the functions of a particular static site build. /// /// /// The operations group for this extension method. @@ -739,19 +795,19 @@ public static IPage ListStaticSiteBuildFu /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// - public static StringDictionary ListStaticSiteBuildFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId) + public static IPage ListStaticSiteBuildFunctions(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) { - return operations.ListStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, prId).GetAwaiter().GetResult(); + return operations.ListStaticSiteBuildFunctionsAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); } /// - /// Gets the application settings of a static site. + /// Gets the functions of a particular static site build. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Gets the functions of a particular static site build. /// /// /// The operations group for this extension method. @@ -762,26 +818,25 @@ public static StringDictionary ListStaticSiteBuildFunctionAppSettings(this IStat /// /// Name of the static site. /// - /// + /// /// The stage site identifier. /// /// /// The cancellation token. /// - public static async Task ListStaticSiteBuildFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string prId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListStaticSiteBuildFunctionsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, prId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListStaticSiteBuildFunctionsWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates or updates the function app settings of a static site. + /// Gets the application settings of a static site build. /// /// - /// Description for Creates or updates the function app settings of a static - /// site. + /// Description for Gets the application settings of a static site build. /// /// /// The operations group for this extension method. @@ -792,19 +847,19 @@ public static StringDictionary ListStaticSiteBuildFunctionAppSettings(this IStat /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// - public static StringDictionary CreateOrUpdateStaticSiteFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings) + public static StringDictionary ListStaticSiteBuildAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) { - return operations.CreateOrUpdateStaticSiteFunctionAppSettingsAsync(resourceGroupName, name, appSettings).GetAwaiter().GetResult(); + return operations.ListStaticSiteBuildAppSettingsAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); } /// - /// Creates or updates the function app settings of a static site. + /// Gets the application settings of a static site build. /// /// - /// Description for Creates or updates the function app settings of a static - /// site. + /// Description for Gets the application settings of a static site build. /// /// /// The operations group for this extension method. @@ -815,24 +870,25 @@ public static StringDictionary CreateOrUpdateStaticSiteFunctionAppSettings(this /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateStaticSiteFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListStaticSiteBuildAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, appSettings, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListStaticSiteBuildAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates an invitation link for a user with the role + /// Gets the application settings of a static site build. /// /// - /// Description for Creates an invitation link for a user with the role + /// Description for Gets the application settings of a static site build. /// /// /// The operations group for this extension method. @@ -843,18 +899,19 @@ public static StringDictionary CreateOrUpdateStaticSiteFunctionAppSettings(this /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// - public static StaticSiteUserInvitationResponseResource CreateUserRolesInvitationLink(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) + public static StringDictionary ListStaticSiteBuildFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) { - return operations.CreateUserRolesInvitationLinkAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope).GetAwaiter().GetResult(); + return operations.ListStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); } /// - /// Creates an invitation link for a user with the role + /// Gets the application settings of a static site build. /// /// - /// Description for Creates an invitation link for a user with the role + /// Description for Gets the application settings of a static site build. /// /// /// The operations group for this extension method. @@ -865,25 +922,27 @@ public static StaticSiteUserInvitationResponseResource CreateUserRolesInvitation /// /// Name of the static site. /// - /// + /// + /// The stage site identifier. /// /// /// The cancellation token. /// - public static async Task CreateUserRolesInvitationLinkAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListStaticSiteBuildFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateUserRolesInvitationLinkWithHttpMessagesAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets all static site custom domains for a particular static site. + /// Gets the details of the user provided function apps registered with a + /// static site build /// /// - /// Description for Gets all static site custom domains for a particular static - /// site. + /// Description for Gets the details of the user provided function apps + /// registered with a static site build /// /// /// The operations group for this extension method. @@ -892,19 +951,23 @@ public static StaticSiteUserInvitationResponseResource CreateUserRolesInvitation /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site resource to search in. + /// Name of the static site. /// - public static IPage ListStaticSiteCustomDomains(this IStaticSitesOperations operations, string resourceGroupName, string name) + /// + /// The stage site identifier. + /// + public static IPage GetUserProvidedFunctionAppsForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) { - return operations.ListStaticSiteCustomDomainsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.GetUserProvidedFunctionAppsForStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); } /// - /// Gets all static site custom domains for a particular static site. + /// Gets the details of the user provided function apps registered with a + /// static site build /// /// - /// Description for Gets all static site custom domains for a particular static - /// site. + /// Description for Gets the details of the user provided function apps + /// registered with a static site build /// /// /// The operations group for this extension method. @@ -913,26 +976,29 @@ public static IPage ListStaticSiteCus /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site resource to search in. + /// Name of the static site. + /// + /// + /// The stage site identifier. /// /// /// The cancellation token. /// - public static async Task> ListStaticSiteCustomDomainsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> GetUserProvidedFunctionAppsForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListStaticSiteCustomDomainsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. + /// Gets the details of the user provided function app registered with a static + /// site build /// /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. + /// Description for Gets the details of the user provided function app + /// registered with a static site build /// /// /// The operations group for this extension method. @@ -943,21 +1009,24 @@ public static IPage ListStaticSiteCus /// /// Name of the static site. /// - /// - /// The custom domain to create. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// - public static StaticSiteCustomDomainOverviewARMResource CreateOrUpdateStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) + public static StaticSiteUserProvidedFunctionAppARMResource GetUserProvidedFunctionAppForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName) { - return operations.CreateOrUpdateStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); + return operations.GetUserProvidedFunctionAppForStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName).GetAwaiter().GetResult(); } /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. + /// Gets the details of the user provided function app registered with a static + /// site build /// /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. + /// Description for Gets the details of the user provided function app + /// registered with a static site build /// /// /// The operations group for this extension method. @@ -968,25 +1037,29 @@ public static StaticSiteCustomDomainOverviewARMResource CreateOrUpdateStaticSite /// /// Name of the static site. /// - /// - /// The custom domain to create. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetUserProvidedFunctionAppForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetUserProvidedFunctionAppForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes a custom domain. + /// Register a user provided function app with a static site build /// /// - /// Description for Deletes a custom domain. + /// Description for Register a user provided function app with a static site + /// build /// /// /// The operations group for this extension method. @@ -997,19 +1070,33 @@ public static StaticSiteCustomDomainOverviewARMResource CreateOrUpdateStaticSite /// /// Name of the static site. /// - /// - /// The custom domain to delete. + /// + /// The stage site identifier. /// - public static void DeleteStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + public static StaticSiteUserProvidedFunctionAppARMResource RegisterUserProvidedFunctionAppWithStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) { - operations.DeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); + return operations.RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); } /// - /// Deletes a custom domain. + /// Register a user provided function app with a static site build /// /// - /// Description for Deletes a custom domain. + /// Description for Register a user provided function app with a static site + /// build /// /// /// The operations group for this extension method. @@ -1020,23 +1107,39 @@ public static void DeleteStaticSiteCustomDomain(this IStaticSitesOperations oper /// /// Name of the static site. /// - /// - /// The custom domain to delete. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. /// /// /// The cancellation token. /// - public static async Task DeleteStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.RegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Validates a particular custom domain can be added to a static site. + /// Detach the user provided function app from the static site build /// /// - /// Description for Validates a particular custom domain can be added to a - /// static site. + /// Description for Detach the user provided function app from the static site + /// build /// /// /// The operations group for this extension method. @@ -1047,20 +1150,23 @@ public static void DeleteStaticSiteCustomDomain(this IStaticSitesOperations oper /// /// Name of the static site. /// - /// - /// The custom domain to validate. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// - public static void ValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) + public static void DetachUserProvidedFunctionAppFromStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName) { - operations.ValidateCustomDomainCanBeAddedToStaticSiteAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); + operations.DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName).GetAwaiter().GetResult(); } /// - /// Validates a particular custom domain can be added to a static site. + /// Detach the user provided function app from the static site build /// /// - /// Description for Validates a particular custom domain can be added to a - /// static site. + /// Description for Detach the user provided function app from the static site + /// build /// /// /// The operations group for this extension method. @@ -1071,22 +1177,26 @@ public static void ValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesO /// /// Name of the static site. /// - /// - /// The custom domain to validate. + /// + /// The stage site identifier. + /// + /// + /// Name of the function app registered with the static site build. /// /// /// The cancellation token. /// - public static async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DetachUserProvidedFunctionAppFromStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Detaches a static site. + /// Deploys zipped content to a specific environment of a static site. /// /// - /// Description for Detaches a static site. + /// Description for Deploys zipped content to a specific environment of a + /// static site. /// /// /// The operations group for this extension method. @@ -1095,18 +1205,26 @@ public static void ValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesO /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site to detach. + /// Name of the static site. /// - public static void DetachStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + public static void CreateZipDeploymentForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) { - operations.DetachStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + operations.CreateZipDeploymentForStaticSiteBuildAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); } /// - /// Detaches a static site. + /// Deploys zipped content to a specific environment of a static site. /// /// - /// Description for Detaches a static site. + /// Description for Deploys zipped content to a specific environment of a + /// static site. /// /// /// The operations group for this extension method. @@ -1115,21 +1233,28 @@ public static void DetachStaticSite(this IStaticSitesOperations operations, stri /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site to detach. + /// Name of the static site. + /// + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. /// /// /// The cancellation token. /// - public static async Task DetachStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateZipDeploymentForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Gets the functions of a static site. + /// Creates or updates the app settings of a static site. /// /// - /// Description for Gets the functions of a static site. + /// Description for Creates or updates the app settings of a static site. /// /// /// The operations group for this extension method. @@ -1140,16 +1265,19 @@ public static void DetachStaticSite(this IStaticSitesOperations operations, stri /// /// Name of the static site. /// - public static IPage ListStaticSiteFunctions(this IStaticSitesOperations operations, string resourceGroupName, string name) + /// + /// The dictionary containing the static site app settings to update. + /// + public static StringDictionary CreateOrUpdateStaticSiteAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings) { - return operations.ListStaticSiteFunctionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.CreateOrUpdateStaticSiteAppSettingsAsync(resourceGroupName, name, appSettings).GetAwaiter().GetResult(); } /// - /// Gets the functions of a static site. + /// Creates or updates the app settings of a static site. /// /// - /// Description for Gets the functions of a static site. + /// Description for Creates or updates the app settings of a static site. /// /// /// The operations group for this extension method. @@ -1160,22 +1288,26 @@ public static IPage ListStaticSiteFunctio /// /// Name of the static site. /// + /// + /// The dictionary containing the static site app settings to update. + /// /// /// The cancellation token. /// - public static async Task> ListStaticSiteFunctionsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateStaticSiteAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListStaticSiteFunctionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateStaticSiteAppSettingsWithHttpMessagesAsync(resourceGroupName, name, appSettings, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets the application settings of a static site. + /// Creates or updates the function app settings of a static site. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Creates or updates the function app settings of a static + /// site. /// /// /// The operations group for this extension method. @@ -1186,16 +1318,20 @@ public static IPage ListStaticSiteFunctio /// /// Name of the static site. /// - public static StringDictionary ListStaticSiteFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name) + /// + /// The dictionary containing the static site function app settings to update. + /// + public static StringDictionary CreateOrUpdateStaticSiteFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings) { - return operations.ListStaticSiteFunctionAppSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.CreateOrUpdateStaticSiteFunctionAppSettingsAsync(resourceGroupName, name, appSettings).GetAwaiter().GetResult(); } /// - /// Gets the application settings of a static site. + /// Creates or updates the function app settings of a static site. /// /// - /// Description for Gets the application settings of a static site. + /// Description for Creates or updates the function app settings of a static + /// site. /// /// /// The operations group for this extension method. @@ -1206,22 +1342,25 @@ public static StringDictionary ListStaticSiteFunctionAppSettings(this IStaticSit /// /// Name of the static site. /// + /// + /// The dictionary containing the static site function app settings to update. + /// /// /// The cancellation token. /// - public static async Task ListStaticSiteFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateStaticSiteFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, appSettings, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Lists the secrets for an existing static site. + /// Creates an invitation link for a user with the role /// /// - /// Description for Lists the secrets for an existing static site. + /// Description for Creates an invitation link for a user with the role /// /// /// The operations group for this extension method. @@ -1232,16 +1371,18 @@ public static StringDictionary ListStaticSiteFunctionAppSettings(this IStaticSit /// /// Name of the static site. /// - public static StringDictionary ListStaticSiteSecrets(this IStaticSitesOperations operations, string resourceGroupName, string name) + /// + /// + public static StaticSiteUserInvitationResponseResource CreateUserRolesInvitationLink(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { - return operations.ListStaticSiteSecretsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.CreateUserRolesInvitationLinkAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope).GetAwaiter().GetResult(); } /// - /// Lists the secrets for an existing static site. + /// Creates an invitation link for a user with the role /// /// - /// Description for Lists the secrets for an existing static site. + /// Description for Creates an invitation link for a user with the role /// /// /// The operations group for this extension method. @@ -1252,22 +1393,25 @@ public static StringDictionary ListStaticSiteSecrets(this IStaticSitesOperations /// /// Name of the static site. /// + /// + /// /// /// The cancellation token. /// - public static async Task ListStaticSiteSecretsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateUserRolesInvitationLinkAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListStaticSiteSecretsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateUserRolesInvitationLinkWithHttpMessagesAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Resets the api key for an existing static site. + /// Gets all static site custom domains for a particular static site. /// /// - /// Description for Resets the api key for an existing static site. + /// Description for Gets all static site custom domains for a particular static + /// site. /// /// /// The operations group for this extension method. @@ -1276,20 +1420,19 @@ public static StringDictionary ListStaticSiteSecrets(this IStaticSitesOperations /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site. - /// - /// + /// Name of the static site resource to search in. /// - public static void ResetStaticSiteApiKey(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) + public static IPage ListStaticSiteCustomDomains(this IStaticSitesOperations operations, string resourceGroupName, string name) { - operations.ResetStaticSiteApiKeyAsync(resourceGroupName, name, resetPropertiesEnvelope).GetAwaiter().GetResult(); + return operations.ListStaticSiteCustomDomainsAsync(resourceGroupName, name).GetAwaiter().GetResult(); } /// - /// Resets the api key for an existing static site. + /// Gets all static site custom domains for a particular static site. /// /// - /// Description for Resets the api key for an existing static site. + /// Description for Gets all static site custom domains for a particular static + /// site. /// /// /// The operations group for this extension method. @@ -1298,16 +1441,1832 @@ public static void ResetStaticSiteApiKey(this IStaticSitesOperations operations, /// Name of the resource group to which the resource belongs. /// /// - /// Name of the static site. - /// - /// + /// Name of the static site resource to search in. /// /// /// The cancellation token. /// - public static async Task ResetStaticSiteApiKeyAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListStaticSiteCustomDomainsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.ResetStaticSiteApiKeyWithHttpMessagesAsync(resourceGroupName, name, resetPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ListStaticSiteCustomDomainsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets an existing custom domain for a particular static site. + /// + /// + /// Description for Gets an existing custom domain for a particular static + /// site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site resource to search in. + /// + /// + /// The custom domain name. + /// + public static StaticSiteCustomDomainOverviewARMResource GetStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) + { + return operations.GetStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); + } + + /// + /// Gets an existing custom domain for a particular static site. + /// + /// + /// Description for Gets an existing custom domain for a particular static + /// site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site resource to search in. + /// + /// + /// The custom domain name. + /// + /// + /// The cancellation token. + /// + public static async Task GetStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a new static site custom domain in an existing resource group and + /// static site. + /// + /// + /// Description for Creates a new static site custom domain in an existing + /// resource group and static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + public static StaticSiteCustomDomainOverviewARMResource CreateOrUpdateStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) + { + return operations.CreateOrUpdateStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates a new static site custom domain in an existing resource group and + /// static site. + /// + /// + /// Description for Creates a new static site custom domain in an existing + /// resource group and static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + public static void DeleteStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) + { + operations.DeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added to a + /// static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + public static void ValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) + { + operations.ValidateCustomDomainCanBeAddedToStaticSiteAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added to a + /// static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// The cancellation token. + /// + public static async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + public static void DetachStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + operations.DetachStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + /// + /// The cancellation token. + /// + public static async Task DetachStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the functions of a static site. + /// + /// + /// Description for Gets the functions of a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static IPage ListStaticSiteFunctions(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.ListStaticSiteFunctionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the functions of a static site. + /// + /// + /// Description for Gets the functions of a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task> ListStaticSiteFunctionsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStaticSiteFunctionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static StringDictionary ListStaticSiteAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.ListStaticSiteAppSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task ListStaticSiteAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStaticSiteAppSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the roles configured for the static site. + /// + /// + /// Description for Lists the roles configured for the static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static StringList ListStaticSiteConfiguredRoles(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.ListStaticSiteConfiguredRolesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Lists the roles configured for the static site. + /// + /// + /// Description for Lists the roles configured for the static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task ListStaticSiteConfiguredRolesAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStaticSiteConfiguredRolesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static StringDictionary ListStaticSiteFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.ListStaticSiteFunctionAppSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the application settings of a static site. + /// + /// + /// Description for Gets the application settings of a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task ListStaticSiteFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the secrets for an existing static site. + /// + /// + /// Description for Lists the secrets for an existing static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static StringDictionary ListStaticSiteSecrets(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.ListStaticSiteSecretsAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Lists the secrets for an existing static site. + /// + /// + /// Description for Lists the secrets for an existing static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task ListStaticSiteSecretsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStaticSiteSecretsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of private endpoint connections associated with a static site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static IPage GetPrivateEndpointConnectionList(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.GetPrivateEndpointConnectionListAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of private endpoint connections associated with a static site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task> GetPrivateEndpointConnectionListAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Gets a private endpoint connection + /// + /// + /// Description for Gets a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + { + return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + /// + /// The cancellation token. + /// + public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + public static object DeletePrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task DeletePrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateLinkResourcesAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Resets the api key for an existing static site. + /// + /// + /// Description for Resets the api key for an existing static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// + public static void ResetStaticSiteApiKey(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) + { + operations.ResetStaticSiteApiKeyAsync(resourceGroupName, name, resetPropertiesEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Resets the api key for an existing static site. + /// + /// + /// Description for Resets the api key for an existing static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task ResetStaticSiteApiKeyAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.ResetStaticSiteApiKeyWithHttpMessagesAsync(resourceGroupName, name, resetPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the details of the user provided function apps registered with a + /// static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + public static IPage GetUserProvidedFunctionAppsForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + return operations.GetUserProvidedFunctionAppsForStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the user provided function apps registered with a + /// static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The cancellation token. + /// + public static async Task> GetUserProvidedFunctionAppsForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the user provided function app registered with a static + /// site + /// + /// + /// Description for Gets the details of the user provided function app + /// registered with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + public static StaticSiteUserProvidedFunctionAppARMResource GetUserProvidedFunctionAppForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName) + { + return operations.GetUserProvidedFunctionAppForStaticSiteAsync(resourceGroupName, name, functionAppName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the user provided function app registered with a static + /// site + /// + /// + /// Description for Gets the details of the user provided function app + /// registered with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + /// + /// The cancellation token. + /// + public static async Task GetUserProvidedFunctionAppForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetUserProvidedFunctionAppForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + public static StaticSiteUserProvidedFunctionAppARMResource RegisterUserProvidedFunctionAppWithStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) + { + return operations.RegisterUserProvidedFunctionAppWithStaticSiteAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); + } + + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// The cancellation token. + /// + public static async Task RegisterUserProvidedFunctionAppWithStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Detach the user provided function app from the static site + /// + /// + /// Description for Detach the user provided function app from the static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + public static void DetachUserProvidedFunctionAppFromStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName) + { + operations.DetachUserProvidedFunctionAppFromStaticSiteAsync(resourceGroupName, name, functionAppName).GetAwaiter().GetResult(); + } + + /// + /// Detach the user provided function app from the static site + /// + /// + /// Description for Detach the user provided function app from the static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app registered with the static site. + /// + /// + /// The cancellation token. + /// + public static async Task DetachUserProvidedFunctionAppFromStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DetachUserProvidedFunctionAppFromStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + public static void CreateZipDeploymentForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) + { + operations.CreateZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + /// + /// The cancellation token. + /// + public static async Task CreateZipDeploymentForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CreateZipDeploymentForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates a new static site in an existing resource group, or updates an + /// existing static site. + /// + /// + /// Description for Creates a new static site in an existing resource group, or + /// updates an existing static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to create or update. + /// + /// + /// A JSON representation of the staticsite properties. See example. + /// + public static StaticSiteARMResource BeginCreateOrUpdateStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope) + { + return operations.BeginCreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates a new static site in an existing resource group, or updates an + /// existing static site. + /// + /// + /// Description for Creates a new static site in an existing resource group, or + /// updates an existing static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to create or update. + /// + /// + /// A JSON representation of the staticsite properties. See example. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a static site. + /// + /// + /// Description for Deletes a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to delete. + /// + public static void BeginDeleteStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + operations.BeginDeleteStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Deletes a static site. + /// + /// + /// Description for Deletes a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to delete. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes a static site build. + /// + /// + /// Description for Deletes a static site build. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + public static void BeginDeleteStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) + { + operations.BeginDeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a static site build. + /// + /// + /// Description for Deletes a static site build. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Register a user provided function app with a static site build + /// + /// + /// Description for Register a user provided function app with a static site + /// build + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + public static StaticSiteUserProvidedFunctionAppARMResource BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) + { + return operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); + } + + /// + /// Register a user provided function app with a static site build + /// + /// + /// Description for Register a user provided function app with a static site + /// build + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The stage site identifier. + /// + /// + /// Name of the function app to register with the static site build. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deploys zipped content to a specific environment of a static site. + /// + /// + /// Description for Deploys zipped content to a specific environment of a + /// static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + public static void BeginCreateZipDeploymentForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) + { + operations.BeginCreateZipDeploymentForStaticSiteBuildAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Deploys zipped content to a specific environment of a static site. + /// + /// + /// Description for Deploys zipped content to a specific environment of a + /// static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the environment. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateZipDeploymentForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates a new static site custom domain in an existing resource group and + /// static site. + /// + /// + /// Description for Creates a new static site custom domain in an existing + /// resource group and static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + public static StaticSiteCustomDomainOverviewARMResource BeginCreateOrUpdateStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) + { + return operations.BeginCreateOrUpdateStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Creates a new static site custom domain in an existing resource group and + /// static site. + /// + /// + /// Description for Creates a new static site custom domain in an existing + /// resource group and static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to create. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + public static void BeginDeleteStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) + { + operations.BeginDeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a custom domain. + /// + /// + /// Description for Deletes a custom domain. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to delete. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added to a + /// static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + public static void BeginValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) + { + operations.BeginValidateCustomDomainCanBeAddedToStaticSiteAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Validates a particular custom domain can be added to a static site. + /// + /// + /// Description for Validates a particular custom domain can be added to a + /// static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// The custom domain to validate. + /// + /// + /// A JSON representation of the static site custom domain request properties. + /// See example. + /// + /// + /// The cancellation token. + /// + public static async Task BeginValidateCustomDomainCanBeAddedToStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + public static void BeginDetachStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) + { + operations.BeginDetachStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Detaches a static site. + /// + /// + /// Description for Detaches a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site to detach. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDetachStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + { + return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Request body. + /// + /// + /// The cancellation token. + /// + public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + public static object BeginDeletePrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeletePrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + public static StaticSiteUserProvidedFunctionAppARMResource BeginRegisterUserProvidedFunctionAppWithStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) + { + return operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); + } + + /// + /// Register a user provided function app with a static site + /// + /// + /// Description for Register a user provided function app with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// Name of the function app to register with the static site. + /// + /// + /// A JSON representation of the user provided function app properties. See + /// example. + /// + /// + /// Specify <code>true</code> to force the update of the auth + /// configuration on the function app even if an AzureStaticWebApps provider is + /// already configured on the function app. The default is + /// <code>false</code>. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRegisterUserProvidedFunctionAppWithStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + public static void BeginCreateZipDeploymentForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) + { + operations.BeginCreateZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); + } + + /// + /// Deploys zipped content to a static site. + /// + /// + /// Description for Deploys zipped content to a static site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the static site. + /// + /// + /// A JSON representation of the StaticSiteZipDeployment properties. See + /// example. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateZipDeploymentForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1510,6 +3469,50 @@ public static IPage ListStaticSiteBuildFu } } + /// + /// Gets the details of the user provided function apps registered with a + /// static site build + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site build + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetUserProvidedFunctionAppsForStaticSiteBuildNext(this IStaticSitesOperations operations, string nextPageLink) + { + return operations.GetUserProvidedFunctionAppsForStaticSiteBuildNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the user provided function apps registered with a + /// static site build + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site build + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetUserProvidedFunctionAppsForStaticSiteBuildNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteBuildNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets all static site custom domains for a particular static site. /// @@ -1592,5 +3595,91 @@ public static IPage ListStaticSiteFunctio } } + /// + /// Gets the list of private endpoint connections associated with a static site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetPrivateEndpointConnectionListNext(this IStaticSitesOperations operations, string nextPageLink) + { + return operations.GetPrivateEndpointConnectionListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of private endpoint connections associated with a static site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetPrivateEndpointConnectionListNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the user provided function apps registered with a + /// static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetUserProvidedFunctionAppsForStaticSiteNext(this IStaticSitesOperations operations, string nextPageLink) + { + return operations.GetUserProvidedFunctionAppsForStaticSiteNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the user provided function apps registered with a + /// static site + /// + /// + /// Description for Gets the details of the user provided function apps + /// registered with a static site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetUserProvidedFunctionAppsForStaticSiteNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } 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 4329eceb1edf..37159f875601 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs @@ -6331,10 +6331,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the connection strings of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Replaces the connection strings 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. @@ -6342,9 +6342,6 @@ 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. /// @@ -6366,7 +6363,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>> GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6391,10 +6388,6 @@ 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"); @@ -6412,13 +6405,12 @@ 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, "UpdateConnectionStrings", 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/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").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)); @@ -6434,7 +6426,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) @@ -6465,12 +6457,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) { @@ -6521,7 +6507,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")) @@ -6534,7 +6520,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) { @@ -6554,10 +6540,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the connection strings of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Gets 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. @@ -6565,6 +6551,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// App Setting key name. + /// /// /// Headers that will be added to request. /// @@ -6586,7 +6575,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> GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -6611,214 +6600,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { 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, "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/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)); - 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")) + if (appSettingKey == null) { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets 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. - /// - /// - /// Name of the 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> GetDiagnosticLogsConfigurationWithHttpMessagesAsync(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"); + throw new ValidationException(ValidationRules.CannotBeNull, "appSettingKey"); } if (Client.SubscriptionId == null) { @@ -6837,14 +6621,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, "GetDiagnosticLogsConfiguration", 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/logs").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) @@ -6939,7 +6725,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")) @@ -6952,7 +6738,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) { @@ -6972,10 +6758,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the logging configuration of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Updates the logging configuration 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. @@ -6983,10 +6769,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. /// @@ -7008,7 +6790,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>> GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7033,14 +6815,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"); @@ -7058,13 +6832,12 @@ 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, "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/logs").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("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -7080,7 +6853,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) @@ -7111,12 +6884,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) { @@ -7167,7 +6934,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")) @@ -7180,7 +6947,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) { @@ -7200,10 +6967,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the metadata of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Replaces the metadata of an app. + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -7211,8 +6978,7 @@ 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. @@ -7235,7 +7001,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> GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7260,9 +7026,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (metadata == null) + if (connectionStringKey == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionStringKey"); } if (Client.SubscriptionId == null) { @@ -7281,15 +7047,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("metadata", metadata); + tracingParameters.Add("connectionStringKey", connectionStringKey); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadata", 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/metadata").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) @@ -7303,7 +7070,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) @@ -7334,12 +7101,6 @@ 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) { @@ -7390,7 +7151,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")) @@ -7403,7 +7164,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) { @@ -7423,10 +7184,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the metadata of an app. + /// Replaces the connection strings of an app. /// /// - /// Description for Gets the metadata of an app. + /// Description for Replaces the connection strings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -7434,6 +7195,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. /// @@ -7455,7 +7219,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> UpdateConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7480,6 +7244,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"); @@ -7497,12 +7265,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, "ListMetadata", 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/metadata/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)); @@ -7518,7 +7287,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) @@ -7549,6 +7318,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) { @@ -7599,7 +7374,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")) @@ -7612,7 +7387,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) { @@ -7632,10 +7407,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an app. + /// Gets the connection strings of an app. /// /// - /// Description for Gets the Git/FTP publishing credentials of an app. + /// Description for Gets the connection strings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -7644,32 +7419,213 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// The headers that will be added to request. + /// 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)) + /// + /// 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> ListConnectionStringsWithHttpMessagesAsync(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); + 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, "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/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)); + 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; } /// - /// Updates the Push settings associated with web app. + /// Gets the logging configuration of an app. /// /// - /// Description for Updates the Push settings associated with web app. + /// Description for Gets the logging configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -7692,7 +7648,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> GetDiagnosticLogsConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7717,14 +7673,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"); @@ -7742,13 +7690,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, "GetDiagnosticLogsConfiguration", 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/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)); @@ -7764,7 +7711,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) @@ -7795,12 +7742,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) { @@ -7851,7 +7792,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")) @@ -7864,7 +7805,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) { @@ -7884,16 +7825,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Push settings associated with web app. + /// Updates the logging configuration of an app. /// /// - /// Description for Gets the Push settings associated with web app. + /// Description for Updates the logging configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// 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. @@ -7916,7 +7861,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> UpdateDiagnosticLogsConfigWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -7941,6 +7886,14 @@ 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"); @@ -7958,12 +7911,13 @@ 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, "ListSitePushSettings", 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/pushsettings/list").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)); @@ -7979,7 +7933,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) @@ -8010,6 +7964,12 @@ 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) { @@ -8060,7 +8020,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")) @@ -8073,7 +8033,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) { @@ -8093,12 +8053,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the names of app settings and connection strings that stick to the - /// slot (not swapped). + /// Replaces the metadata of an app. /// /// - /// Description for Gets the names of app settings and connection strings that - /// stick to the slot (not swapped). + /// Description for Replaces the metadata of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -8106,6 +8064,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. /// @@ -8127,7 +8088,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> UpdateMetadataWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8152,6 +8113,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"); @@ -8169,12 +8134,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, "ListSlotConfigurationNames", 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/slotConfigNames").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)); @@ -8190,7 +8156,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) @@ -8221,6 +8187,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) { @@ -8271,7 +8243,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")) @@ -8284,7 +8256,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) { @@ -8304,12 +8276,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the names of application settings and connection string that remain - /// with the slot during swap operation. + /// Gets the metadata of an app. /// /// - /// Description for Updates the names of application settings and connection - /// string that remain with the slot during swap operation. + /// Description for Gets the metadata of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -8317,9 +8287,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. /// @@ -8341,7 +8308,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> ListMetadataWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8366,10 +8333,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"); @@ -8387,13 +8350,12 @@ 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, "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/slotConfigNames").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)); @@ -8409,7 +8371,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) @@ -8440,12 +8402,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) { @@ -8496,7 +8452,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")) @@ -8509,7 +8465,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) { @@ -8529,12 +8485,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the configuration of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. + /// Gets the Git/FTP publishing credentials of an app. /// /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. + /// Description for Gets the Git/FTP publishing credentials of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -8543,6 +8497,34 @@ 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. /// /// @@ -8563,7 +8545,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> UpdateSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8588,6 +8570,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"); @@ -8605,12 +8595,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, "GetConfiguration", 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/web").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)); @@ -8626,7 +8617,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) @@ -8657,6 +8648,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) { @@ -8707,7 +8704,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")) @@ -8720,7 +8717,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) { @@ -8740,19 +8737,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the configuration of an app. + /// Gets the Push settings associated with web app. /// /// - /// Description for Updates the configuration of an app. + /// Description for Gets the Push settings associated with web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -8775,7 +8769,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> ListSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -8800,14 +8794,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"); @@ -8825,13 +8811,12 @@ 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, "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/web").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)); @@ -8847,7 +8832,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) @@ -8878,12 +8863,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) { @@ -8934,7 +8913,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")) @@ -8947,7 +8926,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) { @@ -8967,10 +8946,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the configuration of an app. + /// Gets the names of app settings and connection strings that stick to the + /// slot (not swapped). /// /// - /// Description for Updates the configuration of an app. + /// 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. @@ -8978,9 +8959,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteConfig object. See example. - /// /// /// Headers that will be added to request. /// @@ -9002,7 +8980,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> ListSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9027,10 +9005,6 @@ 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"); @@ -9048,13 +9022,12 @@ 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, "UpdateConfiguration", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotConfigurationNames", 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)); @@ -9070,7 +9043,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) @@ -9101,12 +9074,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) { @@ -9157,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")) @@ -9170,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) { @@ -9190,12 +9157,12 @@ 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 names of application settings and connection string that remain + /// with the slot during swap operation. /// /// - /// 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 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. @@ -9203,6 +9170,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. /// @@ -9224,7 +9194,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> UpdateSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9249,6 +9219,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"); @@ -9266,12 +9240,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, "ListConfigurationSnapshotInfo", 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/snapshots").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)); @@ -9287,7 +9262,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) @@ -9318,6 +9293,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) { @@ -9368,7 +9349,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")) @@ -9381,7 +9362,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) { @@ -9401,11 +9382,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a snapshot of the configuration of an app at a previous point in time. + /// Gets the configuration of an app, such as platform version and bitness, + /// default documents, virtual applications, Always On, etc. /// /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. + /// 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. @@ -9413,9 +9395,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The ID of the snapshot to read. - /// /// /// Headers that will be added to request. /// @@ -9437,7 +9416,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> GetConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9462,10 +9441,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"); @@ -9483,16 +9458,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, "GetConfiguration", 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").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) @@ -9620,10 +9593,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Reverts the configuration of an app to a previous snapshot. + /// Updates the configuration of an app. /// /// - /// Description for Reverts the configuration of an app to a previous snapshot. + /// Description for Updates the configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -9631,8 +9604,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The ID of the snapshot to read. + /// + /// JSON representation of a SiteConfig object. See example. /// /// /// Headers that will be added to request. @@ -9643,6 +9616,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 /// @@ -9652,7 +9628,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> CreateOrUpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -9677,202 +9653,13 @@ 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"); - } - 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) - { - _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 != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web 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> GetWebSiteContainerLogsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) + if (siteConfig == 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\\._\\(\\)]+[^\\.]$"); - } + throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); } - if (name == null) + if (siteConfig != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); + siteConfig.Validate(); } if (Client.SubscriptionId == null) { @@ -9891,12 +9678,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, "GetWebSiteContainerLogs", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfiguration", 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}/containerlogs").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)); @@ -9912,7 +9700,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) @@ -9943,6 +9731,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) { @@ -9955,7 +9749,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -9963,16 +9757,15 @@ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -9982,10 +9775,6 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -9998,7 +9787,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")) @@ -10008,7 +9797,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -10018,16 +9820,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the ZIP archived docker log files for the given site + /// Updates the configuration of an app. /// /// - /// Description for Gets the ZIP archived docker log files for the given site + /// Description for Updates the configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. + /// + /// + /// JSON representation of a SiteConfig object. See example. /// /// /// Headers that will be added to request. @@ -10035,7 +9840,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -10050,7 +9855,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContainerLogsZipWithHttpMessagesAsync(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) { @@ -10075,6 +9880,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"); @@ -10092,12 +9901,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, "GetContainerLogsZip", 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}/containerlogs/zip/download").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)); @@ -10113,7 +9923,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -10144,6 +9954,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) { @@ -10156,7 +9972,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -10164,16 +9980,15 @@ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -10183,10 +9998,6 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -10199,7 +10010,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")) @@ -10209,7 +10020,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -10219,16 +10043,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List continuous web jobs for an app, or a deployment slot. + /// Gets a list of web app configuration snapshots identifiers. Each element of + /// the list contains a timestamp and the ID of the snapshot. /// /// - /// Description for List continuous web jobs for an app, or a deployment slot. + /// Description for Gets a list of web app configuration snapshots identifiers. + /// Each element of the list contains a timestamp and the ID of the snapshot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -10251,7 +10077,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListContinuousWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, 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) { @@ -10294,11 +10120,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobs", 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}/continuouswebjobs").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("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -10395,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")) @@ -10408,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) { @@ -10428,20 +10254,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a continuous web job by its ID for an app, or a deployment slot. + /// Gets a snapshot of the configuration of an app at a previous point in time. /// /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. + /// 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. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// The ID of the snapshot to read. /// /// /// Headers that will be added to request. @@ -10464,7 +10290,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, 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) { @@ -10489,9 +10315,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (snapshotId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); } if (Client.SubscriptionId == null) { @@ -10510,16 +10336,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJob", 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}/continuouswebjobs/{webJobName}").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("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _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) @@ -10584,7 +10410,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 @@ -10614,7 +10440,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")) @@ -10627,7 +10453,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) { @@ -10647,20 +10473,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. + /// Reverts the configuration of an app to a previous snapshot. /// /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. + /// Description for Reverts the configuration of an app to a previous snapshot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// The ID of the snapshot to read. /// /// /// Headers that will be added to request. @@ -10680,7 +10505,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 RecoverSiteConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -10705,9 +10530,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (snapshotId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); } if (Client.SubscriptionId == null) { @@ -10726,16 +10551,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJob", tracingParameters); + 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}/continuouswebjobs/{webJobName}").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}/recover").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("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -10749,7 +10574,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) @@ -10800,7 +10625,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -10845,20 +10670,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start a continuous web job for an app, or a deployment slot. + /// Gets the last lines of docker logs for the given site /// /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. + /// Description for Gets the last lines of docker logs for the given site /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Name of Web Job. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -10866,9 +10687,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// 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 /// @@ -10878,7 +10702,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> GetWebSiteContainerLogsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -10903,10 +10727,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -10924,16 +10744,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebSiteContainerLogs", 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}/containerlogs").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) @@ -10990,7 +10808,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -10998,15 +10816,16 @@ 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)); + var ex = new CloudException(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); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -11016,6 +10835,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -11028,13 +10851,18 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -11043,19 +10871,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Stop a continuous web job for an app, or a deployment slot. + /// Gets the ZIP archived docker log files for the given site /// /// - /// Description for Stop a continuous web job for an app, or a deployment slot. + /// Description for Gets the ZIP archived docker log files for the given site /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Name of Web Job. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -11063,9 +10888,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// 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 /// @@ -11075,7 +10903,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> GetContainerLogsZipWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11100,10 +10928,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -11121,16 +10945,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetContainerLogsZip", 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}/containerlogs/zip/download").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) @@ -11187,7 +11009,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -11195,15 +11017,16 @@ 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)); + var ex = new CloudException(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); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -11213,6 +11036,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -11225,13 +11052,18 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -11240,16 +11072,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployments for an app, or a deployment slot. + /// List continuous web jobs for an app, or a deployment slot. /// /// - /// Description for List deployments for an app, or a deployment slot. + /// Description for List continuous web jobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// /// /// Headers that will be added to request. @@ -11272,7 +11104,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>> ListContinuousWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11315,11 +11147,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeployments", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobs", 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}/continuouswebjobs").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)); @@ -11416,7 +11248,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")) @@ -11429,7 +11261,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) { @@ -11449,20 +11281,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a deployment by its ID for an app, or a deployment slot. + /// Gets a continuous web job 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. + /// Description for Gets a continuous web job by its ID for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Deployment ID. + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -11485,7 +11317,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> GetContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11510,9 +11342,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -11531,16 +11363,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeployment", 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}/deployments/{id}").ToString(); + 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("{id}", System.Uri.EscapeDataString(id)); + _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) @@ -11605,7 +11437,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 @@ -11635,7 +11467,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")) @@ -11648,7 +11480,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) { @@ -11668,22 +11500,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create a deployment for an app, or a deployment slot. + /// Delete a continuous web job by its ID for an app, or a deployment slot. /// /// - /// Description for Create a deployment 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. /// /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. + /// Site name. /// - /// - /// Deployment details. + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -11694,9 +11524,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 /// @@ -11706,7 +11533,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 DeleteContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11731,13 +11558,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (deployment == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -11756,17 +11579,16 @@ 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("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateDeployment", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJob", 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}/continuouswebjobs/{webJobName}").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("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -11780,7 +11602,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -11811,12 +11633,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) { @@ -11837,7 +11653,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 @@ -11867,31 +11683,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); @@ -11900,20 +11698,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a deployment 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 deployment by its ID for an app, or a deployment + /// Description for Start a continuous web job for an app, or a deployment /// slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Deployment ID. + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -11933,7 +11731,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 StartContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -11958,9 +11756,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -11979,16 +11777,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDeployment", 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}/deployments/{id}").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("{id}", System.Uri.EscapeDataString(id)); + _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) @@ -12002,7 +11800,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) @@ -12053,7 +11851,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 @@ -12098,22 +11896,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. + /// Stop a continuous web job for an app, or a deployment slot. /// /// - /// Description for List deployment log for specific deployment 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. /// /// - /// Name of the app. + /// Site name. /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -12124,9 +11919,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 /// @@ -12136,7 +11928,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 StopContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12161,9 +11953,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -12182,16 +11974,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLog", 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}/deployments/{id}/log").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("{id}", System.Uri.EscapeDataString(id)); + _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) @@ -12205,7 +11997,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) @@ -12256,7 +12048,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 @@ -12286,31 +12078,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); @@ -12319,14 +12093,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. + /// List deployments 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. + /// Description for List deployments for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -12334,10 +12104,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// /// /// Headers that will be added to request. /// @@ -12359,7 +12125,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>> ListDeploymentsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12384,14 +12150,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"); @@ -12409,13 +12167,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, "DiscoverBackup", tracingParameters); + 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}/discoverbackup").ToString(); + 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)); @@ -12431,7 +12188,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) @@ -12462,12 +12219,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) { @@ -12518,7 +12269,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")) @@ -12531,7 +12282,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) { @@ -12551,11 +12302,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Lists ownership identifiers for domain associated with web app. + /// Get a deployment by its ID for an app, or a deployment slot. /// /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. + /// 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. @@ -12563,6 +12314,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Deployment ID. + /// /// /// Headers that will be added to request. /// @@ -12584,7 +12338,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> GetDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12609,6 +12363,10 @@ 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"); @@ -12626,14 +12384,16 @@ 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, "ListDomainOwnershipIdentifiers", 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}/domainOwnershipIdentifiers").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) @@ -12728,7 +12488,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")) @@ -12741,7 +12501,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) { @@ -12761,10 +12521,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get domain ownership identifier for web app. + /// Create a deployment for an app, or a deployment slot. /// /// - /// Description for Get domain ownership identifier for web app. + /// Description for Create a deployment for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -12772,8 +12532,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. + /// + /// ID of an existing deployment. + /// + /// + /// Deployment details. /// /// /// Headers that will be added to request. @@ -12796,7 +12559,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> CreateDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -12821,9 +12584,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } + if (deployment == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); } if (Client.SubscriptionId == null) { @@ -12842,16 +12609,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); + tracingParameters.Add("id", id); + tracingParameters.Add("deployment", deployment); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifier", 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}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").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("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); + _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) @@ -12865,7 +12633,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) @@ -12896,6 +12664,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) { @@ -12946,7 +12720,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")) @@ -12959,7 +12733,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) { @@ -12979,12 +12753,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. + /// Delete a deployment by its ID for an app, or a deployment slot. /// /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. + /// Description for Delete a deployment by its ID for an app, or a deployment + /// slot. /// /// /// Name of the resource group to which the resource belongs. @@ -12992,11 +12765,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. + /// + /// Deployment ID. /// /// /// Headers that will be added to request. @@ -13007,9 +12777,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 /// @@ -13019,7 +12786,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 DeleteDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13044,13 +12811,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (Client.SubscriptionId == null) { @@ -13069,17 +12832,16 @@ 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("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifier", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteDeployment", 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}/deployments/{id}").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("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -13093,7 +12855,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -13124,12 +12886,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) { @@ -13150,7 +12906,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 @@ -13180,31 +12936,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); @@ -13213,10 +12951,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a domain ownership identifier for a web app. + /// List deployment log for specific deployment for an app, or a deployment + /// slot. /// /// - /// Description for Deletes a domain ownership identifier for a web app. + /// 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. @@ -13224,8 +12964,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. + /// + /// 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. @@ -13236,6 +12977,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 /// @@ -13245,7 +12989,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> ListDeploymentLogWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13270,9 +13014,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (Client.SubscriptionId == null) { @@ -13291,16 +13035,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); + tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifier", 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}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").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("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); + _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) @@ -13314,7 +13058,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) @@ -13365,7 +13109,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 @@ -13395,13 +13139,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); @@ -13410,12 +13172,14 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. + /// 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 Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. + /// 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. @@ -13423,11 +13187,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. + /// + /// A RestoreRequest object that includes Azure storage URL and blog name for + /// discovery of backup. /// /// /// Headers that will be added to request. @@ -13450,7 +13212,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> DiscoverBackupWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13475,13 +13237,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); } - if (domainOwnershipIdentifier == null) + if (request != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); + request.Validate(); } if (Client.SubscriptionId == null) { @@ -13500,17 +13262,15 @@ 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("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifier", 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}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").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("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -13524,7 +13284,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -13555,9 +13315,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(domainOwnershipIdentifier != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -13611,7 +13371,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")) @@ -13624,7 +13384,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) { @@ -13644,16 +13404,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the status of the last MSDeploy operation. + /// Lists ownership identifiers for domain associated with web app. /// /// - /// Description for Get the status of the last MSDeploy operation. + /// Description for Lists ownership identifiers for domain associated with web + /// app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -13676,7 +13437,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>> ListDomainOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13719,11 +13480,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, "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}/extensions/MSDeploy").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("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -13820,7 +13581,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")) @@ -13833,7 +13594,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) { @@ -13853,44 +13614,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Get domain ownership identifier for web app. /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Get domain ownership identifier for web app. /// /// /// 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. - /// - /// - /// Name of the resource group to which the resource belongs. + /// Name of the app. /// - /// - /// Name of web app. + /// + /// Name of domain ownership identifier. /// /// /// Headers that will be added to request. @@ -13913,7 +13649,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> GetDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -13938,6 +13674,10 @@ 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"); @@ -13955,14 +13695,16 @@ 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, "GetMSDeployLog", 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}/extensions/MSDeploy/log").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) @@ -14027,7 +13769,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 @@ -14057,7 +13799,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")) @@ -14070,7 +13812,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) { @@ -14090,16 +13832,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the functions for a web site, or a deployment slot. + /// Creates a domain ownership identifier for web app, or updates an existing + /// ownership identifier. /// /// - /// Description for List the functions for a web site, or a deployment slot. + /// 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. /// /// - /// Site name. + /// Name of the app. + /// + /// + /// Name of domain ownership identifier. + /// + /// + /// A JSON representation of the domain ownership properties. /// /// /// Headers that will be added to request. @@ -14122,7 +13872,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListFunctionsWithHttpMessagesAsync(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) { @@ -14147,6 +13897,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"); @@ -14164,14 +13922,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, "ListFunctions", 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}/functions").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) @@ -14185,7 +13946,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) @@ -14216,6 +13977,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) { @@ -14236,7 +14003,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 @@ -14266,7 +14033,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")) @@ -14279,7 +14046,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) { @@ -14299,17 +14066,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Fetch a short lived token that can be exchanged for a master key. + /// Deletes a domain ownership identifier for a web app. /// /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. + /// Description for Deletes a domain ownership identifier for a web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. + /// + /// + /// Name of domain ownership identifier. /// /// /// Headers that will be added to request. @@ -14320,9 +14089,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 /// @@ -14332,7 +14098,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetFunctionsAdminTokenWithHttpMessagesAsync(string resourceGroupName, string name, 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) { @@ -14357,6 +14123,10 @@ 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"); @@ -14374,14 +14144,16 @@ 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, "GetFunctionsAdminToken", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifier", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token").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) @@ -14395,7 +14167,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) @@ -14446,7 +14218,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 @@ -14476,31 +14248,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); @@ -14509,20 +14263,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get function information by its ID for web site, or a deployment slot. + /// Creates a domain ownership identifier for web app, or updates an existing + /// ownership identifier. /// /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. + /// 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. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Function name. + /// + /// Name of domain ownership identifier. + /// + /// + /// A JSON representation of the domain ownership properties. /// /// /// Headers that will be added to request. @@ -14545,7 +14303,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, 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) { @@ -14570,9 +14328,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) + if (domainOwnershipIdentifierName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + } + if (domainOwnershipIdentifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); } if (Client.SubscriptionId == null) { @@ -14591,16 +14353,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); + tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); + tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifier", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -14614,7 +14377,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) @@ -14645,6 +14408,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) { @@ -14665,7 +14434,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 @@ -14695,7 +14464,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")) @@ -14708,7 +14477,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) { @@ -14728,50 +14497,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, functionEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a function for web site, or a deployment slot. + /// Get the status of the last MSDeploy operation. /// /// - /// Description for Delete a function for web site, or a deployment slot. + /// Description for Get the status of the last MSDeploy operation. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Function name. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -14782,6 +14517,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 /// @@ -14791,7 +14529,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, 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) { @@ -14816,10 +14554,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -14837,16 +14571,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFunction", 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}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -14860,7 +14592,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) @@ -14911,7 +14643,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -14941,13 +14673,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); @@ -14956,25 +14706,44 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Add or update a function secret. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Add or update a function secret. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of web app. /// - /// - /// The name of the function. + /// + /// Details of MSDeploy operation /// - /// - /// The name of the key. + /// + /// The headers that will be added to request. /// - /// - /// The key to create or update + /// + /// 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. @@ -14997,7 +14766,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, KeyInfo key, 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) { @@ -15022,18 +14791,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -15051,19 +14808,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFunctionSecret", 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}/functions/{functionName}/keys/{keyName}").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("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -15077,7 +14829,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) @@ -15108,12 +14860,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -15134,7 +14880,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -15164,7 +14910,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")) @@ -15177,25 +14923,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -15215,10 +14943,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a function secret. + /// List the functions for a web site, or a deployment slot. /// /// - /// Description for Delete a function secret. + /// Description for List the functions for a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -15226,12 +14954,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// /// /// Headers that will be added to request. /// @@ -15241,6 +14963,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 /// @@ -15250,7 +14975,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -15275,14 +15000,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -15300,18 +15017,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFunctionSecret", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctions", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -15325,7 +15038,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) @@ -15376,7 +15089,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -15406,13 +15119,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); @@ -15421,20 +15152,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get function keys for a function in a web site, or a deployment slot. + /// Fetch a short lived token that can be exchanged for a master key. /// /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. + /// Description for Fetch a short lived token that can be exchanged for a + /// master key. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Function name. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -15457,7 +15185,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListFunctionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetFunctionsAdminTokenWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -15482,10 +15210,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -15503,16 +15227,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionKeys", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetFunctionsAdminToken", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -15526,7 +15248,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) @@ -15607,7 +15329,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")) @@ -15620,7 +15342,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) { @@ -15640,10 +15362,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get function secrets for a function in a web site, or a deployment slot. + /// Get function information by its ID for web site, or a deployment slot. /// /// - /// Description for Get function secrets for a function in a web site, or a + /// Description for Get function information by its ID for web site, or a /// deployment slot. /// /// @@ -15676,7 +15398,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListFunctionSecretsWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -15724,11 +15446,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("functionName", functionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionSecrets", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetFunction", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); @@ -15745,7 +15467,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) @@ -15796,7 +15518,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 @@ -15826,7 +15548,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")) @@ -15839,7 +15561,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) { @@ -15859,10 +15581,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get host secrets for a function app. + /// Create function for web site, or a deployment slot. /// /// - /// Description for Get host secrets for a function app. + /// Description for Create function for web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -15870,6 +15592,40 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// + /// + /// Function name. + /// + /// + /// Function details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, functionEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a function for web site, or a deployment slot. + /// + /// + /// Description for Delete a function for web site, or a deployment slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Function name. + /// /// /// Headers that will be added to request. /// @@ -15879,9 +15635,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 /// @@ -15891,7 +15644,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListHostKeysWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -15916,6 +15669,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (functionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -15933,14 +15690,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostKeys", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteFunction", 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}/host/default/listkeys").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -15954,7 +15713,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) @@ -16005,7 +15764,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -16035,31 +15794,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); @@ -16068,16 +15809,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// This is to allow calling via powershell and ARM template. + /// Add or update a function secret. /// /// - /// Description for This is to allow calling via powershell and ARM template. + /// Description for Add or update a function secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// The name of the function. + /// + /// + /// The name of the key. + /// + /// + /// The key to create or update /// /// /// Headers that will be added to request. @@ -16088,6 +15838,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 /// @@ -16097,7 +15850,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ListSyncStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -16122,6 +15875,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (functionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } + if (keyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + } + if (key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "key"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -16139,14 +15904,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("functionName", functionName); + tracingParameters.Add("keyName", keyName); + tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncStatus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFunctionSecret", 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}/host/default/listsyncstatus").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -16160,7 +15930,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) @@ -16191,6 +15961,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(key != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -16211,7 +15987,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -16241,13 +16017,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -16256,16 +16068,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Syncs function trigger metadata to the management database + /// Delete a function secret. /// /// - /// Description for Syncs function trigger metadata to the management database + /// Description for Delete a function secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// The name of the function. + /// + /// + /// The name of the key. /// /// /// Headers that will be added to request. @@ -16285,7 +16103,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -16310,6 +16128,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (functionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } + if (keyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -16327,14 +16153,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("functionName", functionName); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteFunctionSecret", 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}/host/default/sync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -16348,7 +16178,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) @@ -16399,7 +16229,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -16444,10 +16274,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Add or update a host level secret. + /// Get function keys for a function in a web site, or a deployment slot. /// /// - /// Description for Add or update a host level secret. + /// Description for Get function keys for a function in a web site, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -16455,14 +16286,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or update + /// + /// Function name. /// /// /// Headers that will be added to request. @@ -16485,7 +16310,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListFunctionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -16510,17 +16335,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (key == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } if (Client.SubscriptionId == null) { @@ -16539,19 +16356,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("key", key); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostSecret", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctionKeys", 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}/host/default/{keyType}/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -16565,7 +16379,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) @@ -16596,12 +16410,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -16622,7 +16430,7 @@ internal WebAppsOperations(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 @@ -16652,7 +16460,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")) @@ -16665,25 +16473,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -16703,10 +16493,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a host level secret. + /// Get function secrets for a function in a web site, or a deployment slot. /// /// - /// Description for Delete a host level secret. + /// Description for Get function secrets for a function in a web site, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -16714,11 +16505,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// The type of host key. - /// - /// - /// The name of the key. + /// + /// Function name. /// /// /// Headers that will be added to request. @@ -16729,6 +16517,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 /// @@ -16738,7 +16529,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListFunctionSecretsWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -16763,13 +16554,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } if (Client.SubscriptionId == null) { @@ -16788,18 +16575,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostSecret", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctionSecrets", 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}/host/default/{keyType}/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -16813,7 +16598,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) @@ -16864,7 +16649,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -16894,13 +16679,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); @@ -16909,16 +16712,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get hostname bindings for an app or a deployment slot. + /// Get host secrets for a function app. /// /// - /// Description for Get hostname bindings for an app or a deployment slot. + /// Description for Get host secrets for a function app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// /// /// Headers that will be added to request. @@ -16941,7 +16744,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListHostNameBindingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListHostKeysWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -16984,11 +16787,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHostKeys", 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}/hostNameBindings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys").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)); @@ -17004,7 +16807,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) @@ -17085,7 +16888,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")) @@ -17098,7 +16901,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) { @@ -17118,12 +16921,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). + /// This is to allow calling via powershell and ARM template. /// /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). + /// Description for This is to allow calling via powershell and ARM template. /// /// /// Name of the resource group to which the resource belongs. @@ -17131,9 +16932,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Hostname in the hostname binding. - /// /// /// Headers that will be added to request. /// @@ -17143,9 +16941,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 /// @@ -17155,7 +16950,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ListSyncStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -17180,10 +16975,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -17201,16 +16992,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHostNameBinding", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSyncStatus", 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}/hostNameBindings/{hostName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -17224,7 +17013,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) @@ -17275,7 +17064,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -17305,31 +17094,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); @@ -17338,10 +17109,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a hostname binding for an app. + /// Syncs function trigger metadata to the management database /// /// - /// Description for Creates a hostname binding for an app. + /// Description for Syncs function trigger metadata to the management database /// /// /// Name of the resource group to which the resource belongs. @@ -17349,13 +17120,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// /// /// Headers that will be added to request. /// @@ -17365,9 +17129,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 /// @@ -17377,7 +17138,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -17402,14 +17163,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (hostNameBinding == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostNameBinding"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -17427,17 +17180,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("hostNameBinding", hostNameBinding); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostNameBinding", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncFunctions", 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}/hostNameBindings/{hostName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -17451,7 +17201,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) @@ -17482,12 +17232,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(hostNameBinding != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostNameBinding, 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) { @@ -17508,7 +17252,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -17538,31 +17282,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); @@ -17571,19 +17297,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a hostname binding for an app. + /// Add or update a host level secret. /// /// - /// Description for Deletes a hostname binding for an app. + /// Description for Add or update a host level secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Hostname in the hostname binding. + /// + /// The type of host key. + /// + /// + /// The name of the key. + /// + /// + /// The key to create or update /// /// /// Headers that will be added to request. @@ -17594,6 +17326,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 /// @@ -17603,7 +17338,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -17628,9 +17363,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (hostName == null) + if (keyType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); + throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); + } + if (keyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + } + if (key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "key"); } if (Client.SubscriptionId == null) { @@ -17649,16 +17392,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("hostName", hostName); + tracingParameters.Add("keyType", keyType); + tracingParameters.Add("keyName", keyName); + tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostNameBinding", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostSecret", 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}/hostNameBindings/{hostName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); + _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -17672,7 +17418,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) @@ -17703,6 +17449,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(key != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -17723,7 +17475,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 != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -17753,13 +17505,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -17768,23 +17556,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. + /// Delete a host level secret. /// /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. + /// Description for Delete a host level secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Site name. /// - /// - /// The namespace for this hybrid connection. + /// + /// The type of host key. /// - /// - /// The relay name for this hybrid connection. + /// + /// The name of the key. /// /// /// Headers that will be added to request. @@ -17795,9 +17582,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 /// @@ -17807,7 +17591,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -17832,13 +17616,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) + if (keyType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); } - if (relayName == null) + if (keyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); } if (Client.SubscriptionId == null) { @@ -17857,18 +17641,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); + tracingParameters.Add("keyType", keyType); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteHostSecret", 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}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -17882,7 +17666,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) @@ -17933,7 +17717,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -17963,31 +17747,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); @@ -17996,25 +17762,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new Hybrid Connection using a Service Bus relay. + /// Get hostname bindings for an app or a deployment slot. /// /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. + /// Description for Get hostname bindings for an app or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -18037,7 +17794,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListHostNameBindingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -18062,18 +17819,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -18091,19 +17836,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHybridConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindings", 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}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -18117,7 +17857,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) @@ -18148,12 +17888,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -18204,7 +17938,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")) @@ -18217,7 +17951,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) { @@ -18237,22 +17971,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Removes a Hybrid Connection from this site. + /// Get the named hostname binding for an app (or deployment slot, if + /// specified). /// /// - /// Description for Removes a Hybrid Connection from this site. + /// Description for Get the named hostname binding for an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. + /// Name of the app. /// - /// - /// The relay name for this hybrid connection. + /// + /// Hostname in the hostname binding. /// /// /// Headers that will be added to request. @@ -18263,6 +17996,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 /// @@ -18272,7 +18008,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -18297,13 +18033,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) + if (hostName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); } if (Client.SubscriptionId == null) { @@ -18322,18 +18054,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); + tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetHostNameBinding", 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}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -18347,7 +18077,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) @@ -18398,7 +18128,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 @@ -18428,13 +18158,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); @@ -18443,25 +18191,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new Hybrid Connection using a Service Bus relay. + /// Creates a hostname binding for an app. /// /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. + /// Description for Creates a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. + /// Name of the app. /// - /// - /// The relay name for this hybrid connection. + /// + /// Hostname in the hostname binding. /// - /// - /// The details of the hybrid connection. + /// + /// Binding details. This is the JSON representation of a HostNameBinding + /// object. /// /// /// Headers that will be added to request. @@ -18484,7 +18230,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -18509,17 +18255,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) + if (hostName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); } - if (connectionEnvelope == null) + if (hostNameBinding == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostNameBinding"); } if (Client.SubscriptionId == null) { @@ -18538,19 +18280,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("hostName", hostName); + tracingParameters.Add("hostNameBinding", hostNameBinding); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateHybridConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostNameBinding", 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}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -18564,7 +18304,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) @@ -18595,9 +18335,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) + if(hostNameBinding != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostNameBinding, 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"); } @@ -18651,7 +18391,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")) @@ -18664,7 +18404,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) { @@ -18684,17 +18424,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. + /// Deletes a hostname binding for an app. /// /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. + /// Description for Deletes a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. + /// + /// + /// Hostname in the hostname binding. /// /// /// Headers that will be added to request. @@ -18705,9 +18447,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 /// @@ -18717,7 +18456,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListHybridConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -18742,6 +18481,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (hostName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -18759,14 +18502,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnections", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteHostNameBinding", 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}/hybridConnectionRelays").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -18780,7 +18525,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) @@ -18831,7 +18576,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 @@ -18861,31 +18606,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); @@ -18894,18 +18621,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets hybrid connections configured for an app (or deployment slot, if - /// specified). + /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. /// /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). + /// Description for Retrieves a specific Service Bus Hybrid Connection used by + /// this Web App. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. + /// + /// + /// The namespace for this hybrid connection. + /// + /// + /// The relay name for this hybrid connection. /// /// /// Headers that will be added to request. @@ -18928,7 +18660,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListRelayServiceConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -18953,6 +18685,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -18970,14 +18710,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRelayServiceConnections", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnection", 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}/hybridconnection").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -19072,7 +18816,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")) @@ -19085,7 +18829,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) { @@ -19105,19 +18849,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a hybrid connection configuration by its name. + /// Creates a new Hybrid Connection using a Service Bus relay. /// /// - /// Description for Gets a hybrid connection configuration by its name. + /// Description for Creates a new Hybrid Connection using a Service Bus relay. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// Name of the hybrid connection. + /// + /// The namespace for this hybrid connection. + /// + /// + /// The relay name for this hybrid connection. + /// + /// + /// The details of the hybrid connection. /// /// /// Headers that will be added to request. @@ -19140,7 +18890,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -19165,9 +18915,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -19186,16 +18944,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRelayServiceConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHybridConnection", 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}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -19209,7 +18970,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) @@ -19240,6 +19001,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -19290,7 +19057,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")) @@ -19303,7 +19070,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) { @@ -19323,24 +19090,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). + /// Removes a Hybrid Connection from this site. /// /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). + /// Description for Removes a Hybrid Connection from this site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// Name of the hybrid connection configuration. + /// + /// The namespace for this hybrid connection. /// - /// - /// Details of the hybrid connection configuration. + /// + /// The relay name for this hybrid connection. /// /// /// Headers that will be added to request. @@ -19351,9 +19116,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 /// @@ -19363,7 +19125,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -19388,13 +19150,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); } - if (connectionEnvelope == null) + if (relayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); } if (Client.SubscriptionId == null) { @@ -19413,17 +19175,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateRelayServiceConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnection", 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}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -19437,7 +19200,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -19468,12 +19231,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -19494,7 +19251,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 @@ -19524,31 +19281,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); @@ -19557,19 +19296,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a relay service connection by its name. + /// Creates a new Hybrid Connection using a Service Bus relay. /// /// - /// Description for Deletes a relay service connection by its name. + /// Description for Creates a new Hybrid Connection using a Service Bus relay. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// Name of the hybrid connection configuration. + /// + /// The namespace for this hybrid connection. + /// + /// + /// The relay name for this hybrid connection. + /// + /// + /// The details of the hybrid connection. /// /// /// Headers that will be added to request. @@ -19580,6 +19325,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 /// @@ -19589,7 +19337,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -19614,9 +19362,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -19635,16 +19391,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteRelayServiceConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateHybridConnection", 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}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -19658,7 +19417,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("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -19689,6 +19448,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -19709,7 +19474,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 @@ -19739,13 +19504,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); @@ -19754,24 +19537,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). + /// Retrieves all Service Bus Hybrid Connections used by this Web App. /// /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). + /// Description for Retrieves all Service Bus Hybrid Connections used by this + /// Web App. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. + /// The name of the web app. /// /// /// Headers that will be added to request. @@ -19794,7 +19570,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListHybridConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -19819,14 +19595,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -19844,17 +19612,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateRelayServiceConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnections", 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}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -19868,7 +19633,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) @@ -19899,12 +19664,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -19955,7 +19714,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")) @@ -19968,7 +19727,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) { @@ -19988,10 +19747,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// Gets hybrid connections configured for an app (or deployment slot, if + /// specified). /// /// - /// Description for Gets all scale-out instances of an app. + /// Description for Gets hybrid connections configured for an app (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -20020,7 +19781,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListRelayServiceConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -20063,11 +19824,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiers", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListRelayServiceConnections", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection").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)); @@ -20164,7 +19925,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")) @@ -20177,7 +19938,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) { @@ -20197,10 +19958,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// Gets a hybrid connection configuration by its name. /// /// - /// Description for Gets all scale-out instances of an app. + /// Description for Gets a hybrid connection configuration by its name. /// /// /// Name of the resource group to which the resource belongs. @@ -20208,7 +19969,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// + /// + /// Name of the hybrid connection. /// /// /// Headers that will be added to request. @@ -20231,7 +19993,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceInfoWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -20256,9 +20018,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) + if (entityName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); } if (Client.SubscriptionId == null) { @@ -20277,16 +20039,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("entityName", entityName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceInfo", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetRelayServiceConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -20381,7 +20143,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")) @@ -20394,7 +20156,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) { @@ -20414,19 +20176,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the status of the last MSDeploy operation. + /// Creates a new hybrid connection configuration (PUT), or updates an existing + /// one (PATCH). /// /// - /// Description for Get the status of the last MSDeploy operation. + /// Description for Creates a new hybrid connection configuration (PUT), or + /// updates an existing one (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// ID of web app instance. + /// + /// Name of the hybrid connection configuration. + /// + /// + /// Details of the hybrid connection configuration. /// /// /// Headers that will be added to request. @@ -20449,7 +20216,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceMsDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -20474,9 +20241,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) + if (entityName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -20495,16 +20266,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("entityName", entityName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMsDeployStatus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateRelayServiceConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -20518,7 +20290,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) @@ -20549,6 +20321,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -20599,7 +20377,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")) @@ -20612,7 +20390,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) { @@ -20632,50 +20410,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy 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. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, instanceId, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. + /// Deletes a relay service connection by its name. /// /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. + /// Description for Deletes a relay service connection by its name. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// ID of web app instance. + /// + /// Name of the hybrid connection configuration. /// /// /// Headers that will be added to request. @@ -20686,9 +20433,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 /// @@ -20698,7 +20442,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -20723,9 +20467,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) + if (entityName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); } if (Client.SubscriptionId == null) { @@ -20744,16 +20488,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("entityName", entityName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMSDeployLog", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteRelayServiceConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -20767,7 +20511,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) @@ -20848,31 +20592,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); @@ -20881,22 +20607,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Creates a new hybrid connection configuration (PUT), or updates an existing + /// one (PATCH). /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Creates a new hybrid connection configuration (PUT), or + /// updates an existing one (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// Name of the hybrid connection configuration. + /// + /// + /// Details of the hybrid connection configuration. /// /// /// Headers that will be added to request. @@ -20919,7 +20647,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessesWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -20944,9 +20672,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) + if (entityName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -20965,16 +20697,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("entityName", entityName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcesses", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateRelayServiceConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -20988,7 +20721,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) @@ -21019,6 +20752,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -21039,7 +20778,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 @@ -21069,7 +20808,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")) @@ -21082,7 +20821,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) { @@ -21102,25 +20841,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Gets all scale-out instances of an app. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Gets all scale-out instances of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// Name of the app. /// /// /// Headers that will be added to request. @@ -21143,7 +20873,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -21168,14 +20898,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -21193,18 +20915,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcess", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiers", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -21269,7 +20987,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 @@ -21299,7 +21017,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")) @@ -21312,7 +21030,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) { @@ -21332,25 +21050,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. + /// Gets all scale-out instances of an app. /// /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. + /// Description for Gets all scale-out instances of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of the app. /// /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -21361,6 +21072,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 /// @@ -21370,7 +21084,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceInfoWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -21395,10 +21109,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (instanceId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); @@ -21420,17 +21130,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceProcess", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceInfo", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -21445,7 +21153,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) @@ -21496,7 +21204,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -21526,13 +21234,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); @@ -21541,25 +21267,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. + /// Get the status of the last MSDeploy operation. /// /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Get the status of the last MSDeploy operation. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of web app. /// /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// ID of web app instance. /// /// /// Headers that will be added to request. @@ -21582,7 +21302,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceMsDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -21607,10 +21327,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (instanceId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); @@ -21632,17 +21348,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessDump", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMsDeployStatus", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -21700,7 +21414,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -21708,7 +21422,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 @@ -21738,7 +21452,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")) @@ -21748,7 +21462,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -21758,25 +21485,50 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of web app. /// - /// - /// PID. + /// + /// ID of web app instance. + /// + /// + /// Details of MSDeploy operation + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, instanceId, 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. /// /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// ID of web app instance. /// /// /// Headers that will be added to request. @@ -21799,7 +21551,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -21824,10 +21576,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (instanceId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); @@ -21849,17 +21597,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModules", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMSDeployLog", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -21955,7 +21701,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")) @@ -21968,7 +21714,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) { @@ -21988,12 +21734,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -22001,12 +21747,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// PID. - /// - /// - /// Module base address. - /// /// /// ID of a specific scaled-out instance. This is the value of the name /// property in the JSON response from "GET api/sites/{siteName}/instances". @@ -22032,7 +21772,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessesWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -22057,14 +21797,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } if (instanceId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); @@ -22086,19 +21818,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessModule", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcesses", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -22194,7 +21922,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")) @@ -22207,7 +21935,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) { @@ -22227,12 +21955,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -22268,7 +21996,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -22321,11 +22049,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("processId", processId); tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreads", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcess", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); @@ -22424,7 +22152,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")) @@ -22437,7 +22165,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) { @@ -22457,18 +22185,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. + /// Terminate a process by its ID for a web site, or a deployment slot, or + /// specific scaled-out instance in a web site. /// /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. + /// Description for Terminate a process by its ID for a web site, or a + /// deployment slot, or specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -22479,9 +22214,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 /// @@ -22491,7 +22223,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> IsCloneableWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -22516,6 +22248,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -22533,14 +22273,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "IsCloneable", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceProcess", 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}/iscloneable").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -22554,7 +22298,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) @@ -22605,7 +22349,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -22635,31 +22379,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); @@ -22668,16 +22394,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Get a memory dump of a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Gets existing backups of an app. + /// Description for Get a memory dump of a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -22700,7 +22435,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteBackupsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -22725,6 +22460,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -22742,14 +22485,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackups", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessDump", 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}/listbackups").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -22763,7 +22510,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) @@ -22806,7 +22553,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -22814,7 +22561,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 @@ -22844,7 +22591,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")) @@ -22854,20 +22601,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -22877,16 +22611,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// This is to allow calling via powershell and ARM template. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for This is to allow calling via powershell and ARM template. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -22909,7 +22652,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListSyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -22934,6 +22677,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -22951,14 +22702,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncFunctionTriggers", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModules", 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}/listsyncfunctiontriggerstatus").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -22972,7 +22727,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) @@ -23023,7 +22778,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 @@ -23053,7 +22808,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")) @@ -23066,7 +22821,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) { @@ -23086,78 +22841,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> MigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginMigrateStorageWithHttpMessagesAsync(subscriptionName, resourceGroupName, name, migrationOptions, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// The headers that will be added to request. + /// Site name. /// - /// - /// The cancellation token. + /// + /// PID. /// - public async Task> MigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginMigrateMySqlWithHttpMessagesAsync(resourceGroupName, name, migrationRequestEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// Module base address. /// - /// - /// Name of web app. + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -23180,7 +22885,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMigrateMySqlStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -23205,6 +22910,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (baseAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); + } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -23222,14 +22939,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("baseAddress", baseAddress); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMigrateMySqlStatus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessModule", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -23294,7 +23017,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 @@ -23324,7 +23047,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")) @@ -23337,7 +23060,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) { @@ -23357,16 +23080,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a Swift Virtual Network connection. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Gets a Swift Virtual Network connection. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -23389,7 +23121,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -23414,6 +23146,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -23431,14 +23171,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSwiftVirtualNetworkConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreads", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -23503,7 +23247,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 @@ -23533,7 +23277,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")) @@ -23546,7 +23290,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) { @@ -23566,17 +23310,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. + /// Shows whether an app can be cloned to another resource group or + /// subscription. /// /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. + /// Description for Shows whether an app can be cloned to another resource + /// group or subscription. /// /// /// Name of the resource group to which the resource belongs. @@ -23584,9 +23323,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Properties of the Virtual Network connection. See example. - /// /// /// Headers that will be added to request. /// @@ -23608,7 +23344,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> IsCloneableWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -23633,10 +23369,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -23654,13 +23386,12 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateSwiftVirtualNetworkConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "IsCloneable", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable").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)); @@ -23676,7 +23407,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) @@ -23707,12 +23438,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -23763,7 +23488,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")) @@ -23776,7 +23501,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) { @@ -23796,12 +23521,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). + /// Gets existing backups of an app. /// /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). + /// Description for Gets existing backups of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -23818,6 +23541,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 /// @@ -23827,7 +23553,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSwiftVirtualNetworkWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteBackupsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -23870,11 +23596,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetwork", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackups", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups").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)); @@ -23890,7 +23616,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) @@ -23941,7 +23667,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 @@ -23971,13 +23697,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); @@ -23986,17 +23730,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. + /// This is to allow calling via powershell and ARM template. /// /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. + /// Description for This is to allow calling via powershell and ARM template. /// /// /// Name of the resource group to which the resource belongs. @@ -24004,9 +23741,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Properties of the Virtual Network connection. See example. - /// /// /// Headers that will be added to request. /// @@ -24028,7 +23762,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListSyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -24053,10 +23787,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -24074,13 +23804,12 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSwiftVirtualNetworkConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSyncFunctionTriggers", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus").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)); @@ -24096,7 +23825,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -24127,12 +23856,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -24183,7 +23906,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")) @@ -24196,7 +23919,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) { @@ -24216,21 +23939,78 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). + /// Restores a web app. /// /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). + /// Description for Restores a web app. /// + /// + /// Azure subscription. + /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// - /// - /// The type of view. This can either be "summary" or "detailed". + /// + /// Migration migrationOptions. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> MigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginMigrateStorageWithHttpMessagesAsync(subscriptionName, resourceGroupName, name, migrationOptions, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Migrates a local (in-app) MySql database to a remote MySql database. + /// + /// + /// Description for Migrates a local (in-app) MySql database to a remote MySql + /// database. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// MySql migration options. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> MigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginMigrateMySqlWithHttpMessagesAsync(resourceGroupName, name, migrationRequestEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the status of MySql in app migration, if one is active, and whether + /// or not MySql in app is enabled + /// + /// + /// Description for Returns the status of MySql in app migration, if one is + /// active, and whether or not MySql in app is enabled + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. /// /// /// Headers that will be added to request. @@ -24253,7 +24033,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListNetworkFeaturesWithHttpMessagesAsync(string resourceGroupName, string name, string view, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMigrateMySqlStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -24278,10 +24058,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (view == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "view"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -24299,16 +24075,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("view", view); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeatures", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMigrateMySqlStatus", 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}/networkFeatures/{view}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -24373,7 +24147,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 @@ -24403,7 +24177,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")) @@ -24416,7 +24190,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) { @@ -24436,12 +24210,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Gets a Swift Virtual Network connection. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Gets a Swift Virtual Network connection. /// /// /// Name of the resource group to which the resource belongs. @@ -24449,9 +24221,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// GUID of the operation. - /// /// /// Headers that will be added to request. /// @@ -24473,7 +24242,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -24498,10 +24267,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -24519,16 +24284,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSwiftVirtualNetworkConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -24593,7 +24356,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -24623,7 +24386,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")) @@ -24636,25 +24399,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -24674,26 +24419,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site (To be deprecated). + /// Integrates this Web App with a Virtual Network. This requires that 1) + /// "swiftSupported" is true when doing a GET against this resource, and 2) + /// that the target Subnet has already been delegated, and is not + /// in use by another App Service Plan other than the one this App is in. /// /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). + /// Description for Integrates this Web App with a Virtual Network. This + /// requires that 1) "swiftSupported" is true when doing a GET against this + /// resource, and 2) that the target Subnet has already been delegated, and is + /// not + /// in use by another App Service Plan other than the one this App is in. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). + /// Name of the app. /// - /// - /// The Blob URL to store capture file. + /// + /// Properties of the Virtual Network connection. See example. /// /// /// Headers that will be added to request. @@ -24716,7 +24461,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> StartWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -24741,6 +24486,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -24758,31 +24507,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTrace", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -24794,7 +24529,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) @@ -24825,6 +24560,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -24875,7 +24616,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")) @@ -24888,7 +24629,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) { @@ -24908,50 +24649,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stop ongoing capturing network packets for the site. + /// Deletes a Swift Virtual Network connection from an app (or deployment + /// slot). /// /// - /// Description for Stop ongoing capturing network packets for the site. + /// Description for Deletes a Swift Virtual Network connection from an app (or + /// deployment slot). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -24971,7 +24680,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSwiftVirtualNetworkWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -25014,11 +24723,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTrace", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetwork", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -25034,7 +24743,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) @@ -25085,7 +24794,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 @@ -25130,12 +24839,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Gets all network features used by the app (or deployment slot, if + /// specified). /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Gets all network features used by the app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -25143,8 +24852,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// GUID of the operation. + /// + /// The type of view. Only "summary" is supported at this time. /// /// /// Headers that will be added to request. @@ -25167,7 +24876,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTracesWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListNetworkFeaturesWithHttpMessagesAsync(string resourceGroupName, string name, string view, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -25192,9 +24901,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) + if (view == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "view"); } if (Client.SubscriptionId == null) { @@ -25213,16 +24922,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("view", view); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraces", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeatures", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -25287,7 +24996,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 @@ -25317,7 +25026,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")) @@ -25330,7 +25039,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) { @@ -25387,7 +25096,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTraceOperationV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -25435,11 +25144,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("operationId", operationId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperation", 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}/networkTraces/current/operationresults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); @@ -25588,238 +25297,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the 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>> GetNetworkTracesV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, 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 (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - 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("operationId", operationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesV2", 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}/networkTraces/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{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; - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). + /// Start capturing network packets for the site (To be deprecated). /// /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). + /// Description for Start capturing network packets for the site (To be + /// deprecated). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -25830,6 +25327,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 /// @@ -25839,7 +25339,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task GenerateNewSitePublishingPasswordWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> StartWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -25881,16 +25381,31 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPassword", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTrace", 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}/newpassword").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -25953,7 +25468,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 @@ -25983,13 +25498,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); @@ -25998,22 +25531,50 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets perfmon counters for web app. + /// Start capturing network packets for the site. /// /// - /// Description for Gets perfmon counters for web app. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// The name of the web app. /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> StartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stop ongoing capturing network packets for the site. + /// + /// + /// Description for Stop ongoing capturing network packets for the site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. /// /// /// Headers that will be added to request. @@ -26024,9 +25585,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 /// @@ -26036,7 +25594,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPerfMonCountersWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -26078,21 +25636,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCounters", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTrace", 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}/perfcounters").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -26104,7 +25657,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) @@ -26155,7 +25708,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 @@ -26185,31 +25738,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); @@ -26218,16 +25753,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets web app's event logs. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Gets web app's event logs. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. + /// + /// + /// GUID of the operation. /// /// /// Headers that will be added to request. @@ -26250,7 +25790,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSitePhpErrorLogFlagWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTracesWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -26275,6 +25815,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -26292,14 +25836,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlag", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraces", 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}/phplogging").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -26394,7 +25940,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")) @@ -26407,7 +25953,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) { @@ -26427,10 +25973,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the premier add-ons of an app. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Gets the premier add-ons of an app. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -26438,6 +25986,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// GUID of the operation. + /// /// /// Headers that will be added to request. /// @@ -26459,7 +26010,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListPremierAddOnsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTraceOperationV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -26484,6 +26035,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -26501,14 +26056,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOns", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationV2", 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}/premieraddons").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -26573,7 +26130,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -26603,7 +26160,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")) @@ -26616,7 +26173,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -26636,10 +26211,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named add-on of an app. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Gets a named add-on of an app. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -26647,8 +26224,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Add-on name. + /// + /// GUID of the operation. /// /// /// Headers that will be added to request. @@ -26671,7 +26248,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTracesV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -26696,9 +26273,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } if (Client.SubscriptionId == null) { @@ -26717,16 +26294,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOn", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesV2", 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}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -26821,7 +26398,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")) @@ -26834,7 +26411,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) { @@ -26854,10 +26431,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates a named add-on of an app. + /// Generates a new publishing password for an app (or deployment slot, if + /// specified). /// /// - /// Description for Updates a named add-on of an app. + /// Description for Generates a new publishing password for an app (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -26865,12 +26444,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// /// /// Headers that will be added to request. /// @@ -26880,9 +26453,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 /// @@ -26892,7 +26462,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> AddPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task GenerateNewSitePublishingPasswordWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -26917,18 +26487,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (premierAddOn != null) - { - premierAddOn.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -26946,17 +26504,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOn", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPassword", 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}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -26970,7 +26525,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) @@ -27001,12 +26556,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -27027,7 +26576,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 @@ -27057,31 +26606,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); @@ -27090,19 +26621,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a premier add-on from an app. + /// Gets perfmon counters for web app. /// /// - /// Description for Delete a premier add-on from an app. + /// Description for Gets perfmon counters for web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// - /// - /// Add-on name. + /// + /// Return only usages/metrics specified in the filter. Filter conforms to + /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and + /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq + /// duration'[Hour|Minute|Day]'. /// /// /// Headers that will be added to request. @@ -27113,6 +26647,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 /// @@ -27122,7 +26659,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeletePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPerfMonCountersWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -27147,10 +26684,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -27168,22 +26701,25 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOn", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCounters", 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}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -27191,7 +26727,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) @@ -27272,13 +26808,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); @@ -27287,22 +26841,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates a named add-on of an app. + /// Gets web app's event logs. /// /// - /// Description for Updates a named add-on of an app. + /// Description for Gets web app's event logs. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -27325,7 +26873,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdatePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSitePhpErrorLogFlagWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -27350,14 +26898,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -27375,17 +26915,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOn", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlag", 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}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -27399,7 +26936,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) @@ -27430,12 +26967,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -27486,7 +27017,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")) @@ -27499,7 +27030,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) { @@ -27519,18 +27050,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Gets the premier add-ons of an app. /// /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Gets the premier add-ons of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -27553,7 +27082,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateAccessWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListPremierAddOnsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -27596,11 +27125,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccess", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOns", 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}/privateAccess/virtualNetworks").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons").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)); @@ -27697,7 +27226,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")) @@ -27710,7 +27239,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) { @@ -27730,21 +27259,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Gets a named add-on of an app. /// /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Gets a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. /// - /// - /// The information for the private access + /// + /// Add-on name. /// /// /// Headers that will be added to request. @@ -27767,7 +27294,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PutPrivateAccessVnetWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -27792,9 +27319,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (access == null) + if (premierAddOnName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "access"); + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } if (Client.SubscriptionId == null) { @@ -27813,15 +27340,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("access", access); + tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnet", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOn", 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}/privateAccess/virtualNetworks").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -27835,7 +27363,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) @@ -27866,12 +27394,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(access != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -27922,7 +27444,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")) @@ -27935,7 +27457,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) { @@ -27955,18 +27477,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Updates a named add-on of an app. /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Updates a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. + /// + /// + /// Add-on name. + /// + /// + /// A JSON representation of the edited premier add-on. /// /// /// Headers that will be added to request. @@ -27989,7 +27515,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> AddPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -28014,6 +27540,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (premierAddOnName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); + } + if (premierAddOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); + } + if (premierAddOn != null) + { + premierAddOn.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -28031,14 +27569,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcesses", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOn", 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}/processes").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -28052,7 +27593,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) @@ -28083,6 +27624,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(premierAddOn != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -28103,7 +27650,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 @@ -28133,7 +27680,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")) @@ -28146,7 +27693,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) { @@ -28166,21 +27713,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Delete a premier add-on from an app. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Delete a premier add-on from an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// PID. + /// + /// Add-on name. /// /// /// Headers that will be added to request. @@ -28191,9 +27736,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 /// @@ -28203,7 +27745,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeletePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -28228,9 +27770,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (premierAddOnName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } if (Client.SubscriptionId == null) { @@ -28249,16 +27791,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcess", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOn", 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}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -28272,7 +27814,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) @@ -28323,7 +27865,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 @@ -28353,31 +27895,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); @@ -28386,21 +27910,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. + /// Updates a named add-on of an app. /// /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. + /// Description for Updates a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// PID. + /// + /// Add-on name. + /// + /// + /// A JSON representation of the edited premier add-on. /// /// /// Headers that will be added to request. @@ -28411,6 +27936,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 /// @@ -28420,7 +27948,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdatePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -28445,9 +27973,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (premierAddOnName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); + } + if (premierAddOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); } if (Client.SubscriptionId == null) { @@ -28466,16 +27998,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteProcess", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOn", 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}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -28489,7 +28022,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("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -28520,6 +28053,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(premierAddOn != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -28540,7 +28079,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -28570,13 +28109,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); @@ -28585,21 +28142,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. + /// Gets data around private site access enablement and authorized Virtual + /// Networks that can access the site. /// /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets data around private site access enablement and + /// authorized Virtual Networks that can access the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// The name of the web app. /// /// /// Headers that will be added to request. @@ -28622,7 +28176,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateAccessWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -28647,10 +28201,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -28668,16 +28218,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessDump", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccess", 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}/processes/{processId}/dump").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -28734,7 +28282,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -28742,7 +28290,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 @@ -28772,7 +28320,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")) @@ -28782,7 +28330,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -28792,21 +28353,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Sets data around private site access enablement and authorized Virtual + /// Networks that can access the site. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Sets data around private site access enablement and + /// authorized Virtual Networks that can access the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// The name of the web app. /// - /// - /// PID. + /// + /// The information for the private access /// /// /// Headers that will be added to request. @@ -28829,7 +28390,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PutPrivateAccessVnetWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -28854,9 +28415,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (access == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "access"); } if (Client.SubscriptionId == null) { @@ -28875,16 +28436,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("access", access); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModules", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnet", 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}/processes/{processId}/modules").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -28898,7 +28458,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) @@ -28929,6 +28489,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(access != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -28949,7 +28515,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 @@ -28979,7 +28545,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")) @@ -28992,7 +28558,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) { @@ -29012,24 +28578,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. + /// Name of the site. /// /// /// Headers that will be added to request. @@ -29052,7 +28611,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -29077,14 +28636,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -29102,18 +28653,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessModule", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionList", 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}/processes/{processId}/modules/{baseAddress}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -29178,7 +28725,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 @@ -29208,7 +28755,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")) @@ -29221,7 +28768,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) { @@ -29241,21 +28788,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Gets a private endpoint connection /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// - /// - /// PID. + /// + /// Name of the private endpoint connection. /// /// /// Headers that will be added to request. @@ -29278,7 +28823,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -29303,9 +28848,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } if (Client.SubscriptionId == null) { @@ -29324,16 +28869,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreads", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", 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}/processes/{processId}/threads").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -29398,7 +28943,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 @@ -29428,7 +28973,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")) @@ -29441,7 +28986,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) { @@ -29461,16 +29006,72 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get public certificates for an app or a deployment slot. + /// Approves or rejects a private endpoint connection /// /// - /// Description for Get public certificates for an app or a deployment slot. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. /// /// /// Headers that will be added to request. @@ -29493,7 +29094,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPublicCertificatesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -29536,11 +29137,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificates", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResources", 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}/publicCertificates").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources").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)); @@ -29637,7 +29238,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")) @@ -29650,7 +29251,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) { @@ -29670,21 +29271,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Public certificate name. + /// Site name. /// /// /// Headers that will be added to request. @@ -29707,7 +29305,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -29732,10 +29330,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -29753,16 +29347,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcesses", 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}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -29827,7 +29419,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 @@ -29857,7 +29449,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")) @@ -29870,7 +29462,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) { @@ -29890,23 +29482,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a hostname binding for an app. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Creates a hostname binding for an app. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Public certificate name. + /// Site name. /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. + /// + /// PID. /// /// /// Headers that will be added to request. @@ -29929,7 +29519,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdatePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -29954,13 +29544,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (publicCertificate == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (Client.SubscriptionId == null) { @@ -29979,17 +29565,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("publicCertificate", publicCertificate); + tracingParameters.Add("processId", processId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcess", 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}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -30003,7 +29588,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) @@ -30034,12 +29619,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(publicCertificate != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -30060,7 +29639,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 @@ -30090,7 +29669,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")) @@ -30103,7 +29682,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) { @@ -30123,19 +29702,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a hostname binding for an app. + /// Terminate a process by its ID for a web site, or a deployment slot, or + /// specific scaled-out instance in a web site. /// /// - /// Description for Deletes a hostname binding for an app. + /// Description for Terminate a process by its ID for a web site, or a + /// deployment slot, or specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Public certificate name. + /// + /// PID. /// /// /// Headers that will be added to request. @@ -30155,7 +29736,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeletePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -30180,9 +29761,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publicCertificateName == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (Client.SubscriptionId == null) { @@ -30201,16 +29782,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); + tracingParameters.Add("processId", processId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteProcess", 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}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -30275,7 +29856,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -30320,21 +29901,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the publishing profile for an app (or deployment slot, if specified). + /// Get a memory dump of a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). + /// Description for Get a memory dump of a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. + /// + /// PID. /// /// /// Headers that will be added to request. @@ -30357,7 +29938,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListPublishingProfileXmlWithSecretsWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -30382,9 +29963,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publishingProfileOptions == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (Client.SubscriptionId == null) { @@ -30403,15 +29984,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); + tracingParameters.Add("processId", processId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecrets", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessDump", 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}/publishxml").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -30425,7 +30007,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) @@ -30456,12 +30038,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(publishingProfileOptions != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -30482,7 +30058,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 @@ -30532,18 +30108,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. /// /// /// Headers that will be added to request. @@ -30554,6 +30133,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 /// @@ -30563,7 +30145,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ResetProductionSlotConfigWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -30588,6 +30170,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -30605,14 +30191,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetProductionSlotConfig", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessModules", 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}/resetSlotConfig").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -30626,7 +30214,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) @@ -30677,7 +30265,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 @@ -30707,13 +30295,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); @@ -30722,24 +30328,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restarts an app (or deployment slot, if specified). + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Restarts an app (or deployment slot, if specified). + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. + /// + /// PID. /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). + /// + /// Module base address. /// /// /// Headers that will be added to request. @@ -30750,6 +30356,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 /// @@ -30759,7 +30368,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RestartWithHttpMessagesAsync(string resourceGroupName, string name, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -30784,6 +30393,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (baseAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -30801,26 +30418,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("softRestart", softRestart); - tracingParameters.Add("synchronous", synchronous); + tracingParameters.Add("processId", processId); + tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Restart", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessModule", 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}/restart").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (softRestart != null) - { - _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); - } - if (synchronous != null) - { - _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, Client.SerializationSettings).Trim('"')))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -30832,7 +30443,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) @@ -30883,7 +30494,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 @@ -30913,13 +30524,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); @@ -30928,96 +30557,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromBackupBlobWithHttpMessagesAsync(resourceGroupName, name, request, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromDeletedAppWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreSnapshotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -31025,6 +30570,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// + /// + /// PID. + /// /// /// Headers that will be added to request. /// @@ -31046,7 +30594,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteExtensionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -31071,6 +30619,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -31088,14 +30640,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensions", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreads", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -31190,7 +30744,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")) @@ -31203,7 +30757,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) { @@ -31223,21 +30777,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. + /// Get public certificates for an app or a deployment slot. /// /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. + /// Description for Get public certificates for an app or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Site extension name. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -31260,7 +30809,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPublicCertificatesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -31285,10 +30834,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -31306,16 +30851,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtension", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificates", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -31380,7 +30923,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 @@ -31410,7 +30953,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")) @@ -31423,7 +30966,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) { @@ -31443,48 +30986,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> InstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginInstallSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. + /// Get the named public certificate for an app (or deployment slot, if + /// specified). /// /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. + /// Description for Get the named public certificate for an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Site extension name. + /// + /// Public certificate name. /// /// /// Headers that will be added to request. @@ -31495,6 +31011,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 /// @@ -31504,7 +31023,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -31529,9 +31048,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) + if (publicCertificateName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); } if (Client.SubscriptionId == null) { @@ -31550,16 +31069,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); + tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtension", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -31573,7 +31092,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) @@ -31624,7 +31143,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -31654,13 +31173,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); @@ -31669,11 +31206,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Copies a deployment slot to another deployment slot of an app. + /// Creates a hostname binding for an app. /// /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. + /// Description for Creates a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. @@ -31681,34 +31217,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task CopyProductionSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginCopyProductionSlotWithHttpMessagesAsync(resourceGroupName, name, copySlotEntity, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// Public certificate name. /// - /// - /// Name of the app. + /// + /// Public certificate details. This is the JSON representation of a + /// PublicCertificate object. /// /// /// Headers that will be added to request. @@ -31731,7 +31245,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdatePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -31756,6 +31270,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (publicCertificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + } + if (publicCertificate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -31773,14 +31295,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("publicCertificateName", publicCertificateName); + tracingParameters.Add("publicCertificate", publicCertificate); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlots", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -31794,7 +31319,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) @@ -31825,6 +31350,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(publicCertificate != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -31875,7 +31406,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")) @@ -31888,7 +31419,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) { @@ -31908,10 +31439,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the details of a web, mobile, or API app. + /// Deletes a hostname binding for an app. /// /// - /// Description for Gets the details of a web, mobile, or API app. + /// Description for Deletes a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. @@ -31919,9 +31450,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the deployment slot. By default, this API returns the production - /// slot. + /// + /// Public certificate name. /// /// /// Headers that will be added to request. @@ -31932,9 +31462,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 /// @@ -31944,7 +31471,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeletePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -31969,9 +31496,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (publicCertificateName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); } if (Client.SubscriptionId == null) { @@ -31990,16 +31517,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); + tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -32013,7 +31540,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) @@ -32064,7 +31591,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 @@ -32094,31 +31621,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); @@ -32127,64 +31636,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSlotWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. + /// Gets the publishing profile for an app (or deployment slot, if specified). /// /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. + /// Description for Gets the publishing profile for an app (or deployment slot, + /// if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app to delete. - /// - /// - /// Name of the deployment slot to delete. By default, the API deletes the - /// production slot. - /// - /// - /// If true, web app metrics are also deleted. + /// Name of the app. /// - /// - /// Specify true if the App Service plan will be empty after app deletion and - /// you want to delete the empty App Service plan. By default, the empty App - /// Service plan is not deleted. + /// + /// Specifies publishingProfileOptions for publishing profile. For example, use + /// {"format": "FileZilla3"} to get a FileZilla publishing profile. /// /// /// Headers that will be added to request. @@ -32195,6 +31661,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 /// @@ -32204,7 +31673,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListPublishingProfileXmlWithSecretsWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -32229,9 +31698,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (publishingProfileOptions == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); } if (Client.SubscriptionId == null) { @@ -32250,28 +31719,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("deleteMetrics", deleteMetrics); - tracingParameters.Add("deleteEmptyServerFarm", deleteEmptyServerFarm); + tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecrets", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (deleteMetrics != null) - { - _queryParameters.Add(string.Format("deleteMetrics={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteMetrics, Client.SerializationSettings).Trim('"')))); - } - if (deleteEmptyServerFarm != null) - { - _queryParameters.Add(string.Format("deleteEmptyServerFarm={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteEmptyServerFarm, Client.SerializationSettings).Trim('"')))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -32283,7 +31741,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) @@ -32314,6 +31772,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(publishingProfileOptions != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -32326,7 +31790,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -32334,7 +31798,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -32364,13 +31828,18 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -32379,26 +31848,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. + /// Resets the configuration settings of the current slot if they were + /// previously modified by calling the API with POST. /// /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. + /// Description for Resets the configuration settings of the current slot if + /// they were previously modified by calling the API with POST. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -32409,9 +31870,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 /// @@ -32421,7 +31879,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, SitePatchResource siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ResetProductionSlotConfigWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -32446,14 +31904,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -32471,17 +31921,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ResetProductionSlotConfig", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -32495,7 +31942,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -32526,12 +31973,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -32552,7 +31993,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -32582,49 +32023,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -32633,23 +32038,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Analyze a custom hostname. + /// Restarts an app (or deployment slot, if specified). /// /// - /// Description for Analyze a custom hostname. + /// Description for Restarts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// + /// Specify true to apply the configuration settings and restarts the app only + /// if necessary. By default, the API always restarts and reprovisions the app. /// - /// - /// Custom hostname. + /// + /// Specify true to block until the app is restarted. By default, it is set to + /// false, and the API responds immediately (asynchronous). /// /// /// Headers that will be added to request. @@ -32660,9 +32066,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 /// @@ -32672,7 +32075,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> AnalyzeCustomHostnameSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RestartWithHttpMessagesAsync(string resourceGroupName, string name, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -32697,10 +32100,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -32718,22 +32117,25 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("hostName", hostName); + tracingParameters.Add("softRestart", softRestart); + tracingParameters.Add("synchronous", synchronous); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AnalyzeCustomHostnameSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Restart", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (hostName != null) + if (softRestart != null) { - _queryParameters.Add(string.Format("hostName={0}", System.Uri.EscapeDataString(hostName))); + _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); + } + if (synchronous != null) + { + _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, Client.SerializationSettings).Trim('"')))); } if (Client.ApiVersion != null) { @@ -32746,7 +32148,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) @@ -32827,31 +32229,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); @@ -32860,12 +32244,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Applies the configuration settings from the target slot onto the current - /// slot. + /// Restores an app from a backup blob in Azure Storage. /// /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. + /// Description for Restores an app from a backup blob in Azure Storage. /// /// /// Name of the resource group to which the resource belongs. @@ -32873,12 +32255,91 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// Information on restore request . /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreFromBackupBlobWithHttpMessagesAsync(resourceGroupName, name, request, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a deleted web app to this web app. + /// + /// + /// Description for Restores a deleted web app to this web app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Deleted web app restore information. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreFromDeletedAppWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a web app from a snapshot. + /// + /// + /// Description for Restores a web app from a snapshot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreSnapshotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get list of siteextensions for a web site, or a deployment slot. + /// + /// + /// Description for Get list of siteextensions for a web site, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. /// /// /// Headers that will be added to request. @@ -32889,6 +32350,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 /// @@ -32898,7 +32362,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ApplySlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteExtensionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -32923,18 +32387,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -32952,17 +32404,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ApplySlotConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensions", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -32976,7 +32425,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) @@ -33007,12 +32456,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -33033,7 +32476,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 @@ -33063,13 +32506,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); @@ -33078,24 +32539,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a backup of an app. + /// Get site extension information by its ID for a web site, or a deployment + /// slot. /// /// - /// Description for Creates a backup of an app. + /// Description for Get site extension information by its ID for a web site, or + /// a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. + /// Site name. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a backup for the production slot. + /// + /// Site extension name. /// /// /// Headers that will be added to request. @@ -33118,7 +32576,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -33143,17 +32601,9 @@ 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 (slot == null) + if (siteExtensionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (Client.SubscriptionId == null) { @@ -33172,17 +32622,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BackupSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtension", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -33196,7 +32645,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) @@ -33227,12 +32676,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) { @@ -33253,7 +32696,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 @@ -33283,7 +32726,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")) @@ -33296,7 +32739,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) { @@ -33316,20 +32759,48 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Install site extension on a web site, or a deployment slot. /// /// - /// Description for Gets existing backups of an app. + /// Description for Install site extension on a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. + /// + /// Site extension name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> InstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginInstallSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Remove a site extension from a web site, or a deployment slot. + /// + /// + /// Description for Remove a site extension from a web site, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Site extension name. /// /// /// Headers that will be added to request. @@ -33340,9 +32811,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 /// @@ -33352,7 +32820,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -33377,9 +32845,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (siteExtensionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (Client.SubscriptionId == null) { @@ -33398,16 +32866,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtension", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -33421,7 +32889,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) @@ -33472,7 +32940,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -33502,31 +32970,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); @@ -33535,10 +32985,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a backup of an app by its ID. + /// Gets an app's deployment slots. /// /// - /// Description for Gets a backup of an app by its ID. + /// Description for Gets an app's deployment slots. /// /// /// Name of the resource group to which the resource belongs. @@ -33546,13 +32996,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// backup of the production slot. - /// /// /// Headers that will be added to request. /// @@ -33574,7 +33017,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetBackupStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -33599,14 +33042,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -33624,18 +33059,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupStatusSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlots", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -33730,7 +33161,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")) @@ -33743,7 +33174,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) { @@ -33763,10 +33194,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a backup of an app by its ID. + /// Gets the details of a web, mobile, or API app. /// /// - /// Description for Deletes a backup of an app by its ID. + /// Description for Gets the details of a web, mobile, or API app. /// /// /// Name of the resource group to which the resource belongs. @@ -33774,12 +33205,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// ID of the backup. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a backup of the production slot. + /// Name of the deployment slot. By default, this API returns the production + /// slot. /// /// /// Headers that will be added to request. @@ -33790,6 +33218,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 /// @@ -33799,7 +33230,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -33824,10 +33255,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -33849,17 +33276,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -33874,7 +33299,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) @@ -33955,13 +33380,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); @@ -33970,32 +33413,63 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. + /// Creates a new web, mobile, or API app in an existing resource group, or + /// updates an existing app. /// /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. + /// Description for Creates a new web, mobile, or API app in an existing + /// resource group, or updates an existing app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Unique name of the app to create or update. To create or update a + /// deployment slot, use the {slot} parameter. /// - /// - /// ID of backup. + /// + /// A JSON representation of the app properties. See example. /// - /// - /// Information on backup request. + /// + /// Name of the deployment slot to create or update. By default, this API + /// attempts to create or modify the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateSlotWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a web, mobile, or API app, or one of the deployment slots. + /// + /// + /// Description for Deletes a web, mobile, or API app, or one of the deployment + /// slots. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app to delete. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot to delete. By default, the API deletes the + /// production slot. + /// + /// + /// If true, web app metrics are also deleted. + /// + /// + /// Specify false if you want to keep empty App Service plan. By default, empty + /// App Service plan is deleted. /// /// /// Headers that will be added to request. @@ -34006,9 +33480,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 /// @@ -34018,7 +33489,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListBackupStatusSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -34043,18 +33514,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -34076,21 +33535,28 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); + tracingParameters.Add("deleteMetrics", deleteMetrics); + tracingParameters.Add("deleteEmptyServerFarm", deleteEmptyServerFarm); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupStatusSecretsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (deleteMetrics != null) + { + _queryParameters.Add(string.Format("deleteMetrics={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteMetrics, Client.SerializationSettings).Trim('"')))); + } + if (deleteEmptyServerFarm != null) + { + _queryParameters.Add(string.Format("deleteEmptyServerFarm={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteEmptyServerFarm, Client.SerializationSettings).Trim('"')))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -34102,7 +33568,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) @@ -34133,12 +33599,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) { @@ -34159,7 +33619,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 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -34189,31 +33649,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); @@ -34222,57 +33664,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). + /// Creates a new web, mobile, or API app in an existing resource group, or + /// updates an existing app. /// /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). + /// Description for Creates a new web, mobile, or API app in an existing + /// resource group, or updates an existing app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// Name of the resource group to which the resource belongs. + /// Unique name of the app to create or update. To create or update a + /// deployment slot, use the {slot} parameter. /// - /// - /// Name of the app. + /// + /// A JSON representation of the app properties. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. + /// Name of the deployment slot to create or update. By default, this API + /// attempts to create or modify the production slot. /// /// /// Headers that will be added to request. @@ -34295,7 +33706,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, SitePatchResource siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -34320,6 +33731,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -34341,13 +33756,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("siteEnvelope", siteEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -34364,7 +33780,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) @@ -34395,6 +33811,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -34415,7 +33837,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -34445,7 +33867,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")) @@ -34458,7 +33880,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -34478,23 +33918,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the application settings of an app. + /// Analyze a custom hostname. /// /// - /// Description for Replaces the application settings of an app. + /// Description for Analyze a custom hostname. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Application settings of the app. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the application settings for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// Custom hostname. /// /// /// Headers that will be added to request. @@ -34517,7 +33957,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> AnalyzeCustomHostnameSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -34542,10 +33982,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -34567,19 +34003,23 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("appSettings", appSettings); tracingParameters.Add("slot", slot); + tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateApplicationSettingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "AnalyzeCustomHostnameSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (hostName != null) + { + _queryParameters.Add(string.Format("hostName={0}", System.Uri.EscapeDataString(hostName))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -34591,7 +34031,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) @@ -34622,12 +34062,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -34678,7 +34112,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")) @@ -34691,7 +34125,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) { @@ -34711,10 +34145,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the application settings of an app. + /// Applies the configuration settings from the target slot onto the current + /// slot. /// /// - /// Description for Gets the application settings of an app. + /// Description for Applies the configuration settings from the target slot + /// onto the current slot. /// /// /// Name of the resource group to which the resource belongs. @@ -34722,9 +34158,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// JSON object that contains the target slot name. See example. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the application settings for the production slot. + /// Name of the source slot. If a slot is not specified, the production slot is + /// used as the source slot. /// /// /// Headers that will be added to request. @@ -34735,9 +34174,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 /// @@ -34747,7 +34183,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ApplySlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -34772,6 +34208,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (slotSwapEntity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -34793,13 +34237,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListApplicationSettingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ApplySlotConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -34847,6 +34292,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -34897,31 +34348,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); @@ -34930,25 +34363,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the Authentication / Authorization settings associated with web - /// app. + /// Creates a backup of an app. /// /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. + /// Description for Creates a backup of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Auth settings associated with web app. + /// + /// Backup configuration. You can use the JSON response from the POST action as + /// input here. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// create a backup for the production slot. /// /// /// Headers that will be added to request. @@ -34971,7 +34403,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -34996,9 +34428,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteAuthSettings == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettings"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (slot == null) { @@ -35021,14 +34457,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteAuthSettings", siteAuthSettings); + tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BackupSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -35045,7 +34481,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) @@ -35076,9 +34512,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteAuthSettings != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettings, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -35132,7 +34568,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")) @@ -35145,7 +34581,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) { @@ -35165,10 +34601,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Authentication/Authorization settings of an app. + /// Gets existing backups of an app. /// /// - /// Description for Gets the Authentication/Authorization settings of an app. + /// Description for Gets existing backups of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -35178,7 +34614,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. + /// backups of the production slot. /// /// /// Headers that will be added to request. @@ -35201,7 +34637,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -35249,11 +34685,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -35270,7 +34706,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) @@ -35351,7 +34787,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")) @@ -35364,7 +34800,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) { @@ -35384,25 +34820,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates site's Authentication / Authorization settings for apps via the V2 - /// format + /// Gets a backup of an app by its ID. /// /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format + /// Description for Gets a backup of an app by its ID. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Auth settings associated with web app. + /// + /// ID of the backup. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API will get a + /// backup of the production slot. /// /// /// Headers that will be added to request. @@ -35425,7 +34859,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetBackupStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -35450,9 +34884,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteAuthSettingsV2 == null) + if (backupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettingsV2"); + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); } if (slot == null) { @@ -35475,16 +34909,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteAuthSettingsV2", siteAuthSettingsV2); + tracingParameters.Add("backupId", backupId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsV2Slot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetBackupStatusSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -35499,7 +34934,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) @@ -35530,12 +34965,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) { @@ -35586,7 +35015,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")) @@ -35599,7 +35028,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) { @@ -35619,12 +35048,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format + /// Deletes a backup of an app by its ID. /// /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format + /// Description for Deletes a backup of an app by its ID. /// /// /// Name of the resource group to which the resource belongs. @@ -35632,9 +35059,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// ID of the backup. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete a backup of the production slot. /// /// /// Headers that will be added to request. @@ -35645,9 +35075,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 /// @@ -35657,7 +35084,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -35682,6 +35109,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (backupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -35703,15 +35134,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("backupId", backupId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2Slot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -35726,7 +35159,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) @@ -35777,7 +35210,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 @@ -35807,31 +35240,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); @@ -35840,23 +35255,32 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the Azure storage account configurations of an app. + /// Gets status of a web app backup that may be in progress, including secrets + /// associated with the backup, such as the Azure Storage SAS URL. Also can be + /// used to update the SAS URL for the backup if a new URL is passed in the + /// request body. /// /// - /// Description for Updates the Azure storage account configurations of an app. + /// Description for Gets status of a web app backup that may be in progress, + /// including secrets associated with the backup, such as the Azure Storage SAS + /// URL. Also can be used to update the SAS URL for the backup if a new URL is + /// passed in the request body. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// - /// - /// Azure storage accounts of the app. + /// + /// ID of backup. + /// + /// + /// Information on backup request. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -35879,7 +35303,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListBackupStatusSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -35904,9 +35328,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (azureStorageAccounts == null) + if (backupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureStorageAccounts"); + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (slot == null) { @@ -35929,16 +35361,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("azureStorageAccounts", azureStorageAccounts); + tracingParameters.Add("backupId", backupId); + tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAzureStorageAccountsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBackupStatusSecretsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -35953,7 +35387,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) @@ -35984,9 +35418,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(azureStorageAccounts != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(azureStorageAccounts, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -36040,7 +35474,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")) @@ -36053,7 +35487,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) { @@ -36073,10 +35507,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Azure storage account configurations of an app. + /// Restores a specific backup to another app (or deployment slot, if + /// specified). /// /// - /// Description for Gets the Azure storage account configurations of an app. + /// Description for Restores a specific backup to another app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -36084,9 +35520,44 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// ID of the backup. + /// + /// + /// Information on restore request . + /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. + /// restore a backup of the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// /// /// /// Headers that will be added to request. @@ -36109,7 +35580,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -36157,11 +35628,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAzureStorageAccountsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetBasicPublishingCredentialsPoliciesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -36178,7 +35649,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) @@ -36259,7 +35730,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")) @@ -36272,7 +35743,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) { @@ -36292,10 +35763,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the backup configuration of an app. + /// Returns whether FTP is allowed on the site or not. /// /// - /// Description for Updates the backup configuration of an app. + /// Description for Returns whether FTP is allowed on the site or not. /// /// /// Name of the resource group to which the resource belongs. @@ -36303,12 +35774,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Edited backup configuration. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the backup configuration for the production slot. /// /// /// Headers that will be added to request. @@ -36331,7 +35797,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -36356,14 +35822,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 (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -36385,14 +35843,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateBackupConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetFtpAllowedSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -36409,7 +35866,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) @@ -36440,12 +35897,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) { @@ -36496,7 +35947,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")) @@ -36509,7 +35960,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) { @@ -36529,10 +35980,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes the backup configuration of an app. + /// Updates whether FTP is allowed on the site or not. /// /// - /// Description for Deletes the backup configuration of an app. + /// Description for Updates whether FTP is allowed on the site or not. /// /// /// Name of the resource group to which the resource belongs. @@ -36540,9 +35991,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the backup configuration for the production slot. /// /// /// Headers that will be added to request. @@ -36553,6 +36004,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 /// @@ -36562,7 +36016,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -36587,6 +36041,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (csmPublishingAccessPoliciesEntity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "csmPublishingAccessPoliciesEntity"); + } + if (csmPublishingAccessPoliciesEntity != null) + { + csmPublishingAccessPoliciesEntity.Validate(); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -36608,13 +36070,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("csmPublishingAccessPoliciesEntity", csmPublishingAccessPoliciesEntity); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateFtpAllowedSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -36631,7 +36094,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) @@ -36662,6 +36125,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(csmPublishingAccessPoliciesEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(csmPublishingAccessPoliciesEntity, 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) { @@ -36712,13 +36181,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); @@ -36727,10 +36214,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the backup configuration of an app. + /// Returns whether Scm basic auth is allowed on the site or not. /// /// - /// Description for Gets the backup configuration of an app. + /// Description for Returns whether Scm basic auth is allowed on the site or + /// not. /// /// /// Name of the resource group to which the resource belongs. @@ -36739,8 +36227,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the backup configuration for the production slot. /// /// /// Headers that will be added to request. @@ -36763,7 +36249,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -36811,11 +36297,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetScmAllowedSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -36832,7 +36318,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) @@ -36913,7 +36399,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")) @@ -36926,7 +36412,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) { @@ -36946,10 +36432,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the connection strings of an app. + /// Updates whether user publishing credentials are allowed on the site or not. /// /// - /// Description for Replaces the connection strings of an app. + /// Description for Updates whether user publishing credentials are allowed on + /// the site or not. /// /// /// Name of the resource group to which the resource belongs. @@ -36957,12 +36444,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Connection strings of the app or deployment slot. See example. + /// /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the connection settings for the production slot. /// /// /// Headers that will be added to request. @@ -36985,7 +36469,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -37010,9 +36494,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (connectionStrings == null) + if (csmPublishingAccessPoliciesEntity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStrings"); + throw new ValidationException(ValidationRules.CannotBeNull, "csmPublishingAccessPoliciesEntity"); + } + if (csmPublishingAccessPoliciesEntity != null) + { + csmPublishingAccessPoliciesEntity.Validate(); } if (slot == null) { @@ -37035,14 +36523,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("connectionStrings", connectionStrings); + tracingParameters.Add("csmPublishingAccessPoliciesEntity", csmPublishingAccessPoliciesEntity); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConnectionStringsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateScmAllowedSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -37090,9 +36578,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionStrings != null) + if(csmPublishingAccessPoliciesEntity != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionStrings, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(csmPublishingAccessPoliciesEntity, 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"); } @@ -37146,7 +36634,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")) @@ -37159,7 +36647,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) { @@ -37179,10 +36667,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the connection strings of an app. + /// List the configurations of an app /// /// - /// Description for Gets the connection strings of an app. + /// Description for List the configurations of an app /// /// /// Name of the resource group to which the resource belongs. @@ -37191,8 +36679,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the connection settings for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// return configuration for the production slot. /// /// /// Headers that will be added to request. @@ -37215,7 +36703,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -37263,11 +36751,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConnectionStringsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -37284,7 +36772,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) @@ -37365,7 +36853,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")) @@ -37378,7 +36866,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) { @@ -37398,10 +36886,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the logging configuration of an app. + /// Replaces the application settings of an app. /// /// - /// Description for Gets the logging configuration of an app. + /// Description for Replaces the application settings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -37409,9 +36897,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Application settings of the app. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the logging configuration for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the application settings for the production slot. /// /// /// Headers that will be added to request. @@ -37434,7 +36925,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDiagnosticLogsConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -37459,6 +36950,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (appSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -37480,13 +36975,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("appSettings", appSettings); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticLogsConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateApplicationSettingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -37503,7 +36999,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) @@ -37534,6 +37030,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(appSettings != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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) { @@ -37584,7 +37086,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")) @@ -37597,7 +37099,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) { @@ -37617,10 +37119,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the logging configuration of an app. + /// Gets the application settings of an app. /// /// - /// Description for Updates the logging configuration of an app. + /// Description for Gets the application settings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -37628,13 +37130,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the logging configuration for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the application settings for the production slot. /// /// /// Headers that will be added to request. @@ -37657,7 +37155,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateDiagnosticLogsConfigSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -37682,14 +37180,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 (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -37711,14 +37201,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteLogsConfig", siteLogsConfig); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDiagnosticLogsConfigSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListApplicationSettingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -37735,7 +37224,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) @@ -37766,12 +37255,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) { @@ -37822,7 +37305,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")) @@ -37835,7 +37318,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) { @@ -37855,23 +37338,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Replaces the metadata of an app. + /// Updates the Authentication / Authorization settings associated with web + /// app. /// /// - /// Description for Replaces the metadata of an app. + /// Description for Updates the Authentication / Authorization settings + /// associated with web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of web app. /// - /// - /// Edited metadata of the app or deployment slot. See example. + /// + /// Auth settings associated with web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the metadata for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -37894,7 +37379,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -37919,9 +37404,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (metadata == null) + if (siteAuthSettings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettings"); } if (slot == null) { @@ -37944,14 +37429,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("metadata", metadata); + tracingParameters.Add("siteAuthSettings", siteAuthSettings); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadataSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -37999,9 +37484,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(metadata != null) + if(siteAuthSettings != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadata, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettings, 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"); } @@ -38055,7 +37540,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")) @@ -38068,7 +37553,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) { @@ -38088,10 +37573,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the metadata of an app. + /// Gets the Authentication/Authorization settings of an app. /// /// - /// Description for Gets the metadata of an app. + /// Description for Gets the Authentication/Authorization settings of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -38101,7 +37586,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// the metadata for the production slot. + /// the settings for the production slot. /// /// /// Headers that will be added to request. @@ -38124,7 +37609,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -38172,11 +37657,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetadataSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -38274,7 +37759,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")) @@ -38287,7 +37772,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) { @@ -38307,39 +37792,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an 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. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginListPublishingCredentialsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates the Push settings associated with web app. + /// Updates site's Authentication / Authorization settings for apps via the V2 + /// format /// /// - /// Description for Updates the Push settings associated with web app. + /// Description for Updates site's Authentication / Authorization settings for + /// apps via the V2 format /// /// /// Name of the resource group to which the resource belongs. @@ -38347,8 +37805,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of web app. /// - /// - /// Push settings associated with web app. + /// + /// Auth settings associated with web app. /// /// /// Name of web app slot. If not specified then will default to production @@ -38375,7 +37833,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -38400,13 +37858,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (pushSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "pushSettings"); - } - if (pushSettings != null) + if (siteAuthSettingsV2 == null) { - pushSettings.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettingsV2"); } if (slot == null) { @@ -38429,14 +37883,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("pushSettings", pushSettings); + tracingParameters.Add("siteAuthSettingsV2", siteAuthSettingsV2); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSitePushSettingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsV2Slot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -38484,9 +37938,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(pushSettings != null) + if(siteAuthSettingsV2 != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pushSettings, Client.SerializationSettings); + _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"); } @@ -38540,7 +37994,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")) @@ -38553,7 +38007,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) { @@ -38573,20 +38027,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Push settings associated with web app. + /// Gets site's Authentication / Authorization settings for apps via the V2 + /// format /// /// - /// Description for Gets the Push settings associated with web 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. /// /// - /// Name of web app. + /// Name of the app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the settings for the production slot. /// /// /// Headers that will be added to request. @@ -38609,7 +38065,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -38657,11 +38113,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSitePushSettingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2Slot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -38678,7 +38134,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) @@ -38759,7 +38215,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")) @@ -38772,7 +38228,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) { @@ -38792,12 +38248,10 @@ 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 Azure storage account configurations of an app. /// /// - /// 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 Azure storage account configurations of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -38805,9 +38259,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Azure storage accounts of the app. + /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. + /// update the Azure storage account configurations for the production slot. /// /// /// Headers that will be added to request. @@ -38830,7 +38287,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -38855,6 +38312,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (azureStorageAccounts == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "azureStorageAccounts"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -38876,13 +38337,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("azureStorageAccounts", azureStorageAccounts); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAzureStorageAccountsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -38899,7 +38361,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) @@ -38930,6 +38392,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) { @@ -38980,7 +38448,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")) @@ -38993,7 +38461,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) { @@ -39013,10 +38481,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the configuration of an app. + /// Gets the Azure storage account configurations of an app. /// /// - /// Description for Updates the 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. @@ -39024,12 +38492,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteConfig object. See example. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. + /// update the Azure storage account configurations for the production slot. /// /// /// Headers that will be added to request. @@ -39052,7 +38517,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -39077,14 +38542,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 (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -39106,14 +38563,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteConfig", siteConfig); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListAzureStorageAccountsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -39130,7 +38586,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) @@ -39161,12 +38617,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) { @@ -39217,7 +38667,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")) @@ -39230,7 +38680,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) { @@ -39250,10 +38700,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the configuration of an app. + /// Updates the backup configuration of an app. /// /// - /// Description for Updates the configuration of an app. + /// Description for Updates the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -39261,12 +38711,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteConfig object. See example. + /// + /// Edited backup configuration. /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. + /// update the backup configuration for the production slot. /// /// /// Headers that will be added to request. @@ -39289,7 +38739,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -39314,9 +38764,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteConfig == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (slot == null) { @@ -39339,14 +38793,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteConfig", siteConfig); + tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateBackupConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -39363,7 +38817,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) @@ -39394,9 +38848,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteConfig != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -39450,7 +38904,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")) @@ -39463,7 +38917,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) { @@ -39483,12 +38937,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. + /// Deletes the backup 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 Deletes the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -39498,7 +38950,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. + /// delete the backup configuration for the production slot. /// /// /// Headers that will be added to request. @@ -39509,9 +38961,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 /// @@ -39521,7 +38970,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationSnapshotInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -39569,11 +39018,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -39590,7 +39039,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) @@ -39671,31 +39120,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); @@ -39704,11 +39135,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a snapshot of the configuration of an app at a previous point in time. + /// Gets the backup configuration of an app. /// /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. + /// Description for Gets the backup configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -39716,12 +39146,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The ID of the snapshot to read. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the backup configuration for the production slot. /// /// /// Headers that will be added to request. @@ -39744,7 +39171,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -39769,10 +39196,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -39794,17 +39217,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSnapshotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetBackupConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -39819,7 +39240,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) @@ -39900,7 +39321,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")) @@ -39913,7 +39334,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) { @@ -39933,10 +39354,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Reverts the configuration of an app to a previous snapshot. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Reverts the configuration of an app to a previous snapshot. + /// Description for Gets the config reference app settings and status of an app /// /// /// Name of the resource group to which the resource belongs. @@ -39944,12 +39365,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// The ID of the snapshot to read. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. /// /// /// Headers that will be added to request. @@ -39960,6 +39376,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 /// @@ -39969,7 +39388,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RecoverSiteConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetAppSettingsKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -39994,10 +39413,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -40019,17 +39434,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RecoverSiteConfigurationSnapshotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferencesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/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}/slots/{slot}/config/configreferences/appsettings").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -40044,7 +39457,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) @@ -40095,7 +39508,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -40125,13 +39538,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); @@ -40140,20 +39571,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the last lines of docker logs for the given site + /// Gets the config reference and status of an app /// /// - /// Description for Gets the last lines of docker logs for the given site + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. + /// + /// + /// App Setting key name. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. /// /// /// Headers that will be added to request. @@ -40161,7 +39593,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -40176,7 +39608,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWebSiteContainerLogsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetAppSettingKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -40201,6 +39633,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (appSettingKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "appSettingKey"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -40222,15 +39658,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("appSettingKey", appSettingKey); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebSiteContainerLogsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingKeyVaultReferenceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -40245,7 +39683,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) @@ -40288,7 +39726,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -40296,16 +39734,15 @@ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -40315,10 +39752,6 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -40331,7 +39764,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")) @@ -40341,7 +39774,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -40351,20 +39797,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the ZIP archived docker log files for the given site + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets the ZIP archived docker log files for the given site + /// Description for Gets the config reference app settings and status of an app /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. /// /// /// Headers that will be added to request. @@ -40372,7 +39816,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -40387,7 +39831,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContainerLogsZipSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetSiteConnectionStringKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -40435,11 +39879,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContainerLogsZipSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferencesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -40456,7 +39900,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) @@ -40499,7 +39943,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -40507,16 +39951,15 @@ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -40526,10 +39969,6 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -40542,7 +39981,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")) @@ -40552,7 +39991,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -40562,20 +40014,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List continuous web jobs for an app, or a deployment slot. + /// Gets the config reference and status of an app /// /// - /// Description for List continuous web jobs for an app, or a deployment slot. + /// Description for Gets the config reference and status of an app /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. + /// + /// /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -40598,7 +40050,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListContinuousWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteConnectionStringKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -40623,6 +40075,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (connectionStringKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionStringKey"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -40644,15 +40100,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("connectionStringKey", connectionStringKey); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferenceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -40748,7 +40206,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")) @@ -40761,7 +40219,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) { @@ -40781,24 +40239,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a continuous web job by its ID for an app, or a deployment slot. + /// Replaces the connection strings of an app. /// /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. + /// Description for Replaces the connection strings of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// Connection strings of the app or deployment slot. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the connection settings for the production slot. /// /// /// Headers that will be added to request. @@ -40821,7 +40278,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -40846,9 +40303,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (connectionStrings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionStrings"); } if (slot == null) { @@ -40871,17 +40328,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("connectionStrings", connectionStrings); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateConnectionStringsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -40896,7 +40352,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) @@ -40927,6 +40383,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) { @@ -40947,7 +40409,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 @@ -40977,7 +40439,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")) @@ -40990,7 +40452,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) { @@ -41010,24 +40472,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. + /// Gets the connection strings of an app. /// /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. + /// Description for Gets the connection strings of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Name of Web Job. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the connection settings for the production slot. /// /// /// Headers that will be added to request. @@ -41038,6 +40496,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 /// @@ -41047,7 +40508,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -41072,10 +40533,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -41097,17 +40554,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConnectionStringsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -41122,7 +40577,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) @@ -41173,7 +40628,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 @@ -41203,13 +40658,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); @@ -41218,24 +40691,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start a continuous web job for an app, or a deployment slot. + /// Gets the logging configuration of an app. /// /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. + /// Description for Gets the logging configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Name of Web Job. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the logging configuration for the production slot. /// /// /// Headers that will be added to request. @@ -41246,6 +40715,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 /// @@ -41255,7 +40727,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StartContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDiagnosticLogsConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -41280,10 +40752,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -41305,17 +40773,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticLogsConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -41330,7 +40796,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) @@ -41381,7 +40847,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 @@ -41411,13 +40877,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); @@ -41426,23 +40910,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Stop a continuous web job for an app, or a deployment slot. + /// Updates the logging configuration of an app. /// /// - /// Description for Stop a continuous web job for an app, or a deployment slot. + /// Description for Updates the logging configuration of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// A SiteLogsConfig JSON object that contains the logging configuration to + /// change in the "properties" property. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the logging configuration for the production slot. /// /// /// Headers that will be added to request. @@ -41453,6 +40938,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 /// @@ -41462,7 +40950,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateDiagnosticLogsConfigSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -41487,9 +40975,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (siteLogsConfig == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteLogsConfig"); + } + if (siteLogsConfig != null) + { + siteLogsConfig.Validate(); } if (slot == null) { @@ -41512,17 +41004,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("siteLogsConfig", siteLogsConfig); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateDiagnosticLogsConfigSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -41537,7 +41028,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) @@ -41568,6 +41059,12 @@ 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) { @@ -41588,7 +41085,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 @@ -41618,13 +41115,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); @@ -41633,10 +41148,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployments for an app, or a deployment slot. + /// Replaces the metadata of an app. /// /// - /// Description for List deployments for an app, or a deployment slot. + /// Description for Replaces the metadata of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -41644,9 +41159,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Edited metadata of the app or deployment slot. See example. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the metadata for the production slot. /// /// /// Headers that will be added to request. @@ -41669,7 +41187,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDeploymentsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -41694,6 +41212,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (metadata == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -41715,13 +41237,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("metadata", metadata); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadataSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -41738,7 +41261,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) @@ -41769,6 +41292,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) { @@ -41819,7 +41348,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")) @@ -41832,7 +41361,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) { @@ -41852,11 +41381,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a deployment by its ID for an app, or a deployment slot. + /// Gets the metadata of an app. /// /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. + /// Description for Gets the metadata of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -41864,12 +41392,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Deployment ID. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API gets a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the metadata for the production slot. /// /// /// Headers that will be added to request. @@ -41892,7 +41417,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -41917,10 +41442,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -41942,17 +41463,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeploymentSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMetadataSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -41967,7 +41486,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) @@ -42048,7 +41567,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")) @@ -42061,7 +41580,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) { @@ -42081,10 +41600,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create a deployment for an app, or a deployment slot. + /// Gets the Git/FTP publishing credentials of an app. /// /// - /// Description for Create a deployment for an app, or a deployment slot. + /// Description for Gets the Git/FTP publishing credentials of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -42092,15 +41611,41 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// ID of an existing deployment. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API creates a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the publishing credentials for the production slot. /// - /// - /// Deployment details. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginListPublishingCredentialsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, 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. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -42123,7 +41668,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -42148,17 +41693,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) + if (pushSettings == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "pushSettings"); } - if (slot == null) + if (pushSettings != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + pushSettings.Validate(); } - if (deployment == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -42177,18 +41722,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); + tracingParameters.Add("pushSettings", pushSettings); tracingParameters.Add("slot", slot); - tracingParameters.Add("deployment", deployment); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateDeploymentSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSitePushSettingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -42234,9 +41777,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(deployment != null) + if(pushSettings != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployment, Client.SerializationSettings); + _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"); } @@ -42290,7 +41833,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")) @@ -42303,7 +41846,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) { @@ -42323,24 +41866,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a deployment by its ID for an app, or a deployment slot. + /// Gets the Push settings associated with web app. /// /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. + /// Description for Gets the Push settings associated with web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Deployment ID. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -42351,6 +41890,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 /// @@ -42360,7 +41902,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -42385,10 +41927,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -42410,17 +41948,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDeploymentSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSitePushSettingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -42435,7 +41971,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) @@ -42486,7 +42022,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 @@ -42516,13 +42052,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); @@ -42531,12 +42085,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. + /// Gets the configuration of an app, such as platform version and bitness, + /// default documents, virtual applications, Always On, etc. /// /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. + /// 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. @@ -42544,13 +42098,9 @@ 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". - /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// return configuration for the production slot. /// /// /// Headers that will be added to request. @@ -42573,7 +42123,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListDeploymentLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -42598,10 +42148,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -42623,17 +42169,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLogSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -42729,7 +42273,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")) @@ -42742,7 +42286,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) { @@ -42762,14 +42306,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. + /// Updates the configuration of an 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 Updates the configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -42777,13 +42317,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. + /// + /// JSON representation of a SiteConfig object. See example. /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// perform discovery for the production slot. + /// update configuration for the production slot. /// /// /// Headers that will be added to request. @@ -42806,7 +42345,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> DiscoverBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -42831,13 +42370,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (request == null) + if (siteConfig == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); } - if (request != null) + if (siteConfig != null) { - request.Validate(); + siteConfig.Validate(); } if (slot == null) { @@ -42860,14 +42399,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); + tracingParameters.Add("siteConfig", siteConfig); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DiscoverBackupSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -42884,7 +42423,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) @@ -42915,9 +42454,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(request != null) + if(siteConfig != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _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"); } @@ -42971,7 +42510,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")) @@ -42984,7 +42523,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) { @@ -43004,11 +42543,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Lists ownership identifiers for domain associated with web app. + /// Updates the configuration of an app. /// /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. + /// Description for Updates the configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -43016,9 +42554,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// JSON representation of a SiteConfig object. See example. + /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. + /// update configuration for the production slot. /// /// /// Headers that will be added to request. @@ -43041,7 +42582,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDomainOwnershipIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -43066,6 +42607,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (siteConfig == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -43087,13 +42632,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("siteConfig", siteConfig); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -43110,7 +42656,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) @@ -43141,6 +42687,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) { @@ -43191,7 +42743,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")) @@ -43204,7 +42756,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) { @@ -43224,10 +42776,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get domain ownership identifier for web app. + /// Gets a list of web app configuration snapshots identifiers. Each element of + /// the list contains a timestamp and the ID of the snapshot. /// /// - /// Description for Get domain ownership identifier for web 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. /// /// /// Name of the resource group to which the resource belongs. @@ -43235,12 +42789,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. + /// return configuration for the production slot. /// /// /// Headers that will be added to request. @@ -43263,7 +42814,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationSnapshotInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -43288,10 +42839,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -43313,17 +42860,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifierSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -43419,7 +42964,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")) @@ -43432,7 +42977,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) { @@ -43452,12 +42997,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. + /// Gets a snapshot of the configuration of an app at a previous point in time. /// /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. + /// 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. @@ -43465,15 +43009,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. + /// + /// The ID of the snapshot to read. /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. + /// return configuration for the production slot. /// /// /// Headers that will be added to request. @@ -43496,7 +43037,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -43521,13 +43062,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) + if (snapshotId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); + throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); } if (slot == null) { @@ -43550,18 +43087,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("snapshotId", snapshotId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifierSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSnapshotSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}").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("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -43576,7 +43112,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) @@ -43607,12 +43143,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) { @@ -43663,7 +43193,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")) @@ -43676,7 +43206,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) { @@ -43696,10 +43226,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a domain ownership identifier for a web app. + /// Reverts the configuration of an app to a previous snapshot. /// /// - /// Description for Deletes a domain ownership identifier for a web app. + /// Description for Reverts the configuration of an app to a previous snapshot. /// /// /// Name of the resource group to which the resource belongs. @@ -43707,12 +43237,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of domain ownership identifier. + /// + /// The ID of the snapshot to read. /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. + /// return configuration for the production slot. /// /// /// Headers that will be added to request. @@ -43732,7 +43262,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RecoverSiteConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -43757,9 +43287,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (domainOwnershipIdentifierName == null) + if (snapshotId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); } if (slot == null) { @@ -43782,17 +43312,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); + tracingParameters.Add("snapshotId", snapshotId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifierSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RecoverSiteConfigurationSnapshotSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); + _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -43807,7 +43337,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) @@ -43858,7 +43388,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -43903,28 +43433,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. + /// Gets the last lines of docker logs for the given site /// /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. + /// Description for Gets the last lines of docker logs for the given site /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -43932,7 +43454,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -43947,7 +43469,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWebSiteContainerLogsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -43972,14 +43494,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 (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -44001,18 +43515,15 @@ 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("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifierSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebSiteContainerLogsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs").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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -44027,7 +43538,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -44058,12 +43569,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) { @@ -44076,7 +43581,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -44084,15 +43589,16 @@ 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)); + var ex = new CloudException(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); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -44102,6 +43608,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -44114,7 +43624,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")) @@ -44124,20 +43634,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -44147,10 +43644,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the status of the last MSDeploy operation. + /// Gets the ZIP archived docker log files for the given site /// /// - /// Description for Get the status of the last MSDeploy operation. + /// Description for Gets the ZIP archived docker log files for the given site /// /// /// Name of the resource group to which the resource belongs. @@ -44168,7 +43665,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -44183,7 +43680,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMSDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContainerLogsZipSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -44231,11 +43728,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployStatusSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetContainerLogsZipSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -44252,7 +43749,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) @@ -44295,7 +43792,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -44303,15 +43800,16 @@ 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)); + var ex = new CloudException(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); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -44321,6 +43819,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -44333,7 +43835,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")) @@ -44343,20 +43845,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -44366,52 +43855,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy 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. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. + /// List continuous web jobs for an app, or a deployment slot. /// /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. + /// Description for List continuous web jobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Site name. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -44434,7 +43891,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListContinuousWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -44482,11 +43939,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployLogSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -44554,7 +44011,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 @@ -44584,7 +44041,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")) @@ -44597,7 +44054,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) { @@ -44617,10 +44074,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the functions for a web site, or a deployment slot. + /// Gets a continuous web job by its ID for an app, or a deployment slot. /// /// - /// Description for List the functions for a web site, or a deployment slot. + /// Description for Gets a continuous web job by its ID for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -44628,8 +44086,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// + /// + /// Name of Web Job. + /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -44652,7 +44114,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -44677,6 +44139,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -44698,15 +44164,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceFunctionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -44802,7 +44270,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")) @@ -44815,7 +44283,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) { @@ -44835,21 +44303,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Fetch a short lived token that can be exchanged for a master key. + /// Delete a continuous web job by its ID for an app, or a deployment slot. /// /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. + /// 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. /// /// - /// Name of web app. + /// Site name. + /// + /// + /// Name of Web Job. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -44860,9 +44331,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 /// @@ -44872,7 +44340,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetFunctionsAdminTokenSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -44897,6 +44365,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -44918,15 +44390,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunctionsAdminTokenSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -44941,7 +44415,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) @@ -44992,7 +44466,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 @@ -45022,31 +44496,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); @@ -45055,11 +44511,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get function information by its ID for web site, or a deployment slot. + /// Start a continuous web job for an app, or a deployment slot. /// /// - /// Description for Get function information by its ID for web site, 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. @@ -45067,11 +44523,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Function name. + /// + /// Name of Web Job. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -45082,9 +44539,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 /// @@ -45094,7 +44548,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StartContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -45119,9 +44573,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (slot == null) { @@ -45144,17 +44598,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceFunctionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -45169,7 +44623,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) @@ -45250,31 +44704,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); @@ -45283,44 +44719,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, functionEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a function for web site, or a deployment slot. + /// Stop a continuous web job for an app, or a deployment slot. /// /// - /// Description for Delete a function for web site, 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. @@ -45328,11 +44730,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Function name. + /// + /// Name of Web Job. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -45352,7 +44755,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -45377,9 +44780,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (slot == null) { @@ -45402,17 +44805,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceFunctionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -45427,7 +44830,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) @@ -45478,7 +44881,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -45523,28 +44926,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Add or update a function secret. + /// List deployments for an app, or a deployment slot. /// /// - /// Description for Add or update a function secret. + /// Description for List deployments for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. + /// Name of the app. /// /// - /// Name of the deployment slot. - /// - /// - /// The key to create or update + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -45567,7 +44962,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDeploymentsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -45592,22 +44987,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -45625,20 +45008,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); tracingParameters.Add("slot", slot); - tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFunctionSecretSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -45653,7 +45031,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) @@ -45684,12 +45062,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -45710,7 +45082,7 @@ internal WebAppsOperations(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 @@ -45740,7 +45112,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")) @@ -45753,25 +45125,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -45791,25 +45145,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a function secret. + /// Get a deployment by its ID for an app, or a deployment slot. /// /// - /// Description for Delete a function secret. + /// 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. /// /// - /// Site name. - /// - /// - /// The name of the function. + /// Name of the app. /// - /// - /// The name of the key. + /// + /// Deployment ID. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API gets a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -45820,6 +45173,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 /// @@ -45829,7 +45185,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -45854,13 +45210,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (slot == null) { @@ -45883,19 +45235,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); + tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFunctionSecretSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDeploymentSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -45910,7 +45260,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) @@ -45961,7 +45311,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -45991,13 +45341,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); @@ -46006,23 +45374,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get function keys for a function in a web site, or a deployment slot. + /// Create a deployment for an app, or a deployment slot. /// /// - /// Description for Get function keys for a function in a web site, 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. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Function name. + /// + /// ID of an existing deployment. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API creates a + /// deployment for the production slot. + /// + /// + /// Deployment details. /// /// /// Headers that will be added to request. @@ -46045,7 +45416,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListFunctionKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -46070,14 +45441,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (deployment == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -46095,17 +45470,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); + tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); + tracingParameters.Add("deployment", deployment); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionKeysSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateDeploymentSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -46120,7 +45496,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) @@ -46151,6 +45527,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) { @@ -46201,7 +45583,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")) @@ -46214,7 +45596,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) { @@ -46234,23 +45616,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get function secrets for a function in a web site, or a deployment slot. + /// Delete a deployment by its ID for an app, or a deployment slot. /// /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. + /// Description for Delete a deployment by its ID for an app, or a deployment + /// slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Function name. + /// + /// Deployment ID. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -46261,9 +45644,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 /// @@ -46273,7 +45653,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListFunctionSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -46298,9 +45678,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) + if (id == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (slot == null) { @@ -46323,17 +45703,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); + tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionSecretsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteDeploymentSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -46348,7 +45728,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) @@ -46399,7 +45779,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 @@ -46429,31 +45809,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); @@ -46462,19 +45824,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get host secrets for a function app. + /// List deployment log for specific deployment for an app, or a deployment + /// slot. /// /// - /// Description for Get host secrets for a function app. + /// 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. /// /// - /// Site name. + /// 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". /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -46497,7 +45866,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListHostKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListDeploymentLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -46522,6 +45891,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -46543,15 +45916,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("id", id); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostKeysSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLogSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -46566,7 +45941,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) @@ -46647,7 +46022,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")) @@ -46660,7 +46035,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) { @@ -46680,10 +46055,14 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// This is to allow calling via powershell and ARM template. + /// 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 This is to allow calling via powershell and ARM template. + /// 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. @@ -46691,8 +46070,13 @@ 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 the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// perform discovery for the production slot. /// /// /// Headers that will be added to request. @@ -46703,6 +46087,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 /// @@ -46712,7 +46099,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ListSyncStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> DiscoverBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -46737,6 +46124,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 (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -46758,13 +46153,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("request", request); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncStatusSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DiscoverBackupSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -46812,6 +46208,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) { @@ -46832,7 +46234,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -46862,13 +46264,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); @@ -46877,10 +46297,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Syncs function trigger metadata to the management database + /// Lists ownership identifiers for domain associated with web app. /// /// - /// Description for Syncs function trigger metadata to the management database + /// Description for Lists ownership identifiers for domain associated with web + /// app. /// /// /// Name of the resource group to which the resource belongs. @@ -46889,7 +46310,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. /// /// /// Headers that will be added to request. @@ -46900,6 +46322,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 /// @@ -46909,7 +46334,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDomainOwnershipIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -46957,11 +46382,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -46978,7 +46403,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) @@ -47029,7 +46454,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -47059,13 +46484,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); @@ -47074,28 +46517,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Add or update a host level secret. + /// Get domain ownership identifier for web app. /// /// - /// Description for Add or update a host level secret. + /// Description for Get domain ownership identifier for web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// The type of host key. + /// Name of the app. /// - /// - /// The name of the key. + /// + /// Name of domain ownership identifier. /// /// - /// Name of the deployment slot. - /// - /// - /// The key to create or update + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. /// /// /// Headers that will be added to request. @@ -47118,7 +46556,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -47143,22 +46581,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) + if (domainOwnershipIdentifierName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -47176,20 +46606,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); + tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("slot", slot); - tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostSecretSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifierSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); + _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -47204,7 +46631,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) @@ -47235,12 +46662,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -47261,7 +46682,7 @@ internal WebAppsOperations(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 @@ -47291,7 +46712,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")) @@ -47304,25 +46725,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -47342,25 +46745,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a host level secret. + /// Creates a domain ownership identifier for web app, or updates an existing + /// ownership identifier. /// /// - /// Description for Delete a host level secret. + /// 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. /// /// - /// Site name. + /// Name of the app. /// - /// - /// The type of host key. + /// + /// Name of domain ownership identifier. /// - /// - /// The name of the key. + /// + /// A JSON representation of the domain ownership properties. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. /// /// /// Headers that will be added to request. @@ -47371,6 +46777,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 /// @@ -47380,7 +46789,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -47405,13 +46814,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (keyType == null) + if (domainOwnershipIdentifierName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); } - if (keyName == null) + if (domainOwnershipIdentifier == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); } if (slot == null) { @@ -47434,19 +46843,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); + tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); + tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostSecretSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifierSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); + _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -47461,7 +46869,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) @@ -47492,6 +46900,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) { @@ -47512,7 +46926,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -47542,13 +46956,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); @@ -47557,10 +46989,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get hostname bindings for an app or a deployment slot. + /// Deletes a domain ownership identifier for a web app. /// /// - /// Description for Get hostname bindings for an app or a deployment slot. + /// Description for Deletes a domain ownership identifier for a web app. /// /// /// Name of the resource group to which the resource belongs. @@ -47568,9 +47000,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of domain ownership identifier. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. /// /// /// Headers that will be added to request. @@ -47581,9 +47016,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 /// @@ -47593,7 +47025,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListHostNameBindingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -47618,6 +47050,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (domainOwnershipIdentifierName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -47639,15 +47075,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifierSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -47662,7 +47100,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) @@ -47713,7 +47151,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 @@ -47743,31 +47181,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); @@ -47776,12 +47196,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). + /// Creates a domain ownership identifier for web app, or updates an existing + /// ownership identifier. /// /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). + /// 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. @@ -47789,12 +47209,15 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. + /// + /// Name of domain ownership identifier. /// - /// - /// Hostname in the hostname binding. + /// + /// A JSON representation of the domain ownership properties. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. /// /// /// Headers that will be added to request. @@ -47817,7 +47240,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -47842,13 +47265,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (domainOwnershipIdentifierName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); } - if (hostName == null) + if (domainOwnershipIdentifier == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); + throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -47867,18 +47294,19 @@ 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("slot", slot); - tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHostNameBindingSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifierSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -47892,7 +47320,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) @@ -47923,6 +47351,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) { @@ -47973,7 +47407,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")) @@ -47986,7 +47420,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) { @@ -48006,27 +47440,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a hostname binding for an app. + /// Get the status of the last MSDeploy operation. /// /// - /// Description for Creates a hostname binding for an 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. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -48049,7 +47476,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMSDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -48074,14 +47501,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (hostNameBinding == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostNameBinding"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -48103,18 +47522,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("hostNameBinding", hostNameBinding); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostNameBindingSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployStatusSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -48129,7 +47545,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) @@ -48160,12 +47576,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(hostNameBinding != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostNameBinding, 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) { @@ -48216,7 +47626,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")) @@ -48229,7 +47639,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) { @@ -48249,23 +47659,52 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a hostname binding for an app. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Deletes a hostname binding for an app. + /// 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 the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// - /// - /// Hostname in the hostname binding. + /// + /// Details of MSDeploy operation + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, 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. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -48276,6 +47715,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 /// @@ -48285,7 +47727,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -48314,10 +47756,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -48336,17 +47774,15 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostNameBindingSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployLogSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -48360,7 +47796,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) @@ -48411,7 +47847,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 @@ -48441,13 +47877,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); @@ -48456,26 +47910,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. + /// List the functions for a web site, or a deployment slot. /// /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. + /// Description for List the functions for a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. + /// Site name. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -48498,7 +47945,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -48523,14 +47970,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -48552,19 +47991,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceFunctionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -48630,7 +48065,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 @@ -48660,7 +48095,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")) @@ -48673,7 +48108,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) { @@ -48693,28 +48128,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new Hybrid Connection using a Service Bus relay. + /// Fetch a short lived token that can be exchanged for a master key. /// /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. + /// Description for Fetch a short lived token that can be exchanged for a + /// master key. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. + /// Name of web app. /// /// - /// The name of the slot for the web app. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -48737,7 +48165,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetFunctionsAdminTokenSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -48762,18 +48190,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -48795,20 +48211,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHybridConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetFunctionsAdminTokenSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -48823,7 +48234,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) @@ -48854,12 +48265,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -48910,7 +48315,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")) @@ -48923,7 +48328,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) { @@ -48943,25 +48348,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Removes a Hybrid Connection from this site. + /// Get function information by its ID for web site, or a deployment slot. /// /// - /// Description for Removes a Hybrid Connection from this site. + /// Description for Get function information by its ID for web site, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. + /// Site name. /// - /// - /// The relay name for this hybrid connection. + /// + /// Function name. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -48972,6 +48375,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 /// @@ -48981,7 +48387,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -49006,13 +48412,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } if (slot == null) { @@ -49035,19 +48437,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceFunctionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -49062,7 +48462,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) @@ -49143,13 +48543,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); @@ -49158,28 +48576,56 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new Hybrid Connection using a Service Bus relay. + /// Create function for web site, or a deployment slot. /// /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. + /// Description for Create function for web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Site name. /// - /// - /// The namespace for this hybrid connection. + /// + /// Function name. /// - /// - /// The relay name for this hybrid connection. + /// + /// Name of the deployment slot. /// - /// - /// The details of the hybrid connection. + /// + /// Function details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, functionEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a function for web site, or a deployment slot. + /// + /// + /// Description for Delete a function for web site, or a deployment slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Function name. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -49190,9 +48636,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 /// @@ -49202,7 +48645,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -49227,17 +48670,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } if (slot == null) { @@ -49260,20 +48695,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateHybridConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceFunctionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -49288,7 +48720,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -49319,12 +48751,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -49345,7 +48771,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -49375,31 +48801,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); @@ -49408,20 +48816,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. + /// Add or update a function secret. /// /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. + /// Description for Add or update a function secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Site name. + /// + /// + /// The name of the function. + /// + /// + /// The name of the key. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. + /// + /// + /// The key to create or update /// /// /// Headers that will be added to request. @@ -49444,7 +48860,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListHybridConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -49469,10 +48885,22 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (functionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } + if (keyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "key"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -49490,15 +48918,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("functionName", functionName); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("slot", slot); + tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnectionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFunctionSecretSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -49513,7 +48946,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) @@ -49544,6 +48977,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(key != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -49564,7 +49003,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -49594,7 +49033,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")) @@ -49607,7 +49046,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -49627,22 +49084,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets hybrid connections configured for an app (or deployment slot, if - /// specified). + /// Delete a function secret. /// /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). + /// Description for Delete a function secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// The name of the function. + /// + /// + /// The name of the key. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// hybrid connections for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -49653,9 +49113,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 /// @@ -49665,7 +49122,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListRelayServiceConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -49690,6 +49147,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (functionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } + if (keyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -49711,15 +49176,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("functionName", functionName); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRelayServiceConnectionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteFunctionSecretSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -49734,7 +49203,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) @@ -49785,7 +49254,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -49815,31 +49284,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); @@ -49848,23 +49299,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a hybrid connection configuration by its name. + /// Get function keys for a function in a web site, or a deployment slot. /// /// - /// Description for Gets a hybrid connection configuration by its name. + /// Description for Get function keys for a function in a web site, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// Name of the hybrid connection. + /// + /// Function name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// hybrid connection for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -49887,7 +49338,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListFunctionKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -49912,9 +49363,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } if (slot == null) { @@ -49937,17 +49388,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRelayServiceConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctionKeysSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -49962,7 +49413,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) @@ -50043,7 +49494,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")) @@ -50056,7 +49507,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) { @@ -50076,28 +49527,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). + /// Get function secrets for a function in a web site, or a deployment slot. /// /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). + /// Description for Get function secrets for a function in a web site, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. + /// Site name. /// - /// - /// Details of the hybrid connection configuration. + /// + /// Function name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -50120,7 +49566,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListFunctionSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -50145,13 +49591,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); } if (slot == null) { @@ -50174,18 +49616,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("functionName", functionName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateRelayServiceConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctionSecretsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -50200,7 +49641,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) @@ -50231,12 +49672,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -50287,7 +49722,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")) @@ -50300,7 +49735,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) { @@ -50320,23 +49755,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a relay service connection by its name. + /// Get host secrets for a function app. /// /// - /// Description for Deletes a relay service connection by its name. + /// Description for Get host secrets for a function app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. + /// Site name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a hybrid connection for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -50347,6 +49778,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 /// @@ -50356,7 +49790,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListHostKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -50381,10 +49815,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -50406,17 +49836,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteRelayServiceConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHostKeysSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -50431,7 +49859,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) @@ -50482,7 +49910,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 @@ -50512,13 +49940,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); @@ -50527,12 +49973,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). + /// This is to allow calling via powershell and ARM template. /// /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). + /// Description for This is to allow calling via powershell and ARM template. /// /// /// Name of the resource group to which the resource belongs. @@ -50540,15 +49984,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -50559,9 +49996,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 /// @@ -50571,7 +50005,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ListSyncStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -50596,14 +50030,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -50625,18 +50051,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateRelayServiceConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSyncStatusSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -50651,7 +50074,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -50682,12 +50105,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -50708,7 +50125,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -50738,31 +50155,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); @@ -50771,10 +50170,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// Syncs function trigger metadata to the management database /// /// - /// Description for Gets all scale-out instances of an app. + /// Description for Syncs function trigger metadata to the management database /// /// /// Name of the resource group to which the resource belongs. @@ -50783,8 +50182,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -50795,9 +50193,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 /// @@ -50807,7 +50202,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -50855,11 +50250,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -50876,7 +50271,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) @@ -50927,7 +50322,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -50957,31 +50352,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); @@ -50990,22 +50367,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// Add or update a host level secret. /// /// - /// Description for Gets all scale-out instances of an app. + /// Description for Add or update a host level secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// + /// + /// The type of host key. + /// + /// + /// The name of the key. /// /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. + /// Name of the deployment slot. + /// + /// + /// The key to create or update /// /// /// Headers that will be added to request. @@ -51028,7 +50411,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -51053,14 +50436,22 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) + if (keyType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); + } + if (keyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "key"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -51078,17 +50469,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("keyType", keyType); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("slot", slot); + tracingParameters.Add("key", key); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceInfoSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostSecretSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -51103,7 +50497,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) @@ -51134,6 +50528,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(key != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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) { @@ -51154,7 +50554,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -51184,7 +50584,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")) @@ -51197,7 +50597,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -51217,23 +50635,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the status of the last MSDeploy operation. + /// Delete a host level secret. /// /// - /// Description for Get the status of the last MSDeploy operation. + /// Description for Delete a host level secret. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Site name. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// + /// The type of host key. /// - /// - /// ID of web app instance. + /// + /// The name of the key. + /// + /// + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -51244,9 +50664,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 /// @@ -51256,7 +50673,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceMsDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -51281,13 +50698,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (keyType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); } - if (instanceId == null) + if (keyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -51306,18 +50727,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("keyType", keyType); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMsDeployStatusSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteHostSecretSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -51331,7 +50754,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) @@ -51382,7 +50805,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -51412,31 +50835,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); @@ -51445,58 +50850,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy 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. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. + /// Get hostname bindings for an app or a deployment slot. /// /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. + /// Description for Get hostname bindings for an app or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. + /// Name of the deployment slot. If a slot is not specified, the API gets + /// hostname bindings for the production slot. /// /// /// Headers that will be added to request. @@ -51519,7 +50886,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListHostNameBindingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -51548,10 +50915,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -51570,17 +50933,15 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMSDeployLogSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -51645,7 +51006,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 @@ -51675,7 +51036,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")) @@ -51688,7 +51049,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) { @@ -51708,26 +51069,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Get the named hostname binding for an app (or deployment slot, if + /// specified). /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Get the named hostname binding for an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API the named + /// binding for the production slot. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// Hostname in the hostname binding. /// /// /// Headers that will be added to request. @@ -51750,7 +51110,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -51779,9 +51139,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (instanceId == null) + if (hostName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); } if (Client.SubscriptionId == null) { @@ -51801,17 +51161,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetHostNameBindingSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -51876,7 +51236,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 @@ -51906,7 +51266,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")) @@ -51919,7 +51279,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) { @@ -51939,29 +51299,27 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Creates a hostname binding for an app. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Creates a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// PID. + /// + /// Hostname in the hostname binding. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// + /// Binding details. This is the JSON representation of a HostNameBinding + /// object. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// create a binding for the production slot. /// /// /// Headers that will be added to request. @@ -51984,7 +51342,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -52009,17 +51367,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (hostName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); } - if (slot == null) + if (hostNameBinding == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostNameBinding"); } - if (instanceId == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -52038,20 +51396,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("hostName", hostName); + tracingParameters.Add("hostNameBinding", hostNameBinding); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostNameBindingSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -52065,7 +51422,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) @@ -52096,6 +51453,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(hostNameBinding != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostNameBinding, 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) { @@ -52116,7 +51479,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 @@ -52146,7 +51509,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")) @@ -52159,7 +51522,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) { @@ -52179,29 +51542,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. + /// Deletes a hostname binding for an app. /// /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. + /// Description for Deletes a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// Hostname in the hostname binding. /// /// /// Headers that will be added to request. @@ -52221,7 +51578,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -52246,17 +51603,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (instanceId == null) + if (hostName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); } if (Client.SubscriptionId == null) { @@ -52275,20 +51628,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("hostName", hostName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceProcessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteHostNameBindingSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -52353,7 +51704,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -52398,29 +51749,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. + /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. /// /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Retrieves a specific Service Bus Hybrid Connection used by + /// this Web App. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// The name of the web app. /// - /// - /// PID. + /// + /// The namespace for this hybrid connection. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// + /// The relay name for this hybrid connection. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -52443,7 +51791,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -52468,17 +51816,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); } - if (slot == null) + if (relayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); } - if (instanceId == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -52497,20 +51845,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessDumpSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -52567,7 +51915,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -52575,7 +51923,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 @@ -52605,7 +51953,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")) @@ -52615,7 +51963,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -52625,29 +51986,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Creates a new Hybrid Connection using a Service Bus relay. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Creates a new Hybrid Connection using a Service Bus relay. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// The name of the web app. /// - /// - /// PID. + /// + /// The namespace for this hybrid connection. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// + /// The relay name for this hybrid connection. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// The details of the hybrid connection. + /// + /// + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -52670,7 +52030,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -52695,17 +52055,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); } - if (slot == null) + if (relayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); } - if (instanceId == null) + if (connectionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -52724,20 +52088,21 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHybridConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -52751,7 +52116,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) @@ -52782,6 +52147,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -52802,7 +52173,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 @@ -52832,7 +52203,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")) @@ -52845,7 +52216,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) { @@ -52865,32 +52236,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Removes a Hybrid Connection from this site. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Removes a Hybrid Connection from this site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// The name of the web app. /// - /// - /// PID. + /// + /// The namespace for this hybrid connection. /// - /// - /// Module base address. + /// + /// The relay name for this hybrid connection. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -52901,9 +52265,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 /// @@ -52913,7 +52274,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetInstanceProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -52938,22 +52299,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); } - if (baseAddress == null) + if (relayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -52971,22 +52328,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessModuleSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -53000,7 +52355,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) @@ -53081,31 +52436,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); @@ -53114,29 +52451,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Creates a new Hybrid Connection using a Service Bus relay. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Creates a new Hybrid Connection using a Service Bus relay. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// The name of the web app. /// - /// - /// PID. + /// + /// The namespace for this hybrid connection. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// + /// The relay name for this hybrid connection. /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". + /// + /// The details of the hybrid connection. + /// + /// + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -53159,7 +52495,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -53184,17 +52520,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (namespaceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); } - if (slot == null) + if (relayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); } - if (instanceId == null) + if (connectionEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -53213,20 +52553,21 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateHybridConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -53240,7 +52581,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) @@ -53271,6 +52612,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -53291,7 +52638,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 @@ -53321,7 +52668,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")) @@ -53334,7 +52681,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) { @@ -53354,22 +52701,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. + /// Retrieves all Service Bus Hybrid Connections used by this Web App. /// /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. + /// Description for Retrieves all Service Bus Hybrid Connections used by this + /// Web App. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// /// - /// Name of the deployment slot. By default, this API returns information on - /// the production slot. + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -53392,7 +52737,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> IsCloneableSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListHybridConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -53440,11 +52785,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "IsCloneableSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnectionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -53461,7 +52806,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) @@ -53542,7 +52887,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")) @@ -53555,7 +52900,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) { @@ -53575,10 +52920,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Gets hybrid connections configured for an app (or deployment slot, if + /// specified). /// /// - /// Description for Gets existing backups of an app. + /// Description for Gets hybrid connections configured for an app (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -53588,7 +52935,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. + /// hybrid connections for the production slot. /// /// /// Headers that will be added to request. @@ -53611,7 +52958,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListRelayServiceConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -53659,11 +53006,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListRelayServiceConnectionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -53680,7 +53027,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) @@ -53761,7 +53108,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")) @@ -53774,7 +53121,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) { @@ -53794,10 +53141,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// This is to allow calling via powershell and ARM template. + /// Gets a hybrid connection configuration by its name. /// /// - /// Description for This is to allow calling via powershell and ARM template. + /// Description for Gets a hybrid connection configuration by its name. /// /// /// Name of the resource group to which the resource belongs. @@ -53805,8 +53152,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of the hybrid connection. + /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API will get a + /// hybrid connection for the production slot. /// /// /// Headers that will be added to request. @@ -53829,7 +53180,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListSyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -53854,6 +53205,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (entityName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -53875,15 +53230,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("entityName", entityName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncFunctionTriggersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetRelayServiceConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -53898,7 +53255,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) @@ -53979,7 +53336,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")) @@ -53992,7 +53349,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) { @@ -54012,21 +53369,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled + /// Creates a new hybrid connection configuration (PUT), or updates an existing + /// one (PATCH). /// /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled + /// Description for Creates a new hybrid connection configuration (PUT), or + /// updates an existing one (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. + /// + /// + /// Name of the hybrid connection configuration. + /// + /// + /// Details of the hybrid connection configuration. /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// create or update a hybrid connection for the production slot. /// /// /// Headers that will be added to request. @@ -54049,7 +53413,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetMigrateMySqlStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -54074,6 +53438,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (entityName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -54095,15 +53467,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("entityName", entityName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMigrateMySqlStatusSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateRelayServiceConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -54118,7 +53493,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) @@ -54149,6 +53524,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -54199,7 +53580,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")) @@ -54212,7 +53593,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) { @@ -54232,10 +53613,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a Swift Virtual Network connection. + /// Deletes a relay service connection by its name. /// /// - /// Description for Gets a Swift Virtual Network connection. + /// Description for Deletes a relay service connection by its name. /// /// /// Name of the resource group to which the resource belongs. @@ -54243,9 +53624,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of the hybrid connection configuration. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete a hybrid connection for the production slot. /// /// /// Headers that will be added to request. @@ -54256,9 +53640,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 /// @@ -54268,7 +53649,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -54293,6 +53674,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (entityName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -54314,15 +53699,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("entityName", entityName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSwiftVirtualNetworkConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteRelayServiceConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -54337,7 +53724,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) @@ -54388,7 +53775,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 @@ -54418,31 +53805,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); @@ -54451,17 +53820,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. + /// Creates a new hybrid connection configuration (PUT), or updates an existing + /// one (PATCH). /// /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. + /// Description for Creates a new hybrid connection configuration (PUT), or + /// updates an existing one (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -54469,12 +53833,15 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of the hybrid connection configuration. + /// /// - /// Properties of the Virtual Network connection. See example. + /// Details of the hybrid connection configuration. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// create or update a hybrid connection for the production slot. /// /// /// Headers that will be added to request. @@ -54497,7 +53864,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -54522,6 +53889,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (entityName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); + } if (connectionEnvelope == null) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); @@ -54547,16 +53918,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("entityName", entityName); tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateRelayServiceConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -54571,7 +53944,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) @@ -54658,7 +54031,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")) @@ -54671,7 +54044,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) { @@ -54691,12 +54064,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). + /// Gets all scale-out instances of an app. /// /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). + /// Description for Gets all scale-out instances of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -54705,8 +54076,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API gets the + /// production slot instances. /// /// /// Headers that will be added to request. @@ -54717,6 +54088,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 /// @@ -54726,7 +54100,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -54774,11 +54148,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetworkSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -54795,7 +54169,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) @@ -54846,7 +54220,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 @@ -54876,13 +54250,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); @@ -54891,17 +54283,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. + /// Gets all scale-out instances of an app. /// /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. + /// Description for Gets all scale-out instances of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -54909,12 +54294,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Properties of the Virtual Network connection. See example. + /// /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API gets the + /// production slot instances. /// /// /// Headers that will be added to request. @@ -54937,7 +54321,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -54962,9 +54346,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (connectionEnvelope == null) + if (instanceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); } if (slot == null) { @@ -54987,16 +54371,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSwiftVirtualNetworkConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceInfoSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -55011,7 +54396,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) @@ -55042,12 +54427,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -55098,7 +54477,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")) @@ -55111,7 +54490,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) { @@ -55131,25 +54510,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). + /// Get the status of the last MSDeploy operation. /// /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). + /// Description for Get the status of the last MSDeploy operation. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// The type of view. This can either be "summary" or "detailed". + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// network features for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// ID of web app instance. /// /// /// Headers that will be added to request. @@ -55172,7 +54549,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListNetworkFeaturesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string view, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceMsDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -55197,14 +54574,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (view == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "view"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -55222,18 +54599,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("view", view); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeaturesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMsDeployStatusSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -55298,7 +54675,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 @@ -55328,7 +54705,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")) @@ -55341,7 +54718,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) { @@ -55361,25 +54738,58 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// 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. /// - /// - /// GUID of the operation. + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// ID of web app instance. + /// + /// + /// Details of MSDeploy operation + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, 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. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// ID of web app instance. /// /// /// Headers that will be added to request. @@ -55402,7 +54812,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -55427,14 +54837,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -55452,18 +54862,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMSDeployLogSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -55528,7 +54938,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -55558,7 +54968,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")) @@ -55571,25 +54981,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -55609,29 +55001,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site (To be deprecated). + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Site name. /// /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// - /// - /// The Blob URL to store capture file. + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -55654,7 +55043,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -55683,6 +55072,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -55700,33 +55093,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -55738,7 +55118,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) @@ -55789,7 +55169,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 @@ -55819,7 +55199,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")) @@ -55832,7 +55212,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) { @@ -55852,56 +55232,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. + /// Site name. /// - /// - /// The name of the web app. + /// + /// PID. /// /// - /// The name of the slot for this web app. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -55912,6 +55265,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 /// @@ -55921,7 +55277,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -55946,10 +55302,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -55967,16 +55331,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -55990,7 +55358,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) @@ -56041,7 +55409,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 @@ -56071,13 +55439,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); @@ -56086,25 +55472,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Terminate a process by its ID for a web site, or a deployment slot, or + /// specific scaled-out instance in a web site. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Terminate a process by its ID for a web site, or a + /// deployment slot, or specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// GUID of the operation. + /// + /// PID. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -56115,9 +55505,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 /// @@ -56127,7 +55514,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTracesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -56152,14 +55539,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -56177,18 +55568,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceProcessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -56202,7 +55595,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) @@ -56253,7 +55646,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -56283,31 +55676,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); @@ -56316,25 +55691,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// Get a memory dump of a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for Get a memory dump of a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// GUID of the operation. + /// + /// PID. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -56357,7 +55736,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -56382,14 +55761,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -56407,18 +55790,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlotV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessDumpSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -56475,7 +55860,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -56483,7 +55868,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -56513,7 +55898,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")) @@ -56523,38 +55908,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -56564,25 +55918,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// GUID of the operation. + /// + /// PID. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -56605,7 +55963,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNetworkTracesSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -56630,14 +55988,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (operationId == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -56655,18 +56017,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlotV2", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -56731,7 +56095,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 @@ -56761,7 +56125,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")) @@ -56774,7 +56138,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) { @@ -56794,22 +56158,32 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. + /// + /// + /// Module base address. /// /// - /// Name of the deployment slot. If a slot is not specified, the API generate a - /// new publishing password for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. + /// + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -56820,6 +56194,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 /// @@ -56829,7 +56206,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetInstanceProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -56854,10 +56231,22 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (baseAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -56875,16 +56264,22 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPasswordSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessModuleSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -56898,7 +56293,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) @@ -56949,7 +56344,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 @@ -56979,13 +56374,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); @@ -56994,26 +56407,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets perfmon counters for web app. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Gets perfmon counters for web app. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Site name. + /// + /// + /// PID. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. + /// + /// ID of a specific scaled-out instance. This is the value of the name + /// property in the JSON response from "GET api/sites/{siteName}/instances". /// /// /// Headers that will be added to request. @@ -57036,7 +56452,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPerfMonCountersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -57061,10 +56477,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -57082,23 +56506,22 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); - tracingParameters.Add("filter", filter); + tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -57161,7 +56584,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 @@ -57191,7 +56614,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")) @@ -57204,7 +56627,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) { @@ -57224,20 +56647,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets web app's event logs. + /// Shows whether an app can be cloned to another resource group or + /// subscription. /// /// - /// Description for Gets web app's event logs. + /// Description for Shows whether an app can be cloned to another resource + /// group or subscription. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. By default, this API returns information on + /// the production slot. /// /// /// Headers that will be added to request. @@ -57260,7 +56685,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> IsCloneableSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -57308,11 +56733,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlagSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "IsCloneableSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -57329,7 +56754,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) @@ -57410,7 +56835,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")) @@ -57423,7 +56848,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) { @@ -57443,10 +56868,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the premier add-ons of an app. + /// Gets existing backups of an app. /// /// - /// Description for Gets the premier add-ons of an app. + /// Description for Gets existing backups of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -57456,7 +56881,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// the premier add-ons for the production slot. + /// backups of the production slot. /// /// /// Headers that will be added to request. @@ -57479,7 +56904,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListPremierAddOnsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -57527,11 +56952,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOnsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -57548,7 +56973,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) @@ -57629,7 +57054,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")) @@ -57642,7 +57067,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) { @@ -57662,10 +57087,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a named add-on of an app. + /// This is to allow calling via powershell and ARM template. /// /// - /// Description for Gets a named add-on of an app. + /// Description for This is to allow calling via powershell and ARM template. /// /// /// Name of the resource group to which the resource belongs. @@ -57673,12 +57098,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Add-on name. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named add-on for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -57701,7 +57122,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListSyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -57726,10 +57147,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -57751,17 +57168,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSyncFunctionTriggersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -57776,7 +57191,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) @@ -57857,7 +57272,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")) @@ -57870,7 +57285,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) { @@ -57890,26 +57305,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates a named add-on of an app. + /// Returns the status of MySql in app migration, if one is active, and whether + /// or not MySql in app is enabled /// /// - /// Description for Updates a named add-on of an app. + /// Description for Returns the status of MySql in app migration, if one is + /// active, and whether or not MySql in app is enabled /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -57932,7 +57342,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> AddPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetMigrateMySqlStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -57957,18 +57367,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (premierAddOn != null) - { - premierAddOn.Validate(); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -57990,18 +57388,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetMigrateMySqlStatusSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58016,7 +57411,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) @@ -58047,12 +57442,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -58103,7 +57492,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")) @@ -58116,7 +57505,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) { @@ -58136,10 +57525,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a premier add-on from an app. + /// Gets a Swift Virtual Network connection. /// /// - /// Description for Delete a premier add-on from an app. + /// Description for Gets a Swift Virtual Network connection. /// /// /// Name of the resource group to which the resource belongs. @@ -58147,12 +57536,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Add-on name. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the named add-on for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get a + /// gateway for the production slot's Virtual Network. /// /// /// Headers that will be added to request. @@ -58163,6 +57549,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 /// @@ -58172,7 +57561,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeletePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58197,10 +57586,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58222,17 +57607,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSwiftVirtualNetworkConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58247,7 +57630,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) @@ -58328,13 +57711,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); @@ -58343,10 +57744,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates a named add-on of an app. + /// Deletes a Swift Virtual Network connection from an app (or deployment + /// slot). /// /// - /// Description for Updates a named add-on of an app. + /// Description for Deletes a Swift Virtual Network connection from an app (or + /// deployment slot). /// /// /// Name of the resource group to which the resource belongs. @@ -58354,15 +57757,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. + /// delete the connection for the production slot. /// /// /// Headers that will be added to request. @@ -58373,9 +57770,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 /// @@ -58385,7 +57779,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdatePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58410,14 +57804,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58439,18 +57825,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOnSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetworkSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58465,7 +57848,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -58496,12 +57879,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -58522,7 +57899,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 @@ -58552,31 +57929,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); @@ -58585,21 +57944,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Gets all network features used by the app (or deployment slot, if + /// specified). /// /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Gets all network features used by the app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. + /// + /// + /// The type of view. Only "summary" is supported at this time. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// network features for the production slot. /// /// /// Headers that will be added to request. @@ -58622,7 +57985,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateAccessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListNetworkFeaturesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string view, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58647,6 +58010,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (view == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "view"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -58668,15 +58035,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("view", view); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeaturesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58742,7 +58111,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 @@ -58772,7 +58141,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")) @@ -58785,7 +58154,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) { @@ -58805,24 +58174,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. /// - /// - /// The information for the private access + /// + /// GUID of the operation. /// /// - /// The name of the slot for the web app. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -58845,7 +58215,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -58870,9 +58240,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (access == null) + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "access"); + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } if (slot == null) { @@ -58895,16 +58265,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("access", access); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnetSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -58919,7 +58290,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) @@ -58950,12 +58321,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(access != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -58976,7 +58341,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -59006,7 +58371,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")) @@ -59019,7 +58384,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -59039,18 +58422,29 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a private endpoint connection + /// Start capturing network packets for the site (To be deprecated). /// /// - /// Description for Gets a private endpoint connection + /// Description for Start capturing network packets for the site (To be + /// deprecated). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// The name of the web app. /// - /// + /// + /// The name of the slot for this web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -59073,7 +58467,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59098,9 +58492,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (privateEndpointConnectionName == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -59119,18 +58513,33 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("slot", slot); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -59142,7 +58551,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) @@ -59223,7 +58632,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")) @@ -59236,7 +58645,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) { @@ -59256,47 +58665,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Approves or rejects a private endpoint connection + /// Start capturing network packets for the site. /// /// - /// Description for Approves or rejects a private endpoint connection + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. + /// The name of the web app. /// - /// - /// The cancellation token. + /// + /// The name of the slot for this web app. /// - public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// The duration to keep capturing in seconds. /// - /// - /// Name of the site. + /// + /// The maximum frame length in bytes (Optional). /// - /// + /// + /// The Blob URL to store capture file. /// /// /// The headers that will be added to request. @@ -59304,24 +58694,27 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the private link resources + /// Stop ongoing capturing network packets for the site. /// /// - /// Description for Gets the private link resources + /// Description for Stop ongoing capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// The name of the web app. + /// + /// + /// The name of the slot for this web app. /// /// /// Headers that will be added to request. @@ -59332,9 +58725,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 /// @@ -59344,7 +58734,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59369,6 +58759,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -59386,14 +58780,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResources", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -59407,7 +58803,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) @@ -59458,7 +58854,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 @@ -59488,31 +58884,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); @@ -59521,22 +58899,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. + /// + /// + /// GUID of the operation. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -59559,7 +58940,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTracesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59584,6 +58965,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -59605,15 +58990,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -59679,7 +59066,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 @@ -59709,7 +59096,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")) @@ -59722,7 +59109,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) { @@ -59742,25 +59129,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// PID. + /// + /// GUID of the operation. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -59783,7 +59170,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -59808,9 +59195,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } if (slot == null) { @@ -59833,17 +59220,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlotV2", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -59909,7 +59296,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 != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -59939,7 +59326,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")) @@ -59952,7 +59339,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -59972,25 +59377,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. + /// Gets a named operation for a network trace capturing (or deployment slot, + /// if specified). /// /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. + /// Description for Gets a named operation for a network trace capturing (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// PID. + /// + /// GUID of the operation. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// an operation for the production slot. /// /// /// Headers that will be added to request. @@ -60001,6 +59406,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 /// @@ -60010,7 +59418,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetNetworkTracesSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60035,9 +59443,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } if (slot == null) { @@ -60060,17 +59468,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); + tracingParameters.Add("operationId", operationId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteProcessSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlotV2", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -60085,7 +59493,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) @@ -60136,7 +59544,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -60166,13 +59574,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); @@ -60181,25 +59607,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. + /// Generates a new publishing password for an app (or deployment slot, if + /// specified). /// /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Generates a new publishing password for an app (or + /// deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API generate a + /// new publishing password for the production slot. /// /// /// Headers that will be added to request. @@ -60210,9 +59633,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 /// @@ -60222,7 +59642,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60247,10 +59667,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -60272,17 +59688,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessDumpSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPasswordSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -60297,7 +59711,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) @@ -60340,7 +59754,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -60348,7 +59762,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 @@ -60378,18 +59792,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -60398,25 +59807,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Gets perfmon counters for web app. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Gets perfmon counters for web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// Return only usages/metrics specified in the filter. Filter conforms to + /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and + /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq + /// duration'[Hour|Minute|Day]'. /// /// /// Headers that will be added to request. @@ -60439,7 +59849,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPerfMonCountersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60464,10 +59874,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -60489,17 +59895,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -60507,6 +59912,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -60565,7 +59974,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 @@ -60595,7 +60004,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")) @@ -60608,7 +60017,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) { @@ -60628,28 +60037,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Gets web app's event logs. /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Gets web app's event logs. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -60672,7 +60073,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60697,14 +60098,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -60726,19 +60119,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessModuleSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlagSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -60804,7 +60193,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 @@ -60834,7 +60223,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")) @@ -60847,7 +60236,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) { @@ -60867,25 +60256,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Gets the premier add-ons of an app. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets the premier add-ons of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// PID. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the premier add-ons for the production slot. /// /// /// Headers that will be added to request. @@ -60908,7 +60292,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListPremierAddOnsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -60933,10 +60317,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -60958,17 +60338,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOnsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -61034,7 +60412,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 @@ -61064,7 +60442,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")) @@ -61077,7 +60455,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) { @@ -61097,10 +60475,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get public certificates for an app or a deployment slot. + /// Gets a named add-on of an app. /// /// - /// Description for Get public certificates for an app or a deployment slot. + /// Description for Gets a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -61108,9 +60486,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Add-on name. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -61133,7 +60514,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPublicCertificatesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61158,6 +60539,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (premierAddOnName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -61179,15 +60564,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -61283,7 +60670,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")) @@ -61296,7 +60683,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) { @@ -61316,12 +60703,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). + /// Updates a named add-on of an app. /// /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). + /// Description for Updates a named add-on of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -61329,12 +60714,15 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. + /// + /// Add-on name. /// - /// - /// Public certificate name. + /// + /// A JSON representation of the edited premier add-on. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -61357,7 +60745,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetPublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> AddPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61382,13 +60770,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (premierAddOnName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } - if (publicCertificateName == null) + if (premierAddOn == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); + } + if (premierAddOn != null) + { + premierAddOn.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -61407,18 +60803,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("premierAddOnName", premierAddOnName); + tracingParameters.Add("premierAddOn", premierAddOn); tracingParameters.Add("slot", slot); - tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -61432,7 +60829,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) @@ -61463,6 +60860,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(premierAddOn != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -61513,7 +60916,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")) @@ -61526,7 +60929,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) { @@ -61546,10 +60949,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a hostname binding for an app. + /// Delete a premier add-on from an app. /// /// - /// Description for Creates a hostname binding for an app. + /// Description for Delete a premier add-on from an app. /// /// /// Name of the resource group to which the resource belongs. @@ -61557,16 +60960,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. + /// + /// Add-on name. /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. + /// delete the named add-on for the production slot. /// /// /// Headers that will be added to request. @@ -61577,9 +60976,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 /// @@ -61589,7 +60985,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeletePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61614,13 +61010,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (publicCertificate == null) + if (premierAddOnName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); } if (slot == null) { @@ -61643,18 +61035,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("publicCertificate", publicCertificate); + tracingParameters.Add("premierAddOnName", premierAddOnName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOnSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -61669,7 +61060,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -61700,9 +61091,227 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(publicCertificate != null) + // Set Credentials + if (Client.Credentials != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, Client.SerializationSettings); + 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; + } + + /// + /// Updates a named add-on of an app. + /// + /// + /// Description for Updates a named add-on of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Add-on name. + /// + /// + /// A JSON representation of the edited premier add-on. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the named add-on for the production slot. + /// + /// + /// 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> UpdatePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (premierAddOnName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); + } + if (premierAddOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + 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("premierAddOnName", premierAddOnName); + tracingParameters.Add("premierAddOn", premierAddOn); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOnSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(premierAddOn != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -61756,7 +61365,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")) @@ -61769,7 +61378,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) { @@ -61789,23 +61398,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a hostname binding for an app. + /// Gets data around private site access enablement and authorized Virtual + /// Networks that can access the site. /// /// - /// Description for Deletes a hostname binding for an app. + /// Description for Gets data around private site access enablement and + /// authorized Virtual Networks that can access the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Public certificate name. + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -61816,6 +61423,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 /// @@ -61825,7 +61435,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeletePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateAccessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -61854,10 +61464,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -61876,17 +61482,15 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -61900,7 +61504,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) @@ -61951,7 +61555,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 @@ -61981,13 +61585,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); @@ -61996,25 +61618,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the publishing profile for an app (or deployment slot, if specified). + /// Sets data around private site access enablement and authorized Virtual + /// Networks that can access the site. /// /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). + /// Description for Sets data around private site access enablement and + /// authorized Virtual Networks that can access the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. + /// + /// The information for the private access /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing profile for the production slot. + /// The name of the slot for the web app. /// /// /// Headers that will be added to request. @@ -62037,7 +61658,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62062,9 +61683,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (publishingProfileOptions == null) + if (access == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); + throw new ValidationException(ValidationRules.CannotBeNull, "access"); } if (slot == null) { @@ -62087,14 +61708,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); + tracingParameters.Add("access", access); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecretsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnetSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -62111,7 +61732,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) @@ -62142,9 +61763,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(publishingProfileOptions != null) + if(access != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -62160,7 +61781,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -62198,7 +61819,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")) @@ -62208,7 +61829,20 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -62218,22 +61852,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Name of the site. /// /// - /// Name of the deployment slot. If a slot is not specified, the API resets - /// configuration settings for the production slot. + /// Name of the site deployment slot. /// /// /// Headers that will be added to request. @@ -62244,6 +61876,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 /// @@ -62253,7 +61888,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task ResetSlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62301,11 +61936,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetSlotConfigurationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -62322,7 +61957,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) @@ -62403,13 +62038,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); @@ -62418,28 +62071,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restarts an app (or deployment slot, if specified). + /// Gets a private endpoint connection /// /// - /// Description for Restarts an app (or deployment slot, if specified). + /// Description for Gets a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restart the production slot. + /// Name of the site. /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. + /// + /// Name of the private endpoint connection. /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). + /// + /// Name of the site deployment slot. /// /// /// Headers that will be added to request. @@ -62450,6 +62097,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 /// @@ -62459,7 +62109,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RestartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62484,6 +62134,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -62505,28 +62159,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("slot", slot); - tracingParameters.Add("softRestart", softRestart); - tracingParameters.Add("synchronous", synchronous); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RestartSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (softRestart != null) - { - _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); - } - if (synchronous != null) - { - _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, Client.SerializationSettings).Trim('"')))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -62538,7 +62184,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) @@ -62619,13 +62265,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); @@ -62634,55 +62298,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. + /// Approves or rejects a private endpoint connection /// /// - /// Description for Restores an app from a backup blob in Azure Storage. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. + /// Name of the site. /// - /// - /// Name of web app. + /// /// - /// - /// Deleted web app restore information. + /// /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. /// /// /// The headers that will be added to request. @@ -62690,32 +62321,28 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - public async Task RestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Restores a web app from a snapshot. + /// Deletes a private endpoint connection /// /// - /// Description for Restores a web app from a snapshot. + /// Description for Deletes a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the site. /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. + /// /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. /// /// /// The headers that will be added to request. @@ -62723,29 +62350,26 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// The cancellation token. /// - public async Task RestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginRestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Get list of siteextensions for a web site, or a deployment slot. + /// Gets the private link resources /// /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. + /// Description for Gets the private link resources /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. /// /// /// Headers that will be added to request. @@ -62768,7 +62392,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteExtensionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivateLinkResourcesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -62816,11 +62440,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResourcesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -62888,7 +62512,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 @@ -62918,7 +62542,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")) @@ -62931,7 +62555,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) { @@ -62951,12 +62575,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -62964,12 +62588,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Site extension name. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -62992,7 +62613,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63017,10 +62638,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -63042,17 +62659,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtensionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -63148,7 +62763,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")) @@ -63161,7 +62776,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) { @@ -63181,43 +62796,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> InstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginInstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. @@ -63225,12 +62809,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Site extension name. + /// + /// PID. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -63241,6 +62825,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 /// @@ -63250,7 +62837,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63275,9 +62862,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) + if (processId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (slot == null) { @@ -63300,17 +62887,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtensionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -63325,7 +62912,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) @@ -63376,7 +62963,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -63406,13 +62993,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); @@ -63421,58 +63026,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task CopySlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginCopySlotSlotWithHttpMessagesAsync(resourceGroupName, name, copySlotEntity, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the difference in configuration settings between two web app slots. + /// Terminate a process by its ID for a web site, or a deployment slot, or + /// specific scaled-out instance in a web site. /// /// - /// Description for Get the difference in configuration settings between two - /// web app slots. + /// Description for Terminate a process by its ID for a web site, or a + /// deployment slot, or specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// PID. /// /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -63483,9 +63055,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 /// @@ -63495,7 +63064,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotDifferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63520,13 +63089,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) + if (processId == null) { - slotSwapEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); } if (slot == null) { @@ -63549,16 +63114,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteProcessSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -63573,7 +63139,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) @@ -63604,12 +63170,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -63630,7 +63190,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -63660,31 +63220,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); @@ -63693,51 +63235,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Get a memory dump of a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Get a memory dump of a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task SwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. + /// Site name. /// - /// - /// Website Name. + /// + /// PID. /// /// - /// Website Slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -63760,7 +63276,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -63785,6 +63301,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -63806,15 +63326,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessDumpSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -63872,7 +63394,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -63880,7 +63402,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 @@ -63910,7 +63432,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")) @@ -63920,20 +63442,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -63943,20 +63452,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Returns all Snapshots to the user from DRSecondary endpoint. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Website Name. + /// Site name. + /// + /// + /// PID. /// /// - /// Website Slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -63979,7 +63493,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64004,6 +63518,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -64025,15 +63543,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondarySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -64099,7 +63619,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 @@ -64129,7 +63649,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")) @@ -64142,7 +63662,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) { @@ -64162,20 +63682,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the source control configuration of an app. + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. /// /// - /// Description for Gets the source control configuration of an app. + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// PID. + /// + /// + /// Module base address. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the source control configuration for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -64198,7 +63726,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64223,6 +63751,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } + if (baseAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -64244,15 +63780,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); + tracingParameters.Add("baseAddress", baseAddress); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetProcessModuleSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); + _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -64318,7 +63858,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -64348,7 +63888,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")) @@ -64361,43 +63901,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -64417,52 +63921,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Updates the source control configuration of an app. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. + /// Site name. /// - /// - /// Name of the app. + /// + /// PID. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the source control configuration for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -64473,6 +63950,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 /// @@ -64482,7 +63962,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64507,6 +63987,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (processId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "processId"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -64528,15 +64012,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("processId", processId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -64551,7 +64037,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) @@ -64602,7 +64088,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -64632,13 +64118,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); @@ -64647,10 +64151,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Get public certificates for an app or a deployment slot. /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Get public certificates for an app or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -64658,12 +64162,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API gets + /// hostname bindings for the production slot. /// /// /// Headers that will be added to request. @@ -64686,7 +64187,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPublicCertificatesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64711,10 +64212,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -64736,14 +64233,13 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -64760,7 +64256,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) @@ -64791,12 +64287,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -64817,7 +64307,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -64847,7 +64337,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")) @@ -64860,43 +64350,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -64916,10 +64370,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Starts an app (or deployment slot, if specified). + /// Get the named public certificate for an app (or deployment slot, if + /// specified). /// /// - /// Description for Starts an app (or deployment slot, if specified). + /// Description for Get the named public certificate for an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -64928,8 +64384,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will start - /// the production slot. + /// Name of the deployment slot. If a slot is not specified, the API the named + /// binding for the production slot. + /// + /// + /// Public certificate name. /// /// /// Headers that will be added to request. @@ -64940,6 +64399,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 /// @@ -64949,7 +64411,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -64978,6 +64440,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (publicCertificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -64996,15 +64462,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); + tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -65018,7 +64486,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) @@ -65099,13 +64567,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); @@ -65114,57 +64600,27 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Creates a hostname binding for an app. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Creates a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. + /// Name of the app. /// - public async Task>> StartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// Public certificate name. /// - /// - /// Name of the app. + /// + /// Public certificate details. This is the JSON representation of a + /// PublicCertificate object. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will stop - /// the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// create a binding for the production slot. /// /// /// Headers that will be added to request. @@ -65175,6 +64631,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 /// @@ -65184,7 +64643,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65209,6 +64668,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (publicCertificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + } + if (publicCertificate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -65230,15 +64697,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("publicCertificateName", publicCertificateName); + tracingParameters.Add("publicCertificate", publicCertificate); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -65253,7 +64723,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) @@ -65284,6 +64754,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(publicCertificate != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -65334,209 +64810,30 @@ 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(); } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web 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 StopNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTraceSlot", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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) + // Deserialize Response + if ((int)_statusCode == 200) { - foreach(var _header in customHeaders) + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try + catch (JsonException ex) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) + _httpRequest.Dispose(); + if (_httpResponse != null) { - ex.Body = _errorBody; + _httpResponse.Dispose(); } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } - 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) { @@ -65546,20 +64843,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sync web app repository. + /// Deletes a hostname binding for an app. /// /// - /// Description for Sync web app repository. + /// Description for Deletes a hostname binding for an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the binding for the production slot. + /// + /// + /// Public certificate name. /// /// /// Headers that will be added to request. @@ -65579,7 +64879,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncRepositorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeletePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65608,6 +64908,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } + if (publicCertificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -65626,15 +64930,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); + tracingParameters.Add("publicCertificateName", publicCertificateName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncRepositorySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -65648,7 +64954,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) @@ -65699,7 +65005,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 @@ -65744,10 +65050,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Syncs function trigger metadata to the management database + /// Gets the publishing profile for an app (or deployment slot, if specified). /// /// - /// Description for Syncs function trigger metadata to the management database + /// Description for Gets the publishing profile for an app (or deployment slot, + /// if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -65755,8 +65062,13 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Specifies publishingProfileOptions for publishing profile. For example, use + /// {"format": "FileZilla3"} to get a FileZilla publishing profile. + /// /// - /// Name of the deployment slot. + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the publishing profile for the production slot. /// /// /// Headers that will be added to request. @@ -65767,6 +65079,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 /// @@ -65776,7 +65091,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -65801,6 +65116,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (publishingProfileOptions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); + } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -65822,13 +65141,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggersSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecretsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -65876,6 +65196,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(publishingProfileOptions != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -65888,7 +65214,7 @@ internal WebAppsOperations(WebSiteManagementClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -65896,7 +65222,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -65926,13 +65252,18 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -65941,20 +65272,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List triggered web jobs for an app, or a deployment slot. + /// Resets the configuration settings of the current slot if they were + /// previously modified by calling the API with POST. /// /// - /// Description for List triggered web jobs for an app, or a deployment slot. + /// Description for Resets the configuration settings of the current slot if + /// they were previously modified by calling the API with POST. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API resets + /// configuration settings for the production slot. /// /// /// Headers that will be added to request. @@ -65965,9 +65298,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 /// @@ -65977,7 +65307,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ResetSlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66025,11 +65355,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ResetSlotConfigurationSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -66046,7 +65376,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) @@ -66127,31 +65457,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); @@ -66160,24 +65472,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. + /// Restarts an app (or deployment slot, if specified). /// /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. + /// Description for Restarts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Name of Web Job. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// restart the production slot. + /// + /// + /// Specify true to apply the configuration settings and restarts the app only + /// if necessary. By default, the API always restarts and reprovisions the app. + /// + /// + /// Specify true to block until the app is restarted. By default, it is set to + /// false, and the API responds immediately (asynchronous). /// /// /// Headers that will be added to request. @@ -66188,9 +65504,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 /// @@ -66200,7 +65513,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RestartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66225,10 +65538,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -66250,20 +65559,28 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); + tracingParameters.Add("softRestart", softRestart); + tracingParameters.Add("synchronous", synchronous); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RestartSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (softRestart != null) + { + _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); + } + if (synchronous != null) + { + _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, Client.SerializationSettings).Trim('"')))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -66275,7 +65592,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) @@ -66326,7 +65643,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 @@ -66356,31 +65673,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); @@ -66389,24 +65688,118 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. + /// Restores an app from a backup blob in Azure Storage. /// /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. + /// Description for Restores an app from a backup blob in Azure Storage. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// Information on restore request . /// /// - /// Name of the deployment slot. If a slot is not specified, the API deletes - /// web job for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// restore a backup of the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a deleted web app to this web app. + /// + /// + /// Description for Restores a deleted web app to this web app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Deleted web app restore information. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a web app from a snapshot. + /// + /// + /// Description for Restores a web app from a snapshot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get list of siteextensions for a web site, or a deployment slot. + /// + /// + /// Description for Get list of siteextensions for a web site, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -66417,6 +65810,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 /// @@ -66426,7 +65822,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteExtensionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66451,10 +65847,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -66476,17 +65868,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -66501,7 +65891,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) @@ -66552,7 +65942,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 @@ -66582,13 +65972,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); @@ -66597,11 +66005,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List a triggered web job's history for an app, or a deployment slot. + /// Get site extension information by its ID for a web site, or a deployment + /// slot. /// /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. + /// Description for Get site extension information by its ID for a web site, or + /// a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -66609,8 +66018,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of Web Job. + /// + /// Site extension name. /// /// /// Name of the deployment slot. If a slot is not specified, the API uses the @@ -66637,7 +66046,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66662,9 +66071,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (siteExtensionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (slot == null) { @@ -66687,17 +66096,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistorySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtensionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").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("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -66793,7 +66202,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")) @@ -66806,7 +66215,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) { @@ -66826,12 +66235,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. + /// Install site extension on a web site, or a deployment slot. /// /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. + /// Description for Install site extension on a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -66839,17 +66246,47 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of Web Job. - /// - /// - /// History ID. + /// + /// Site extension name. /// /// /// Name of the deployment slot. If a slot is not specified, the API uses the /// production slot. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> InstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginInstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Remove a site extension from a web site, or a deployment slot. + /// + /// + /// Description for Remove a site extension from a web site, or a deployment + /// slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Site extension name. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. + /// + /// /// Headers that will be added to request. /// /// @@ -66858,9 +66295,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 /// @@ -66870,7 +66304,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -66895,13 +66329,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (id == null) + if (siteExtensionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (slot == null) { @@ -66924,19 +66354,17 @@ 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("siteExtensionId", siteExtensionId); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistorySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtensionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").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("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -66951,7 +66379,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) @@ -67002,7 +66430,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -67032,31 +66460,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); @@ -67065,23 +66475,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Run a triggered web job for an app, or a deployment slot. + /// Get the difference in configuration settings between two web app slots. /// /// - /// Description for Run a triggered web job for an app, or a deployment slot. + /// Description for Get the difference in configuration settings between two + /// web app slots. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// JSON object that contains the target slot name. See example. /// /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// Name of the source slot. If a slot is not specified, the production slot is + /// used as the source slot. /// /// /// Headers that will be added to request. @@ -67092,6 +66503,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 /// @@ -67101,7 +66515,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RunTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotDifferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67126,9 +66540,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (slotSwapEntity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); } if (slot == null) { @@ -67151,17 +66569,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -67207,6 +66624,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -67227,7 +66650,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 @@ -67257,13 +66680,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); @@ -67272,12 +66713,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). + /// Swaps two deployment slots of an app. /// /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). + /// Description for Swaps two deployment slots of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -67285,15 +66724,40 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// JSON object that contains the target slot name. See example. + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// quota information of the production slot. + /// Name of the source slot. If a slot is not specified, the production slot is + /// used as the source slot. /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task SwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns all Snapshots to the user. + /// + /// + /// Description for Returns all Snapshots to the user. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Website Name. + /// + /// + /// Website Slot. /// /// /// Headers that will be added to request. @@ -67316,7 +66780,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListUsagesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSnapshotsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67363,22 +66827,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsagesSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -67471,7 +66930,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")) @@ -67484,7 +66943,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) { @@ -67504,21 +66963,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the virtual networks the app (or deployment slot) is connected to. + /// Returns all Snapshots to the user from DRSecondary endpoint. /// /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. + /// Description for Returns all Snapshots to the user from DRSecondary + /// endpoint. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Website Name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// virtual network connections for the production slot. + /// Website Slot. /// /// /// Headers that will be added to request. @@ -67541,7 +66999,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>> ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67589,11 +67047,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnectionsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondarySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -67691,7 +67149,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")) @@ -67704,7 +67162,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) { @@ -67724,12 +67182,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. + /// Gets the source control configuration of an app. /// /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. + /// Description for Gets the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -67737,12 +67193,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the virtual network. - /// /// /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named virtual network for the production slot. + /// the source control configuration for the production slot. /// /// /// Headers that will be added to request. @@ -67765,7 +67218,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> GetSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -67790,10 +67243,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -67815,17 +67264,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -67891,7 +67338,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -67921,7 +67368,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")) @@ -67934,7 +67381,43 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -67954,12 +67437,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Updates the source control configuration of an app. /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -67967,15 +67448,43 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of an existing Virtual Network. + /// + /// JSON representation of a SiteSourceControl object. See example. /// - /// - /// Properties of the Virtual Network connection. See example. + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the source control configuration for the production slot. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the source control configuration of an app. + /// + /// + /// Description for Deletes the source control configuration of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the source control configuration for the production slot. + /// + /// /// /// /// Headers that will be added to request. @@ -67986,9 +67495,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 /// @@ -67998,7 +67504,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 DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68023,14 +67529,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -68052,21 +67550,23 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); + tracingParameters.Add("additionalFlags", additionalFlags); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (additionalFlags != null) + { + _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -68078,7 +67578,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -68109,12 +67609,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -68135,7 +67629,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -68165,31 +67659,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); @@ -68198,12 +67674,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. + /// Updates the source control configuration of an app. /// /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -68211,12 +67685,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the virtual network. + /// + /// JSON representation of a SiteSourceControl object. See example. /// /// /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. + /// update the source control configuration for the production slot. /// /// /// Headers that will be added to request. @@ -68227,6 +67701,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 /// @@ -68236,7 +67713,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68261,9 +67738,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) + if (siteSourceControl == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); } if (slot == null) { @@ -68286,17 +67763,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControlSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -68311,7 +67787,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("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -68342,6 +67818,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -68362,7 +67844,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 != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -68392,13 +67874,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -68407,12 +67943,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Starts an app (or deployment slot, if specified). /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Starts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -68420,15 +67954,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API will start + /// the production slot. /// /// /// Headers that will be added to request. @@ -68439,9 +67967,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 /// @@ -68451,7 +67976,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 StartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68476,14 +68001,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -68505,18 +68022,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StartSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -68531,7 +68045,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -68562,12 +68076,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -68618,31 +68126,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); @@ -68651,26 +68141,57 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets an app's Virtual Network gateway. + /// Start capturing network packets for the site. /// /// - /// Description for Gets an app's Virtual Network gateway. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// Name of the Virtual Network. + /// + /// The name of the slot for this web app. /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> StartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginStartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops an app (or deployment slot, if specified). + /// + /// + /// Description for Stops an app (or deployment slot, if specified). + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. + /// Name of the deployment slot. If a slot is not specified, the API will stop + /// the production slot. /// /// /// Headers that will be added to request. @@ -68681,9 +68202,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 /// @@ -68693,7 +68211,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68718,14 +68236,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -68747,19 +68257,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGatewaySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -68774,7 +68280,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) @@ -68825,7 +68331,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 @@ -68855,31 +68361,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); @@ -68888,30 +68376,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + /// Stop ongoing capturing network packets for the site. /// /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). + /// Description for Stop ongoing capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. + /// The name of the web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. + /// The name of the slot for this web app. /// /// /// Headers that will be added to request. @@ -68922,9 +68399,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 /// @@ -68934,7 +68408,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -68959,22 +68433,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -68996,20 +68454,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGatewaySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTraceSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -69024,7 +68477,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) @@ -69055,12 +68508,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -69081,7 +68528,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 @@ -69111,31 +68558,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); @@ -69144,30 +68573,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + /// Sync web app repository. /// /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). + /// Description for Sync web app repository. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. + /// Name of web app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. + /// Name of web app slot. If not specified then will default to production + /// slot. /// /// /// Headers that will be added to request. @@ -69178,9 +68597,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 /// @@ -69190,7 +68606,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncRepositorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69215,18 +68631,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -69248,20 +68652,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGatewaySlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncRepositorySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -69276,7 +68675,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -69307,12 +68706,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -69363,31 +68756,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); @@ -69396,20 +68771,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List webjobs for an app, or a deployment slot. + /// Syncs function trigger metadata to the management database /// /// - /// Description for List webjobs for an app, or a deployment slot. + /// Description for Syncs function trigger metadata to the management database /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. /// /// /// Headers that will be added to request. @@ -69420,9 +68794,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 /// @@ -69432,7 +68803,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69480,11 +68851,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("name", name); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebJobsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggersSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); @@ -69501,7 +68872,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) @@ -69552,7 +68923,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -69582,31 +68953,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); @@ -69615,10 +68968,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get webjob information for an app, or a deployment slot. + /// List triggered web jobs for an app, or a deployment slot. /// /// - /// Description for Get webjob information for an app, or a deployment slot. + /// Description for List triggered web jobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -69626,12 +68979,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of the web job. - /// /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. + /// Name of the deployment slot. If a slot is not specified, the API deletes a + /// deployment for the production slot. /// /// /// Headers that will be added to request. @@ -69654,7 +69004,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69679,10 +69029,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (slot == null) { throw new ValidationException(ValidationRules.CannotBeNull, "slot"); @@ -69704,17 +69050,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebJobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -69810,7 +69154,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")) @@ -69823,7 +69167,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) { @@ -69843,20 +69187,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get the difference in configuration settings between two web app slots. + /// Gets a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for Get the difference in configuration settings between two - /// web app slots. + /// Description for Gets a triggered web job by its ID for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// Name of Web Job. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -69879,7 +69227,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotDifferencesFromProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -69904,13 +69252,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } - if (slotSwapEntity != null) + if (slot == null) { - slotSwapEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -69929,15 +69277,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesFromProduction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -69951,7 +69302,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) @@ -69982,12 +69333,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -70008,7 +69353,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 @@ -70038,7 +69383,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")) @@ -70051,7 +69396,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) { @@ -70071,44 +69416,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Delete a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Delete a triggered web job by its ID for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. + /// Site name. /// - public async Task SwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// Name of Web Job. /// - /// - /// Website Name. + /// + /// Name of the deployment slot. If a slot is not specified, the API deletes + /// web job for the production slot. /// /// /// Headers that will be added to request. @@ -70119,9 +69444,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 /// @@ -70131,7 +69453,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70156,6 +69478,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -70173,14 +69503,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshots", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -70194,7 +69528,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) @@ -70245,7 +69579,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 @@ -70275,31 +69609,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); @@ -70308,17 +69624,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Returns all Snapshots to the user from DRSecondary endpoint. + /// List a triggered web job's history for an app, or a deployment slot. /// /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. + /// Description for List a triggered web job's history for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Website Name. + /// Site name. + /// + /// + /// Name of Web Job. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -70341,7 +69664,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70366,6 +69689,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -70383,14 +69714,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondary", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistorySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -70455,7 +69790,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 @@ -70485,7 +69820,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")) @@ -70498,7 +69833,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) { @@ -70518,16 +69853,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the source control configuration of an app. + /// Gets a triggered web job's history by its ID for an app, , or a deployment + /// slot. /// /// - /// Description for Gets the source control configuration of an app. + /// Description for Gets a triggered web job's history by its ID for an app, , + /// or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// Name of Web Job. + /// + /// + /// History ID. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -70550,7 +69897,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70575,6 +69922,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -70592,14 +69951,20 @@ 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("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistorySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -70664,7 +70029,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -70694,7 +70059,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")) @@ -70707,43 +70072,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -70763,44 +70092,23 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Run a triggered web job for an app, or a deployment slot. /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Run a triggered web job for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. + /// Site name. /// - public async Task> CreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// Name of Web Job. /// - /// - /// Name of the app. + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. /// /// /// Headers that will be added to request. @@ -70820,7 +70128,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RunTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -70845,6 +70153,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -70862,14 +70178,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -70883,7 +70203,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) @@ -70934,7 +70254,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -70979,10 +70299,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Gets the quota usage information of an app (or deployment slot, if + /// specified). /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Gets the quota usage information of an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -70990,8 +70312,15 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteSourceControl object. See example. + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// quota information of the production slot. + /// + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and + /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and + /// timeGrain eq duration'[Hour|Minute|Day]'. /// /// /// Headers that will be added to request. @@ -71014,7 +70343,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListUsagesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71039,9 +70368,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -71060,21 +70389,27 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("slot", slot); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListUsagesSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -71082,7 +70417,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) @@ -71113,12 +70448,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -71139,7 +70468,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -71169,7 +70498,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")) @@ -71182,43 +70511,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -71238,10 +70531,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Starts an app (or deployment slot, if specified). + /// Gets the virtual networks the app (or deployment slot) is connected to. /// /// - /// Description for Starts an app (or deployment slot, if specified). + /// Description for Gets the virtual networks the app (or deployment slot) is + /// connected to. /// /// /// Name of the resource group to which the resource belongs. @@ -71249,6 +70543,10 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// virtual network connections for the production slot. + /// /// /// Headers that will be added to request. /// @@ -71258,6 +70556,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 /// @@ -71267,7 +70568,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StartWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71292,6 +70593,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -71309,14 +70614,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Start", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnectionsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -71330,7 +70637,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) @@ -71411,13 +70718,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); @@ -71426,50 +70751,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Gets a virtual network the app (or deployment slot) is connected to by + /// name. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Gets a virtual network the app (or deployment slot) is + /// connected to by name. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. + /// Name of the app. /// - public async Task>> StartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. + /// + /// Name of the virtual network. /// - /// - /// Name of the app. + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the named virtual network for the production slot. /// /// /// Headers that will be added to request. @@ -71480,6 +70780,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 /// @@ -71489,7 +70792,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71514,6 +70817,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -71531,14 +70842,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Stop", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -71552,7 +70867,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) @@ -71633,13 +70948,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); @@ -71648,16 +70981,28 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Stop ongoing capturing network packets for the site. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Stop ongoing capturing network packets for the site. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of the app. + /// + /// + /// Name of an existing Virtual Network. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. /// /// /// Headers that will be added to request. @@ -71668,6 +71013,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 /// @@ -71677,7 +71025,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task StopNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71702,6 +71050,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -71719,14 +71079,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTrace", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -71740,7 +71105,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) @@ -71771,6 +71136,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -71791,7 +71162,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 @@ -71821,13 +71192,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); @@ -71836,16 +71225,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Sync web app repository. + /// Deletes a connection from an app (or deployment slot to a named virtual + /// network. /// /// - /// Description for Sync web app repository. + /// Description for Deletes a connection from an app (or deployment slot to a + /// named virtual network. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. + /// + /// + /// Name of the virtual network. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the connection for the production slot. /// /// /// Headers that will be added to request. @@ -71865,7 +71263,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncRepositoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -71890,6 +71288,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -71907,14 +71313,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncRepository", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -71928,7 +71338,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) @@ -71979,7 +71389,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 @@ -72024,10 +71434,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Syncs function trigger metadata to the management database + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Syncs function trigger metadata to the management database + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -72035,6 +71447,16 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// + /// + /// Name of an existing Virtual Network. + /// + /// + /// Properties of the Virtual Network connection. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update connections for the production slot. + /// /// /// Headers that will be added to request. /// @@ -72044,6 +71466,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 /// @@ -72053,7 +71478,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task SyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72078,6 +71503,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -72095,14 +71532,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggers", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -72116,7 +71558,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -72147,6 +71589,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -72167,7 +71615,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -72197,13 +71645,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); @@ -72212,16 +71678,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List triggered web jobs for an app, or a deployment slot. + /// Gets an app's Virtual Network gateway. /// /// - /// Description for List triggered web jobs for an app, or a deployment slot. + /// Description for Gets an app's Virtual Network gateway. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. + /// + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will get a + /// gateway for the production slot's Virtual Network. /// /// /// Headers that will be added to request. @@ -72244,7 +71720,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72269,6 +71745,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -72286,14 +71774,20 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobs", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGatewaySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -72358,7 +71852,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 @@ -72388,7 +71882,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")) @@ -72401,7 +71895,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) { @@ -72421,20 +71915,30 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. + /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). /// /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. + /// Description for Adds a gateway to a connected Virtual Network (PUT) or + /// updates it (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// The properties to update this gateway with. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update a gateway for the production slot's Virtual Network. /// /// /// Headers that will be added to request. @@ -72457,7 +71961,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72482,9 +71986,25 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (vnetName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (connectionEnvelope != null) + { + connectionEnvelope.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -72503,16 +72023,21 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGatewaySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -72526,7 +72051,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) @@ -72557,6 +72082,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -72577,7 +72108,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 @@ -72607,7 +72138,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")) @@ -72620,7 +72151,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) { @@ -72640,20 +72171,30 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. + /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). /// /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. + /// Description for Adds a gateway to a connected Virtual Network (PUT) or + /// updates it (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// The properties to update this gateway with. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will add + /// or update a gateway for the production slot's Virtual Network. /// /// /// Headers that will be added to request. @@ -72664,6 +72205,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 /// @@ -72673,7 +72217,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72698,9 +72242,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (vnetName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -72719,16 +72275,21 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGatewaySlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").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("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -72742,7 +72303,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("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -72773,6 +72334,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -72793,7 +72360,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 @@ -72823,13 +72390,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); @@ -72838,11 +72423,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List a triggered web job's history for an app, or a deployment slot. + /// List webjobs for an app, or a deployment slot. /// /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. + /// Description for List webjobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -72850,8 +72434,9 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of Web Job. + /// + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -72874,7 +72459,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -72899,9 +72484,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -72920,16 +72505,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistory", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWebJobsSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -72994,7 +72579,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 @@ -73024,7 +72609,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")) @@ -73037,7 +72622,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) { @@ -73057,12 +72642,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. + /// Get webjob information for an app, or a deployment slot. /// /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. + /// Description for Get webjob information for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -73071,10 +72654,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// Site name. /// /// - /// Name of Web Job. + /// Name of the web job. /// - /// - /// History ID. + /// + /// Name of the deployment slot. If a slot is not specified, the API returns + /// deployments for the production slot. /// /// /// Headers that will be added to request. @@ -73097,7 +72681,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73126,9 +72710,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } - if (id == null) + if (slot == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -73148,17 +72732,17 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("id", id); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistory", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebJobSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -73223,7 +72807,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 @@ -73253,7 +72837,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")) @@ -73266,7 +72850,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) { @@ -73286,19 +72870,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Run a triggered web job for an app, or a deployment slot. + /// Get the difference in configuration settings between two web app slots. /// /// - /// Description for Run a triggered web job for an app, or a deployment slot. + /// Description for Get the difference in configuration settings between two + /// web app slots. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Name of Web Job. + /// + /// JSON object that contains the target slot name. See example. /// /// /// Headers that will be added to request. @@ -73309,6 +72894,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 /// @@ -73318,7 +72906,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RunTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotDifferencesFromProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73343,9 +72931,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) + if (slotSwapEntity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); } if (Client.SubscriptionId == null) { @@ -73364,16 +72956,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesFromProduction", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -73418,6 +73009,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -73438,7 +73035,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 @@ -73468,13 +73065,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); @@ -73483,12 +73098,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). + /// Swaps two deployment slots of an app. /// /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). + /// Description for Swaps two deployment slots of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -73496,11 +73109,33 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. + /// + /// JSON object that contains the target slot name. See example. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task SwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns all Snapshots to the user. + /// + /// + /// Description for Returns all Snapshots to the user. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Website Name. /// /// /// Headers that will be added to request. @@ -73523,7 +73158,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSnapshotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73565,21 +73200,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsages", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshots", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -73672,7 +73302,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")) @@ -73685,7 +73315,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) { @@ -73705,17 +73335,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the virtual networks the app (or deployment slot) is connected to. + /// Returns all Snapshots to the user from DRSecondary endpoint. /// /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. + /// Description for Returns all Snapshots to the user from DRSecondary + /// endpoint. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Website Name. /// /// /// Headers that will be added to request. @@ -73738,7 +73368,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>> ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73781,11 +73411,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnections", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondary", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -73882,7 +73512,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")) @@ -73895,7 +73525,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) { @@ -73915,12 +73545,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. + /// Gets the source control configuration of an app. /// /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. + /// Description for Gets the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -73928,9 +73556,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the virtual network. - /// /// /// Headers that will be added to request. /// @@ -73952,7 +73577,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> GetSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -73977,10 +73602,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -73998,16 +73619,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -74072,7 +73691,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -74102,7 +73721,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")) @@ -74115,7 +73734,43 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -74135,12 +73790,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Updates the source control configuration of an app. /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -74148,11 +73801,35 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of an existing Virtual Network. + /// + /// JSON representation of a SiteSourceControl object. See example. /// - /// - /// Properties of the Virtual Network connection. See example. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the source control configuration of an app. + /// + /// + /// Description for Deletes the source control configuration of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// /// /// /// Headers that will be added to request. @@ -74163,9 +73840,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 /// @@ -74175,7 +73849,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 DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74200,14 +73874,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -74225,19 +73891,21 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); + tracingParameters.Add("additionalFlags", additionalFlags); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControl", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (additionalFlags != null) + { + _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -74249,7 +73917,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -74280,12 +73948,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -74306,7 +73968,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -74336,31 +73998,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); @@ -74369,12 +74013,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. + /// Updates the source control configuration of an app. /// /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. + /// Description for Updates the source control configuration of an app. /// /// /// Name of the resource group to which the resource belongs. @@ -74382,8 +74024,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of the virtual network. + /// + /// JSON representation of a SiteSourceControl object. See example. /// /// /// Headers that will be added to request. @@ -74394,6 +74036,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 /// @@ -74403,7 +74048,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74428,9 +74073,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) + if (siteSourceControl == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); } if (Client.SubscriptionId == null) { @@ -74449,16 +74094,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("siteSourceControl", siteSourceControl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -74472,7 +74116,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("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -74503,6 +74147,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -74523,7 +74173,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 != 201 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -74553,13 +74203,67 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -74568,12 +74272,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). + /// Starts an app (or deployment slot, if specified). /// /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). + /// Description for Starts an app (or deployment slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -74581,12 +74283,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// /// /// Headers that will be added to request. /// @@ -74596,9 +74292,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 /// @@ -74608,7 +74301,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 StartWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74633,14 +74326,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -74658,17 +74343,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Start", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -74682,7 +74364,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -74713,12 +74395,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -74769,31 +74445,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); @@ -74802,22 +74460,50 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets an app's Virtual Network gateway. + /// Start capturing network packets for the site. /// /// - /// Description for Gets an app's Virtual Network gateway. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// The name of the web app. /// - /// - /// Name of the Virtual Network. + /// + /// The duration to keep capturing in seconds. /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task>> StartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse> _response = await BeginStartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops an app (or deployment slot, if specified). + /// + /// + /// Description for Stops an app (or deployment slot, if specified). + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. /// /// /// Headers that will be added to request. @@ -74828,9 +74514,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 /// @@ -74840,7 +74523,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -74865,14 +74548,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -74890,18 +74565,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGateway", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Stop", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -74915,7 +74586,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) @@ -74966,7 +74637,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 @@ -74996,31 +74667,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); @@ -75029,26 +74682,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + /// Stop ongoing capturing network packets for the site. /// /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). + /// Description for Stop ongoing capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. + /// The name of the web app. /// /// /// Headers that will be added to request. @@ -75059,9 +74702,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 /// @@ -75071,7 +74711,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task StopNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75096,22 +74736,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -75129,19 +74753,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGateway", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTrace", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -75155,7 +74774,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) @@ -75186,12 +74805,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -75212,7 +74825,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 @@ -75242,31 +74855,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); @@ -75275,26 +74870,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + /// Sync web app repository. /// /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). + /// Description for Sync web app repository. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. + /// Name of web app. /// /// /// Headers that will be added to request. @@ -75305,9 +74890,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 /// @@ -75317,7 +74899,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncRepositoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75342,18 +74924,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -75371,19 +74941,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGateway", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncRepository", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -75397,7 +74962,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("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -75428,12 +74993,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -75484,31 +75043,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); @@ -75517,16 +75058,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List webjobs for an app, or a deployment slot. + /// Syncs function trigger metadata to the management database /// /// - /// Description for List webjobs for an app, or a deployment slot. + /// Description for Syncs function trigger metadata to the management database /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -75537,9 +75078,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 /// @@ -75549,7 +75087,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75592,11 +75130,11 @@ internal WebAppsOperations(WebSiteManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebJobs", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggers", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -75612,7 +75150,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) @@ -75663,7 +75201,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -75693,31 +75231,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); @@ -75726,10 +75246,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get webjob information for an app, or a deployment slot. + /// List triggered web jobs for an app, or a deployment slot. /// /// - /// Description for Get webjob information for an app, or a deployment slot. + /// Description for List triggered web jobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -75737,9 +75257,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Name of the web job. - /// /// /// Headers that will be added to request. /// @@ -75761,7 +75278,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -75786,10 +75303,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -75807,16 +75320,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobs", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -75911,7 +75422,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")) @@ -75924,7 +75435,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) { @@ -75944,22 +75455,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. + /// Gets a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. + /// Description for Gets a triggered web job by its ID for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. + /// Site name. /// - /// - /// A JSON representation of the app properties. See example. + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -75982,7 +75491,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76007,13 +75516,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (siteEnvelope != null) + if (webJobName == null) { - siteEnvelope.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -76032,15 +75537,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -76054,7 +75560,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) @@ -76085,12 +75591,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -76111,7 +75611,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -76141,7 +75641,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")) @@ -76154,25 +75654,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -76192,24 +75674,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). + /// Delete a triggered web job by its ID for an app, or a deployment slot. /// /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). + /// Description for Delete a triggered web job by its ID for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// ID of the backup. + /// Site name. /// - /// - /// Information on restore request . + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -76229,7 +75707,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76254,17 +75732,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) + if (webJobName == null) { - request.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -76283,17 +75753,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestore", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); + _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) @@ -76307,7 +75776,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) @@ -76338,12 +75807,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) { @@ -76364,7 +75827,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -76409,16 +75872,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an app. + /// List a triggered web job's history for an app, or a deployment slot. /// /// - /// Description for Gets the Git/FTP publishing credentials of an app. + /// Description for List a triggered web job's history for an app, or a + /// deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Site name. + /// + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -76441,7 +75908,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76466,6 +75933,10 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (webJobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -76483,14 +75954,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentials", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistory", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -76504,7 +75977,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) @@ -76555,7 +76028,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 @@ -76585,7 +76058,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")) @@ -76598,7 +76071,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) { @@ -76618,19 +76091,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Gets a triggered web job's history by its ID for an app, , or a deployment + /// slot. /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Gets a triggered web job's history by its ID for an app, , + /// or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Site name. /// - /// - /// Details of MSDeploy operation + /// + /// Name of Web Job. + /// + /// + /// History ID. /// /// /// Headers that will be added to request. @@ -76653,7 +76131,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76678,9 +76156,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (mSDeploy == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); + } + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); } if (Client.SubscriptionId == null) { @@ -76699,15 +76181,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("webJobName", webJobName); + tracingParameters.Add("id", id); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistory", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -76721,7 +76206,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) @@ -76752,12 +76237,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -76778,7 +76257,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -76808,7 +76287,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")) @@ -76816,12 +76295,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -76841,10 +76320,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create function for web site, or a deployment slot. + /// Run a triggered web job for an app, or a deployment slot. /// /// - /// Description for Create function for web site, or a deployment slot. + /// Description for Run a triggered web job for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. @@ -76852,11 +76331,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Site name. /// - /// - /// Function name. - /// - /// - /// Function details. + /// + /// Name of Web Job. /// /// /// Headers that will be added to request. @@ -76867,9 +76343,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 /// @@ -76879,7 +76352,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task RunTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -76904,13 +76377,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (functionEnvelope == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -76929,17 +76398,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("functionEnvelope", functionEnvelope); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateFunction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _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) @@ -76953,7 +76421,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) @@ -76984,12 +76452,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(functionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -77010,7 +76472,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -77040,31 +76502,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 == 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); @@ -77073,22 +76517,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Gets the quota usage information of an app (or deployment slot, if + /// specified). /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Gets the quota usage information of an app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. - /// - /// - /// ID of web app instance. + /// Name of the app. /// - /// - /// Details of MSDeploy operation + /// + /// Return only information specified in the filter (using OData syntax). For + /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and + /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and + /// timeGrain eq duration'[Hour|Minute|Day]'. /// /// /// Headers that will be added to request. @@ -77111,7 +76557,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77136,14 +76582,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77161,23 +76599,25 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("filter", filter); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListUsages", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", filter)); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -77185,7 +76625,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) @@ -77216,12 +76656,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -77242,7 +76676,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -77272,7 +76706,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")) @@ -77280,12 +76714,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -77305,22 +76739,17 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app. + /// Gets the virtual networks the app (or deployment slot) is connected to. /// /// - /// Description for Restores a web app. + /// Description for Gets the virtual networks the app (or deployment slot) is + /// connected to. /// - /// - /// Azure subscription. - /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -77343,12 +76772,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginMigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (subscriptionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionName"); - } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -77372,14 +76797,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (migrationOptions == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationOptions"); - } - if (migrationOptions != null) - { - migrationOptions.Validate(); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77395,24 +76812,18 @@ internal WebAppsOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("subscriptionName", subscriptionName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("migrationOptions", migrationOptions); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateStorage", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnections", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (subscriptionName != null) - { - _queryParameters.Add(string.Format("subscriptionName={0}", System.Uri.EscapeDataString(subscriptionName))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -77424,7 +76835,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) @@ -77455,12 +76866,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(migrationOptions != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationOptions, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -77511,7 +76916,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")) @@ -77524,7 +76929,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) { @@ -77544,20 +76949,21 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Migrates a local (in-app) MySql database to a remote MySql database. + /// Gets a virtual network the app (or deployment slot) is connected to by + /// name. /// /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. + /// Description for Gets a virtual network the app (or deployment slot) is + /// connected to by name. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// MySql migration options. + /// + /// Name of the virtual network. /// /// /// Headers that will be added to request. @@ -77580,7 +76986,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginMigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77605,13 +77011,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (migrationRequestEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationRequestEnvelope"); - } - if (migrationRequestEnvelope != null) + if (vnetName == null) { - migrationRequestEnvelope.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } if (Client.SubscriptionId == null) { @@ -77630,15 +77032,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("migrationRequestEnvelope", migrationRequestEnvelope); + tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateMySql", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -77652,7 +77055,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) @@ -77683,12 +77086,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(migrationRequestEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationRequestEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -77739,7 +77136,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")) @@ -77752,7 +77149,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) { @@ -77772,25 +77169,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Start capturing network packets for the site. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. + /// Name of the app. /// - /// - /// The maximum frame length in bytes (Optional). + /// + /// Name of an existing Virtual Network. /// - /// - /// The Blob URL to store capture file. + /// + /// Properties of the Virtual Network connection. See example. /// /// /// Headers that will be added to request. @@ -77813,7 +77209,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -77838,6 +77234,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -77855,31 +77259,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -77891,7 +77283,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) @@ -77922,6 +77314,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -77942,7 +77340,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -77972,7 +77370,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")) @@ -77985,25 +77383,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -78023,10 +77403,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. + /// Deletes a connection from an app (or deployment slot to a named virtual + /// network. /// /// - /// Description for Restores an app from a backup blob in Azure Storage. + /// Description for Deletes a connection from an app (or deployment slot to a + /// named virtual network. /// /// /// Name of the resource group to which the resource belongs. @@ -78034,8 +77416,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// Information on restore request . + /// + /// Name of the virtual network. /// /// /// Headers that will be added to request. @@ -78055,7 +77437,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78080,13 +77462,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) + if (vnetName == null) { - request.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } if (Client.SubscriptionId == null) { @@ -78105,15 +77483,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); + tracingParameters.Add("vnetName", vnetName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78127,7 +77506,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) @@ -78158,12 +77537,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) { @@ -78184,7 +77557,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -78229,19 +77602,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a deleted web app to this web app. + /// Adds a Virtual Network connection to an app or slot (PUT) or updates the + /// connection properties (PATCH). /// /// - /// Description for Restores a deleted web app to this web app. + /// Description for Adds a Virtual Network connection to an app or slot (PUT) + /// or updates the connection properties (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Deleted web app restore information. + /// + /// Name of an existing Virtual Network. + /// + /// + /// Properties of the Virtual Network connection. See example. /// /// /// Headers that will be added to request. @@ -78252,6 +77630,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 /// @@ -78261,7 +77642,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfo connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78286,9 +77667,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (restoreRequest == null) + if (vnetName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -78307,15 +77692,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedApp", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78329,7 +77716,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -78360,9 +77747,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(restoreRequest != null) + if(connectionEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -78386,7 +77773,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -78416,13 +77803,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); @@ -78431,20 +77836,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app from a snapshot. + /// Gets an app's Virtual Network gateway. /// /// - /// Description for Restores a web app from a snapshot. + /// Description for Gets an app's Virtual Network gateway. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". /// /// /// Headers that will be added to request. @@ -78455,6 +77862,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 /// @@ -78464,7 +77874,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78489,13 +77899,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (restoreRequest == null) + if (vnetName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); } - if (restoreRequest != null) + if (gatewayName == null) { - restoreRequest.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } if (Client.SubscriptionId == null) { @@ -78514,15 +77924,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGateway", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78536,7 +77949,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) @@ -78567,12 +77980,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(restoreRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -78593,7 +78000,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 404) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -78623,13 +78030,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); @@ -78638,19 +78063,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. + /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). /// /// - /// Description for Install site extension on a web site, or a deployment slot. + /// Description for Adds a gateway to a connected Virtual Network (PUT) or + /// updates it (PATCH). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the app. /// - /// - /// Site extension name. + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// The properties to update this gateway with. /// /// /// Headers that will be added to request. @@ -78673,7 +78105,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78698,9 +78130,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) + if (vnetName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (connectionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); + } + if (connectionEnvelope != null) + { + connectionEnvelope.Validate(); } if (Client.SubscriptionId == null) { @@ -78719,16 +78163,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtension", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGateway", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78773,6 +78220,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(connectionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -78793,7 +78246,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -78823,7 +78276,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")) @@ -78836,25 +78289,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -78874,11 +78309,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Copies a deployment slot to another deployment slot of an app. + /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). /// /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. + /// Description for Adds a gateway to a connected Virtual Network (PUT) or + /// updates it (PATCH). /// /// /// Name of the resource group to which the resource belongs. @@ -78886,9 +78321,14 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. + /// + /// Name of the Virtual Network. + /// + /// + /// Name of the gateway. Currently, the only supported string is "primary". + /// + /// + /// The properties to update this gateway with. /// /// /// Headers that will be added to request. @@ -78899,6 +78339,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 /// @@ -78908,7 +78351,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginCopyProductionSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -78933,13 +78376,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (copySlotEntity == null) + if (vnetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); + } + if (gatewayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "copySlotEntity"); + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - if (copySlotEntity != null) + if (connectionEnvelope == null) { - copySlotEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); } if (Client.SubscriptionId == null) { @@ -78958,15 +78405,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("copySlotEntity", copySlotEntity); + tracingParameters.Add("vnetName", vnetName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionEnvelope", connectionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCopyProductionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGateway", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -78980,7 +78431,7 @@ internal WebAppsOperations(WebSiteManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -79011,9 +78462,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(copySlotEntity != null) + if(connectionEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(copySlotEntity, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -79037,7 +78488,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79067,13 +78518,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); @@ -79082,26 +78551,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. + /// List webjobs for an app, or a deployment slot. /// /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. + /// Description for List webjobs for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. + /// Site name. /// /// /// Headers that will be added to request. @@ -79124,7 +78583,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79149,18 +78608,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (siteEnvelope != null) - { - siteEnvelope.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -79178,17 +78625,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListWebJobs", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79202,7 +78646,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) @@ -79233,12 +78677,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -79259,7 +78697,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79289,7 +78727,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")) @@ -79302,25 +78740,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -79340,28 +78760,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). + /// Get webjob information for an app, or a deployment slot. /// /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). + /// Description for Get webjob information for an app, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . + /// Site name. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. + /// + /// Name of the web job. /// /// /// Headers that will be added to request. @@ -79372,6 +78783,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 /// @@ -79381,7 +78795,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79406,21 +78820,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) + if (webJobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); } if (Client.SubscriptionId == null) { @@ -79439,19 +78841,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); + tracingParameters.Add("webJobName", webJobName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetWebJob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79465,7 +78864,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) @@ -79496,12 +78895,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) { @@ -79522,7 +78915,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79552,13 +78945,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); @@ -79567,20 +78978,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets the Git/FTP publishing credentials of an app. + /// Creates a new web, mobile, or API app in an existing resource group, or + /// updates an existing app. /// /// - /// Description for Gets the Git/FTP publishing credentials of an app. + /// Description for Creates a new web, mobile, or API app in an existing + /// resource group, or updates an existing app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Unique name of the app to create or update. To create or update a + /// deployment slot, use the {slot} parameter. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. + /// + /// A JSON representation of the app properties. See example. /// /// /// Headers that will be added to request. @@ -79603,7 +79016,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79628,9 +79041,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (siteEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); + } + if (siteEnvelope != null) + { + siteEnvelope.Validate(); } if (Client.SubscriptionId == null) { @@ -79649,16 +79066,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); + tracingParameters.Add("siteEnvelope", siteEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentialsSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79672,7 +79088,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) @@ -79703,6 +79119,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(siteEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -79723,7 +79145,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79753,7 +79175,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")) @@ -79766,7 +79188,25 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -79786,23 +79226,24 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Invoke the MSDeploy web app extension. + /// Restores a specific backup to another app (or deployment slot, if + /// specified). /// /// - /// Description for Invoke the MSDeploy web app extension. + /// Description for Restores a specific backup to another app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the app. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// + /// ID of the backup. /// - /// - /// Details of MSDeploy operation + /// + /// Information on restore request . /// /// /// Headers that will be added to request. @@ -79813,9 +79254,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 /// @@ -79825,7 +79263,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -79850,13 +79288,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (backupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); } - if (mSDeploy == null) + if (request == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); } if (Client.SubscriptionId == null) { @@ -79875,17 +79317,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("backupId", backupId); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestore", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -79899,7 +79341,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) @@ -79930,9 +79372,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(mSDeploy != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -79956,7 +79398,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -79986,31 +79428,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 == 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); @@ -80019,25 +79443,16 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Create function for web site, or a deployment slot. + /// Gets the Git/FTP publishing credentials of an app. /// /// - /// Description for Create function for web site, or a deployment slot. + /// Description for Gets the Git/FTP publishing credentials of an app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. + /// Name of the app. /// /// /// Headers that will be added to request. @@ -80060,7 +79475,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -80085,18 +79500,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (functionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -80114,19 +79517,14 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("functionEnvelope", functionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceFunctionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentials", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -80140,7 +79538,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) @@ -80171,12 +79569,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(functionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -80197,7 +79589,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -80227,7 +79619,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")) @@ -80235,12 +79627,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -80271,13 +79663,6 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of web app. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// /// /// Details of MSDeploy operation /// @@ -80302,7 +79687,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -80327,14 +79712,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } if (mSDeploy == null) { throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); @@ -80356,19 +79733,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -80502,28 +79875,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Create function for web site, or a deployment slot. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Create function for web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. + /// Site name. /// - /// - /// The maximum frame length in bytes (Optional). + /// + /// Function name. /// - /// - /// The Blob URL to store capture file. + /// + /// Function details. /// /// /// Headers that will be added to request. @@ -80546,7 +79913,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -80571,9 +79938,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (functionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } + if (functionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); } if (Client.SubscriptionId == null) { @@ -80592,33 +79963,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("functionName", functionName); + tracingParameters.Add("functionEnvelope", functionEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperationSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateFunction", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -80630,7 +79987,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) @@ -80661,6 +80018,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(functionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -80681,7 +80044,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 201) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -80711,7 +80074,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")) @@ -80719,30 +80082,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) + if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -80762,20 +80107,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Approves or rejects a private endpoint connection + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Approves or rejects a private endpoint connection + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// Name of web app. /// - /// + /// + /// ID of web app instance. /// - /// + /// + /// Details of MSDeploy operation /// /// /// Headers that will be added to request. @@ -80798,7 +80145,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -80823,13 +80170,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (privateEndpointConnectionName == null) + if (instanceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); } - if (privateEndpointWrapper == null) + if (mSDeploy == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); } if (Client.SubscriptionId == null) { @@ -80848,17 +80195,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("mSDeploy", mSDeploy); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -80903,9 +80250,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(privateEndpointWrapper != null) + if(mSDeploy != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -80929,7 +80276,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 201 && (int)_statusCode != 409) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -80959,7 +80306,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")) @@ -80967,30 +80314,12 @@ internal WebAppsOperations(WebSiteManagementClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) + if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81010,18 +80339,22 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Deletes a private endpoint connection + /// Restores a web app. /// /// - /// Description for Deletes a private endpoint connection + /// Description for Restores a web app. /// + /// + /// Azure subscription. + /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the site. + /// Name of web app. /// - /// + /// + /// Migration migrationOptions. /// /// /// Headers that will be added to request. @@ -81044,8 +80377,12 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginMigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (subscriptionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionName"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -81069,9 +80406,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (privateEndpointConnectionName == null) + if (migrationOptions == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new ValidationException(ValidationRules.CannotBeNull, "migrationOptions"); + } + if (migrationOptions != null) + { + migrationOptions.Validate(); } if (Client.SubscriptionId == null) { @@ -81088,20 +80429,24 @@ internal WebAppsOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("subscriptionName", subscriptionName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("migrationOptions", migrationOptions); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateStorage", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (subscriptionName != null) + { + _queryParameters.Add(string.Format("subscriptionName={0}", System.Uri.EscapeDataString(subscriptionName))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -81113,7 +80458,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) @@ -81144,6 +80489,12 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; + if(migrationOptions != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationOptions, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -81164,7 +80515,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -81194,7 +80545,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")) @@ -81207,43 +80558,7 @@ internal WebAppsOperations(WebSiteManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -81263,23 +80578,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores an app from a backup blob in Azure Storage. + /// Migrates a local (in-app) MySql database to a remote MySql database. /// /// - /// Description for Restores an app from a backup blob in Azure Storage. + /// Description for Migrates a local (in-app) MySql database to a remote MySql + /// database. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// Information on restore request . + /// Name of web app. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. + /// + /// MySql migration options. /// /// /// Headers that will be added to request. @@ -81290,6 +80602,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 /// @@ -81299,7 +80614,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginMigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81324,17 +80639,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) + if (migrationRequestEnvelope == null) { - request.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "migrationRequestEnvelope"); } - if (slot == null) + if (migrationRequestEnvelope != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + migrationRequestEnvelope.Validate(); } if (Client.SubscriptionId == null) { @@ -81353,17 +80664,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); + tracingParameters.Add("migrationRequestEnvelope", migrationRequestEnvelope); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlobSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateMySql", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -81408,9 +80717,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(request != null) + if(migrationRequestEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationRequestEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -81434,7 +80743,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -81464,13 +80773,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); @@ -81479,23 +80806,25 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a deleted web app to this web app. + /// Start capturing network packets for the site. /// /// - /// Description for Restores a deleted web app to this web app. + /// Description for Start capturing network packets for the site. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// The name of the web app. /// - /// - /// Deleted web app restore information. + /// + /// The duration to keep capturing in seconds. /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. /// /// /// Headers that will be added to request. @@ -81506,6 +80835,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 /// @@ -81515,7 +80847,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81540,14 +80872,6 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (restoreRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -81565,19 +80889,31 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); - tracingParameters.Add("slot", slot); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedAppSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -81620,12 +80956,6 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(restoreRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -81676,13 +81006,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -81691,24 +81057,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Restores a web app from a snapshot. + /// Approves or rejects a private endpoint connection /// /// - /// Description for Restores a web app from a snapshot. + /// Description for Approves or rejects a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of web app. + /// Name of the site. /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. + /// /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. + /// /// /// /// Headers that will be added to request. @@ -81719,6 +81081,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 /// @@ -81728,7 +81093,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginRestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81753,17 +81118,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (restoreRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); - } - if (restoreRequest != null) + if (privateEndpointConnectionName == null) { - restoreRequest.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - if (slot == null) + if (privateEndpointWrapper == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); } if (Client.SubscriptionId == null) { @@ -81782,17 +81143,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); - tracingParameters.Add("slot", slot); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -81806,7 +81167,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) @@ -81837,9 +81198,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(restoreRequest != null) + if(privateEndpointWrapper != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -81893,13 +81254,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -81908,23 +81305,18 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Install site extension on a web site, or a deployment slot. + /// Deletes a private endpoint connection /// /// - /// Description for Install site extension on a web site, or a deployment slot. + /// Description for Deletes a private endpoint connection /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Site name. - /// - /// - /// Site extension name. + /// Name of the site. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. + /// /// /// /// Headers that will be added to request. @@ -81947,7 +81339,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -81972,13 +81364,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (slot == null) + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } if (Client.SubscriptionId == null) { @@ -81997,18 +81385,16 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("slot", slot); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtensionSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -82022,7 +81408,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("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -82073,7 +81459,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -82103,7 +81489,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")) @@ -82116,7 +81502,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) { @@ -82129,12 +81515,30 @@ internal WebAppsOperations(WebSiteManagementClient client) } } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 202) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -82154,11 +81558,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Copies a deployment slot to another deployment slot of an app. + /// Restores an app from a backup blob in Azure Storage. /// /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. + /// Description for Restores an app from a backup blob in Azure Storage. /// /// /// Name of the resource group to which the resource belongs. @@ -82166,13 +81569,8 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. + /// + /// Information on restore request . /// /// /// Headers that will be added to request. @@ -82192,7 +81590,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginCopySlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82217,17 +81615,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (copySlotEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "copySlotEntity"); - } - if (copySlotEntity != null) + if (request == null) { - copySlotEntity.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "request"); } - if (slot == null) + if (request != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + request.Validate(); } if (Client.SubscriptionId == null) { @@ -82246,17 +81640,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("copySlotEntity", copySlotEntity); - tracingParameters.Add("slot", slot); + tracingParameters.Add("request", request); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCopySlotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlob", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -82301,9 +81693,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(copySlotEntity != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(copySlotEntity, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -82372,23 +81764,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Restores a deleted web app to this web app. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Restores a deleted web app to this web app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. + /// Name of web app. /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. + /// + /// Deleted web app restore information. /// /// /// Headers that will be added to request. @@ -82408,7 +81796,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginSwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82433,17 +81821,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (slot == null) + if (restoreRequest == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); } if (Client.SubscriptionId == null) { @@ -82462,17 +81842,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("slot", slot); + tracingParameters.Add("restoreRequest", restoreRequest); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedApp", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -82517,9 +81895,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) + if(restoreRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -82588,23 +81966,20 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Restores a web app from a snapshot. /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Restores a web app from a snapshot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. + /// Name of web app. /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. /// /// /// Headers that will be added to request. @@ -82615,9 +81990,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 /// @@ -82627,7 +81999,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82652,13 +82024,13 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) + if (restoreRequest == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); } - if (slot == null) + if (restoreRequest != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + restoreRequest.Validate(); } if (Client.SubscriptionId == null) { @@ -82677,17 +82049,15 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); - tracingParameters.Add("slot", slot); + tracingParameters.Add("restoreRequest", restoreRequest); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControlSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -82701,7 +82071,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) @@ -82732,9 +82102,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) + if(restoreRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -82758,7 +82128,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -82788,67 +82158,13 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -82857,28 +82173,19 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Install site extension on a web site, or a deployment slot. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Install site extension on a web site, or a deployment slot. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). + /// Site name. /// - /// - /// The Blob URL to store capture file. + /// + /// Site extension name. /// /// /// Headers that will be added to request. @@ -82901,7 +82208,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -82926,9 +82233,9 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slot == null) + if (siteExtensionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); } if (Client.SubscriptionId == null) { @@ -82947,33 +82254,18 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("siteExtensionId", siteExtensionId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTraceSlot", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtension", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -82985,7 +82277,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) @@ -83036,7 +82328,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83066,7 +82358,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")) @@ -83079,7 +82371,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) { @@ -83092,12 +82384,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } } // Deserialize Response - if ((int)_statusCode == 202) + if ((int)_statusCode == 201) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -83117,19 +82409,26 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Swaps two deployment slots of an app. + /// Creates a new web, mobile, or API app in an existing resource group, or + /// updates an existing app. /// /// - /// Description for Swaps two deployment slots of an app. + /// Description for Creates a new web, mobile, or API app in an existing + /// resource group, or updates an existing app. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// Name of the app. + /// Unique name of the app to create or update. To create or update a + /// deployment slot, use the {slot} parameter. /// - /// - /// JSON object that contains the target slot name. See example. + /// + /// A JSON representation of the app properties. See example. + /// + /// + /// Name of the deployment slot to create or update. By default, this API + /// attempts to create or modify the production slot. /// /// /// Headers that will be added to request. @@ -83140,6 +82439,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 /// @@ -83149,7 +82451,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginSwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -83174,13 +82476,17 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (slotSwapEntity == null) + if (siteEnvelope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); } - if (slotSwapEntity != null) + if (siteEnvelope != null) { - slotSwapEntity.Validate(); + siteEnvelope.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -83199,15 +82505,17 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("siteEnvelope", siteEnvelope); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotWithProduction", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -83221,7 +82529,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) @@ -83252,9 +82560,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(slotSwapEntity != null) + if(siteEnvelope != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -83308,13 +82616,49 @@ internal WebAppsOperations(WebSiteManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -83323,10 +82667,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Updates the source control configuration of an app. + /// Restores a specific backup to another app (or deployment slot, if + /// specified). /// /// - /// Description for Updates the source control configuration of an app. + /// Description for Restores a specific backup to another app (or deployment + /// slot, if specified). /// /// /// Name of the resource group to which the resource belongs. @@ -83334,8 +82680,15 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// Name of the app. /// - /// - /// JSON representation of a SiteSourceControl object. See example. + /// + /// ID of the backup. + /// + /// + /// Information on restore request . + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// restore a backup of the production slot. /// /// /// Headers that will be added to request. @@ -83346,9 +82699,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 /// @@ -83358,7 +82708,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -83383,9 +82733,21 @@ internal WebAppsOperations(WebSiteManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - if (siteSourceControl == null) + if (backupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); } if (Client.SubscriptionId == null) { @@ -83404,15 +82766,19 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("backupId", backupId); + tracingParameters.Add("request", request); + tracingParameters.Add("slot", slot); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControl", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSlot", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) @@ -83426,7 +82792,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) @@ -83457,9 +82823,9 @@ internal WebAppsOperations(WebSiteManagementClient client) // Serialize Request string _requestContent = null; - if(siteSourceControl != null) + if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -83483,7 +82849,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83513,56 +82879,221 @@ 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) + if (_shouldTrace) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the Git/FTP publishing credentials of an 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. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the publishing credentials for the production slot. + /// + /// + /// Headers that will be added to request. + /// + /// + /// 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> BeginListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); } - catch (JsonException ex) + if (resourceGroupName.Length < 1) { - _httpRequest.Dispose(); - if (_httpResponse != null) + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentialsSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _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)) { - _httpResponse.Dispose(); + _httpRequest.Headers.Remove(_header.Key); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Deserialize Response - if ((int)_statusCode == 201) + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + 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 { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) { - _httpResponse.Dispose(); + ex.Body = _errorBody; } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } + 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 == 202) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -83582,25 +83113,4543 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Start capturing network packets for the site. + /// Invoke the MSDeploy web app extension. /// /// - /// Description for Start capturing network packets for the site. + /// Description for Invoke the MSDeploy web app extension. /// /// /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. + /// Name of web app. /// - /// - /// The duration to keep capturing in seconds. + /// + /// Name of web app slot. If not specified then will default to production + /// slot. /// - /// - /// The maximum frame length in bytes (Optional). + /// + /// Details of MSDeploy operation /// - /// - /// The Blob URL to store capture file. + /// + /// 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> BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (mSDeploy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("slot", slot); + tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperationSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{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(mSDeploy != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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 != 201 && (int)_statusCode != 409) + { + 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 == 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; + } + + /// + /// Create function for web site, or a deployment slot. + /// + /// + /// Description for Create function for web site, or a deployment slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Function name. + /// + /// + /// Name of the deployment slot. + /// + /// + /// Function details. + /// + /// + /// 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> BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, 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 (functionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (functionEnvelope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); + } + 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("functionName", functionName); + tracingParameters.Add("slot", slot); + tracingParameters.Add("functionEnvelope", functionEnvelope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceFunctionSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{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(functionEnvelope != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // 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 != 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 == 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; + } + + /// + /// Invoke the MSDeploy 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. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// ID of web app instance. + /// + /// + /// Details of MSDeploy 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> BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (instanceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); + } + if (mSDeploy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("slot", slot); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("mSDeploy", mSDeploy); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperationSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (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(mSDeploy != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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 != 201 && (int)_statusCode != 409) + { + 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 == 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; + } + + /// + /// Start capturing network packets for the site. + /// + /// + /// Description for Start capturing network packets for the site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. + /// + /// + /// The name of the slot for this web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// 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>> BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("slot", slot); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperationSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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> BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (privateEndpointWrapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + 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("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnectionSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (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(privateEndpointWrapper != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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) + { + 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 == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// 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> BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnectionSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + 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(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Restores an app from a backup blob in Azure Storage. + /// + /// + /// Description for Restores an app from a backup blob in Azure Storage. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Information on restore request . + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// restore a backup of the production slot. + /// + /// + /// 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 BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("request", request); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlobSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _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; + 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) + { + 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) + { + 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; + } + + /// + /// Restores a deleted web app to this web app. + /// + /// + /// Description for Restores a deleted web app to this web app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Deleted web app restore information. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// 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 BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (restoreRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("restoreRequest", restoreRequest); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedAppSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _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; + if(restoreRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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) + { + 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; + } + + /// + /// Restores a web app from a snapshot. + /// + /// + /// Description for Restores a web app from a snapshot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of web app. + /// + /// + /// Snapshot restore settings. Snapshot information can be obtained by calling + /// GetDeletedSites or GetSiteSnapshots API. + /// + /// + /// Name of web app slot. If not specified then will default to production + /// slot. + /// + /// + /// 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 BeginRestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (restoreRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); + } + if (restoreRequest != null) + { + restoreRequest.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("restoreRequest", restoreRequest); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshotSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(restoreRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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) + { + 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; + } + + /// + /// Install site extension on a web site, or a deployment slot. + /// + /// + /// Description for Install site extension on a web site, or a deployment slot. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// Site extension name. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API uses the + /// production slot. + /// + /// + /// 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> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (siteExtensionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("siteExtensionId", siteExtensionId); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtensionSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + 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 != 201 && (int)_statusCode != 429) + { + 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; + } + + /// + /// Swaps two deployment slots of an app. + /// + /// + /// Description for Swaps two deployment slots of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// JSON object that contains the target slot name. See example. + /// + /// + /// Name of the source slot. If a slot is not specified, the production slot is + /// used as the source slot. + /// + /// + /// 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 BeginSwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slotSwapEntity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _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; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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) + { + 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; + } + + /// + /// Updates the source control configuration of an app. + /// + /// + /// Description for Updates the source control configuration of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// JSON representation of a SiteSourceControl object. See example. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the source control configuration for the production slot. + /// + /// + /// 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> BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (siteSourceControl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("slot", slot); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControlSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Start capturing network packets for the site. + /// + /// + /// Description for Start capturing network packets for the site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. + /// + /// + /// The name of the slot for this web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// Headers that will be added to request. + /// + /// + /// 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>> BeginStartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (slot == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slot"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("durationInSeconds", durationInSeconds); + tracingParameters.Add("slot", slot); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTraceSlot", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Swaps two deployment slots of an app. + /// + /// + /// Description for Swaps two deployment slots of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// JSON object that contains the target slot name. See example. + /// + /// + /// 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 BeginSwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, 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 (slotSwapEntity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); + } + if (slotSwapEntity != null) + { + slotSwapEntity.Validate(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + 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("slotSwapEntity", slotSwapEntity); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotWithProduction", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + 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; + if(slotSwapEntity != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + 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) + { + 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; + } + + /// + /// Updates the source control configuration of an app. + /// + /// + /// Description for Updates the source control configuration of an app. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// JSON representation of a SiteSourceControl object. See example. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); + } + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (siteSourceControl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("name", name); + tracingParameters.Add("siteSourceControl", siteSourceControl); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControl", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(siteSourceControl != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Start capturing network packets for the site. + /// + /// + /// Description for Start capturing network packets for the site. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. + /// + /// + /// The duration to keep capturing in seconds. + /// + /// + /// The maximum frame length in bytes (Optional). + /// + /// + /// The Blob URL to store capture file. + /// + /// + /// Headers that will be added to request. + /// + /// + /// 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>> BeginStartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + 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("durationInSeconds", durationInSeconds); + tracingParameters.Add("maxFrameLength", maxFrameLength); + tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTrace", 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}/startNetworkTrace").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (durationInSeconds != null) + { + _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); + } + if (maxFrameLength != null) + { + _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); + } + if (sasUrl != null) + { + _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get all apps for a subscription. + /// + /// + /// Description for Get all apps for a subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(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, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all web, mobile, and API apps in the specified resource group. + /// + /// + /// Description for Gets all web, mobile, and API apps in the specified + /// resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets existing backups of an app. + /// + /// + /// Description for Gets existing backups of an app. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBackupsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List the configurations of an app + /// + /// + /// Description for List the configurations of an app + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListConfigurationsNextWithHttpMessagesAsync(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, "ListConfigurationsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -83623,38 +87672,11 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> BeginStartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, 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) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -83663,37 +87685,14 @@ internal WebAppsOperations(WebSiteManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTrace", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferencesNext", 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}/startNetworkTrace").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)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -83701,7 +87700,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) @@ -83752,7 +87751,7 @@ internal WebAppsOperations(WebSiteManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -83782,7 +87781,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")) @@ -83795,7 +87794,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) { @@ -83807,13 +87806,166 @@ internal WebAppsOperations(WebSiteManagementClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(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, "GetSiteConnectionStringKeyVaultReferencesNext", 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 == 202) + if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -83833,10 +87985,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get all apps for a subscription. + /// 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 Get all apps for a subscription. + /// Description for Gets a list of web app configuration snapshots identifiers. + /// Each element of the list contains a timestamp and the ID of the snapshot. /// /// /// The NextLink from the previous successful call to List operation. @@ -83862,7 +88016,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -83877,7 +88031,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -83971,7 +88125,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")) @@ -83984,7 +88138,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) { @@ -84004,11 +88158,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all web, mobile, and API apps in the specified resource group. + /// List continuous web jobs for an app, or a deployment slot. /// /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. + /// Description for List continuous web jobs for an app, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -84034,7 +88187,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListContinuousWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -84049,7 +88202,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -84143,7 +88296,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")) @@ -84156,7 +88309,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) { @@ -84176,10 +88329,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// List deployments for an app, or a deployment slot. /// /// - /// Description for Gets existing backups of an app. + /// Description for List deployments for an app, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -84205,7 +88358,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDeploymentsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -84220,7 +88373,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -84314,7 +88467,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")) @@ -84327,7 +88480,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) { @@ -84347,10 +88500,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the configurations of an app + /// Lists ownership identifiers for domain associated with web app. /// /// - /// Description for List the configurations of an app + /// Description for Lists ownership identifiers for domain associated with web + /// app. /// /// /// The NextLink from the previous successful call to List operation. @@ -84376,7 +88530,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -84391,7 +88545,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -84485,7 +88639,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")) @@ -84498,7 +88652,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) { @@ -84518,12 +88672,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. + /// List the functions for a web site, or a deployment slot. /// /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. + /// Description for List the functions for a web site, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -84549,7 +88701,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -84564,7 +88716,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListFunctionsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -84628,7 +88780,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 @@ -84658,7 +88810,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")) @@ -84671,7 +88823,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) { @@ -84691,10 +88843,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List continuous web jobs for an app, or a deployment slot. + /// Get hostname bindings for an app or a deployment slot. /// /// - /// Description for List continuous web jobs for an app, or a deployment slot. + /// Description for Get hostname bindings for an app or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -84720,7 +88872,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListContinuousWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListHostNameBindingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -84735,7 +88887,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -84829,7 +88981,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")) @@ -84842,7 +88994,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) { @@ -84862,10 +89014,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployments for an app, or a deployment slot. + /// Gets all scale-out instances of an app. /// /// - /// Description for List deployments for an app, or a deployment slot. + /// Description for Gets all scale-out instances of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -84891,7 +89043,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDeploymentsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -84906,7 +89058,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -85000,7 +89152,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")) @@ -85013,7 +89165,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) { @@ -85033,11 +89185,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Lists ownership identifiers for domain associated with web app. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -85063,7 +89216,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -85078,7 +89231,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -85142,7 +89295,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 @@ -85172,7 +89325,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")) @@ -85185,7 +89338,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) { @@ -85205,10 +89358,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the functions for a web site, or a deployment slot. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for List the functions for a web site, or a deployment slot. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -85234,7 +89389,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -85249,7 +89404,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -85343,7 +89498,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")) @@ -85356,7 +89511,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) { @@ -85376,10 +89531,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get hostname bindings for an app or a deployment slot. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Get hostname bindings for an app or a deployment slot. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -85405,7 +89562,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListHostNameBindingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -85420,7 +89577,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -85484,7 +89641,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 @@ -85514,7 +89671,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")) @@ -85527,7 +89684,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) { @@ -85547,10 +89704,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// Gets existing backups of an app. /// /// - /// Description for Gets all scale-out instances of an app. + /// Description for Gets existing backups of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -85576,7 +89733,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -85591,7 +89748,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -85604,7 +89761,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) @@ -85685,7 +89842,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")) @@ -85698,7 +89855,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) { @@ -85718,12 +89875,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Gets perfmon counters for web app. /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Gets perfmon counters for web app. /// /// /// The NextLink from the previous successful call to List operation. @@ -85749,7 +89904,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPerfMonCountersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -85764,7 +89919,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -85828,7 +89983,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 @@ -85858,7 +90013,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")) @@ -85871,7 +90026,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) { @@ -85891,12 +90046,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The NextLink from the previous successful call to List operation. @@ -85922,7 +90076,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -85937,7 +90091,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -86001,7 +90155,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 @@ -86031,7 +90185,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")) @@ -86044,7 +90198,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) { @@ -86064,12 +90218,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -86095,7 +90249,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -86110,7 +90264,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -86204,7 +90358,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")) @@ -86217,7 +90371,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) { @@ -86237,10 +90391,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Gets existing backups of an app. + /// Description for List module information for a process by its ID for a + /// specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -86266,7 +90422,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -86281,7 +90437,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -86294,7 +90450,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) @@ -86345,7 +90501,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 @@ -86375,7 +90531,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")) @@ -86388,7 +90544,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) { @@ -86408,10 +90564,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets perfmon counters for web app. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for Gets perfmon counters for web app. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -86437,7 +90595,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPerfMonCountersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -86452,7 +90610,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -86516,7 +90674,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 @@ -86546,7 +90704,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")) @@ -86559,7 +90717,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) { @@ -86579,12 +90737,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Get public certificates for an app or a deployment slot. /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Get public certificates for an app or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -86610,7 +90766,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPublicCertificatesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -86625,7 +90781,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -86689,7 +90845,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 @@ -86719,7 +90875,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")) @@ -86732,7 +90888,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) { @@ -86752,12 +90908,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// Get list of siteextensions for a web site, or a deployment slot. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for Get list of siteextensions for a web site, or a deployment + /// slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -86783,7 +90938,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteExtensionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -86798,7 +90953,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -86892,7 +91047,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")) @@ -86905,7 +91060,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) { @@ -86925,12 +91080,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Gets an app's deployment slots. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets an app's deployment slots. /// /// /// The NextLink from the previous successful call to List operation. @@ -86956,7 +91109,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSlotsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -86971,7 +91124,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSlotsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87035,7 +91188,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 @@ -87065,7 +91218,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")) @@ -87078,7 +91231,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) { @@ -87098,10 +91251,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get public certificates for an app or a deployment slot. + /// Gets existing backups of an app. /// /// - /// Description for Get public certificates for an app or a deployment slot. + /// Description for Gets existing backups of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -87127,7 +91280,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPublicCertificatesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87142,7 +91295,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87236,7 +91389,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")) @@ -87249,7 +91402,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) { @@ -87269,11 +91422,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get list of siteextensions for a web site, or a deployment slot. + /// List the configurations of an app /// /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. + /// Description for List the configurations of an app /// /// /// The NextLink from the previous successful call to List operation. @@ -87299,7 +91451,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteExtensionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87314,7 +91466,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87378,7 +91530,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 @@ -87408,7 +91560,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")) @@ -87421,7 +91573,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) { @@ -87441,10 +91593,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets an app's deployment slots. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets an app's deployment slots. + /// Description for Gets the config reference app settings and status of an app /// /// /// The NextLink from the previous successful call to List operation. @@ -87470,7 +91622,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSlotsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetAppSettingsKeyVaultReferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87485,7 +91637,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferencesSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87579,7 +91731,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")) @@ -87592,7 +91744,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) { @@ -87612,10 +91764,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets existing backups of an app. + /// Description for Gets the config reference app settings and status of an app /// /// /// The NextLink from the previous successful call to List operation. @@ -87641,7 +91793,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetSiteConnectionStringKeyVaultReferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87656,7 +91808,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferencesSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87750,7 +91902,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")) @@ -87763,7 +91915,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) { @@ -87783,10 +91935,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the configurations of an app + /// Gets a list of web app configuration snapshots identifiers. Each element of + /// the list contains a timestamp and the ID of the snapshot. /// /// - /// Description for List the configurations of an app + /// Description for Gets a list of web app configuration snapshots identifiers. + /// Each element of the list contains a timestamp and the ID of the snapshot. /// /// /// The NextLink from the previous successful call to List operation. @@ -87812,7 +91966,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListConfigurationSnapshotInfoSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -87827,7 +91981,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -87921,7 +92075,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")) @@ -87934,7 +92088,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) { @@ -87954,12 +92108,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. + /// List continuous web jobs for an app, or a deployment slot. /// /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. + /// Description for List continuous web jobs for an app, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -87985,7 +92137,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListConfigurationSnapshotInfoSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListContinuousWebJobsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88000,7 +92152,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88094,7 +92246,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")) @@ -88107,7 +92259,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) { @@ -88127,10 +92279,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List continuous web jobs for an app, or a deployment slot. + /// List deployments for an app, or a deployment slot. /// /// - /// Description for List continuous web jobs for an app, or a deployment slot. + /// Description for List deployments for an app, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -88156,7 +92308,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListContinuousWebJobsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDeploymentsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88171,7 +92323,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88265,7 +92417,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")) @@ -88278,7 +92430,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) { @@ -88298,10 +92450,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List deployments for an app, or a deployment slot. + /// Lists ownership identifiers for domain associated with web app. /// /// - /// Description for List deployments for an app, or a deployment slot. + /// Description for Lists ownership identifiers for domain associated with web + /// app. /// /// /// The NextLink from the previous successful call to List operation. @@ -88327,7 +92480,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDeploymentsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListDomainOwnershipIdentifiersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88342,7 +92495,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88436,7 +92589,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")) @@ -88449,7 +92602,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) { @@ -88469,11 +92622,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Lists ownership identifiers for domain associated with web app. + /// List the functions for a web site, or a deployment slot. /// /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. + /// Description for List the functions for a web site, or a deployment slot. /// /// /// The NextLink from the previous successful call to List operation. @@ -88499,7 +92651,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListDomainOwnershipIdentifiersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceFunctionsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88514,7 +92666,178 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceFunctionsSlotNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _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 hostname bindings for an app or a deployment slot. + /// + /// + /// Description for Get hostname bindings for an app or a deployment slot. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListHostNameBindingsSlotNextWithHttpMessagesAsync(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, "ListHostNameBindingsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88608,7 +92931,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")) @@ -88621,7 +92944,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) { @@ -88641,10 +92964,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the functions for a web site, or a deployment slot. + /// Gets all scale-out instances of an app. /// /// - /// Description for List the functions for a web site, or a deployment slot. + /// Description for Gets all scale-out instances of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -88670,7 +92993,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceFunctionsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceIdentifiersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88685,7 +93008,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceFunctionsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88749,7 +93072,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 @@ -88779,7 +93102,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")) @@ -88792,7 +93115,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) { @@ -88812,10 +93135,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Get hostname bindings for an app or a deployment slot. + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. /// /// - /// Description for Get hostname bindings for an app or a deployment slot. + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -88841,7 +93166,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListHostNameBindingsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -88856,7 +93181,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -88920,7 +93245,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 @@ -88950,7 +93275,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")) @@ -88963,7 +93288,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) { @@ -88983,183 +93308,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets all scale-out instances of an app. + /// List module information for a process by its ID for a specific scaled-out + /// instance in a web site. /// /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// 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>> ListInstanceIdentifiersSlotNextWithHttpMessagesAsync(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, "ListInstanceIdentifiersSlotNext", 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 list of processes for a web site, or a deployment slot, or for a + /// Description for List module information for a process by its ID for a /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -89185,7 +93339,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessModulesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89200,7 +93354,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89294,7 +93448,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")) @@ -89307,7 +93461,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) { @@ -89327,12 +93481,12 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. + /// List the threads in a process by its ID for a specific scaled-out instance + /// in a web site. /// /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. + /// Description for List the threads in a process by its ID for a specific + /// scaled-out instance in a web site. /// /// /// The NextLink from the previous successful call to List operation. @@ -89358,7 +93512,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessModulesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInstanceProcessThreadsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89373,7 +93527,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89467,7 +93621,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")) @@ -89480,7 +93634,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) { @@ -89500,12 +93654,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. + /// Gets existing backups of an app. /// /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. + /// Description for Gets existing backups of an app. /// /// /// The NextLink from the previous successful call to List operation. @@ -89531,7 +93683,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInstanceProcessThreadsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSiteBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89546,7 +93698,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89559,7 +93711,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) @@ -89610,7 +93762,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 @@ -89640,7 +93792,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")) @@ -89653,7 +93805,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) { @@ -89673,10 +93825,10 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets existing backups of an app. + /// Gets perfmon counters for web app. /// /// - /// Description for Gets existing backups of an app. + /// Description for Gets perfmon counters for web app. /// /// /// The NextLink from the previous successful call to List operation. @@ -89702,7 +93854,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSiteBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListPerfMonCountersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89717,7 +93869,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89730,7 +93882,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) @@ -89811,7 +93963,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")) @@ -89824,7 +93976,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) { @@ -89844,10 +93996,11 @@ internal WebAppsOperations(WebSiteManagementClient client) } /// - /// Gets perfmon counters for web app. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Gets perfmon counters for web app. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The NextLink from the previous successful call to List operation. @@ -89873,7 +94026,7 @@ internal WebAppsOperations(WebSiteManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListPerfMonCountersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetPrivateEndpointConnectionListSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -89888,7 +94041,7 @@ internal WebAppsOperations(WebSiteManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlotNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListSlotNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -89982,7 +94135,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")) @@ -89995,7 +94148,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 b268e898aef2..b40763b12bb1 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs @@ -1603,6 +1603,200 @@ public static BackupRequest GetBackupConfiguration(this IWebAppsOperations opera } } + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + public static IPage GetAppSettingsKeyVaultReferences(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.GetAppSettingsKeyVaultReferencesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// 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> GetAppSettingsKeyVaultReferencesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the config reference and status of an app + /// + /// + /// Description for Gets the config reference and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// App Setting key name. + /// + public static ApiKVReference GetAppSettingKeyVaultReference(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey) + { + return operations.GetAppSettingKeyVaultReferenceAsync(resourceGroupName, name, appSettingKey).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference and status of an app + /// + /// + /// Description for Gets the config reference and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// App Setting key name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAppSettingKeyVaultReferenceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(resourceGroupName, name, appSettingKey, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + public static IPage GetSiteConnectionStringKeyVaultReferences(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.GetSiteConnectionStringKeyVaultReferencesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// 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> GetSiteConnectionStringKeyVaultReferencesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the config reference and status of an app + /// + /// + /// Description for Gets the config reference and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + public static ApiKVReference GetSiteConnectionStringKeyVaultReference(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey) + { + return operations.GetSiteConnectionStringKeyVaultReferenceAsync(resourceGroupName, name, connectionStringKey).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference and status of an app + /// + /// + /// Description for Gets the config reference and status of an app + /// + /// + /// 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 GetSiteConnectionStringKeyVaultReferenceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(resourceGroupName, name, connectionStringKey, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Replaces the connection strings of an app. /// @@ -6130,9 +6324,9 @@ public static SwiftVirtualNetwork GetSwiftVirtualNetworkConnection(this IWebApps /// /// Properties of the Virtual Network connection. See example. /// - public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnection(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope) + public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope) { - return operations.CreateOrUpdateSwiftVirtualNetworkConnectionAsync(resourceGroupName, name, connectionEnvelope).GetAwaiter().GetResult(); + return operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckAsync(resourceGroupName, name, connectionEnvelope).GetAwaiter().GetResult(); } /// @@ -6163,9 +6357,9 @@ public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnection(th /// /// The cancellation token. /// - public static async Task CreateOrUpdateSwiftVirtualNetworkConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -6218,72 +6412,6 @@ public static void DeleteSwiftVirtualNetwork(this IWebAppsOperations operations, (await operations.DeleteSwiftVirtualNetworkWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); } - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnection(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope) - { - return operations.UpdateSwiftVirtualNetworkConnectionAsync(resourceGroupName, name, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSwiftVirtualNetworkConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSwiftVirtualNetworkConnectionWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Gets all network features used by the app (or deployment slot, if /// specified). @@ -6302,7 +6430,7 @@ public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnection(this IWebA /// Name of the app. /// /// - /// The type of view. This can either be "summary" or "detailed". + /// The type of view. Only "summary" is supported at this time. /// public static NetworkFeatures ListNetworkFeatures(this IWebAppsOperations operations, string resourceGroupName, string name, string view) { @@ -6327,7 +6455,7 @@ public static NetworkFeatures ListNetworkFeatures(this IWebAppsOperations operat /// Name of the app. /// /// - /// The type of view. This can either be "summary" or "detailed". + /// The type of view. Only "summary" is supported at this time. /// /// /// The cancellation token. @@ -7258,12 +7386,11 @@ public static PrivateAccess PutPrivateAccessVnet(this IWebAppsOperations operati } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The operations group for this extension method. @@ -7272,20 +7399,19 @@ public static PrivateAccess PutPrivateAccessVnet(this IWebAppsOperations operati /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// - public static IPage ListProcesses(this IWebAppsOperations operations, string resourceGroupName, string name) + public static IPage GetPrivateEndpointConnectionList(this IWebAppsOperations operations, string resourceGroupName, string name) { - return operations.ListProcessesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.GetPrivateEndpointConnectionListAsync(resourceGroupName, name).GetAwaiter().GetResult(); } /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The operations group for this extension method. @@ -7294,26 +7420,24 @@ public static IPage ListProcesses(this IWebAppsOperations operation /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// /// /// The cancellation token. /// - public static async Task> ListProcessesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> GetPrivateEndpointConnectionListAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListProcessesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetPrivateEndpointConnectionListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Gets a private endpoint connection /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Gets a private endpoint connection /// /// /// The operations group for this extension method. @@ -7322,23 +7446,21 @@ public static IPage ListProcesses(this IWebAppsOperations operation /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. /// - /// - /// PID. + /// + /// Name of the private endpoint connection. /// - public static ProcessInfo GetProcess(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) + public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) { - return operations.GetProcessAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); + return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); } /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. + /// Gets a private endpoint connection /// /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. + /// Description for Gets a private endpoint connection /// /// /// The operations group for this extension method. @@ -7347,7 +7469,263 @@ public static ProcessInfo GetProcess(this IWebAppsOperations operations, string /// Name of the resource group to which the resource belongs. /// /// - /// Site name. + /// Name of the site. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + { + return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + public static object DeletePrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task DeletePrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Gets the private link resources + /// + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateLinkResourcesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. + /// + /// + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + public static IPage ListProcesses(this IWebAppsOperations operations, string resourceGroupName, string name) + { + return operations.ListProcessesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + } + + /// + /// Get list of processes for a web site, or a deployment slot, or for a + /// specific scaled-out instance in a web site. + /// + /// + /// Description for Get list of processes for a web site, or a deployment slot, + /// or for a specific scaled-out instance in a web site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListProcessesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListProcessesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. + /// + /// + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. + /// + /// + /// PID. + /// + public static ProcessInfo GetProcess(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) + { + return operations.GetProcessAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); + } + + /// + /// Get process information by its ID for a specific scaled-out instance in a + /// web site. + /// + /// + /// Description for Get process information by its ID for a specific scaled-out + /// instance in a web site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Site name. /// /// /// PID. @@ -8374,63 +8752,10 @@ public static void DeleteSiteExtension(this IWebAppsOperations operations, strin } /// - /// Copies a deployment slot to another deployment slot of an app. + /// Gets an app's deployment slots. /// /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - public static void CopyProductionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity) - { - operations.CopyProductionSlotAsync(resourceGroupName, name, copySlotEntity).GetAwaiter().GetResult(); - } - - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CopyProductionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CopyProductionSlotWithHttpMessagesAsync(resourceGroupName, name, copySlotEntity, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. + /// Description for Gets an app's deployment slots. /// /// /// The operations group for this extension method. @@ -8616,9 +8941,8 @@ public static Site CreateOrUpdateSlot(this IWebAppsOperations operations, string /// If true, web app metrics are also deleted. /// /// - /// Specify true if the App Service plan will be empty after app deletion and - /// you want to delete the empty App Service plan. By default, the empty App - /// Service plan is not deleted. + /// Specify false if you want to keep empty App Service plan. By default, empty + /// App Service plan is deleted. /// public static void DeleteSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?)) { @@ -8649,9 +8973,8 @@ public static Site CreateOrUpdateSlot(this IWebAppsOperations operations, string /// If true, web app metrics are also deleted. /// /// - /// Specify true if the App Service plan will be empty after app deletion and - /// you want to delete the empty App Service plan. By default, the empty App - /// Service plan is not deleted. + /// Specify false if you want to keep empty App Service plan. By default, empty + /// App Service plan is deleted. /// /// /// The cancellation token. @@ -9226,6 +9549,272 @@ public static void RestoreSlot(this IWebAppsOperations operations, string resour (await operations.RestoreSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + public static CsmPublishingCredentialsPoliciesCollection GetBasicPublishingCredentialsPoliciesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + { + return operations.GetBasicPublishingCredentialsPoliciesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + } + + /// + /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + /// given site. + /// + /// + /// Description for Returns whether Scm basic auth is allowed and whether Ftp + /// is allowed for a given site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task GetBasicPublishingCredentialsPoliciesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns whether FTP is allowed on the site or not. + /// + /// + /// Description for Returns whether FTP is allowed on the site or not. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + public static CsmPublishingCredentialsPoliciesEntity GetFtpAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + { + return operations.GetFtpAllowedSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + } + + /// + /// Returns whether FTP is allowed on the site or not. + /// + /// + /// Description for Returns whether FTP is allowed on the site or not. + /// + /// + /// 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 GetFtpAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFtpAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates whether FTP is allowed on the site or not. + /// + /// + /// Description for Updates whether FTP is allowed on the site or not. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + /// + /// + public static CsmPublishingCredentialsPoliciesEntity UpdateFtpAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot) + { + return operations.UpdateFtpAllowedSlotAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot).GetAwaiter().GetResult(); + } + + /// + /// Updates whether FTP is allowed on the site or not. + /// + /// + /// Description for Updates whether FTP is allowed on the site or not. + /// + /// + /// 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 UpdateFtpAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateFtpAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns whether Scm basic auth is allowed on the site or not. + /// + /// + /// Description for Returns whether Scm basic auth is allowed on the site or + /// not. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + public static CsmPublishingCredentialsPoliciesEntity GetScmAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + { + return operations.GetScmAllowedSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + } + + /// + /// Returns whether Scm basic auth is allowed on the site or not. + /// + /// + /// Description for Returns whether Scm basic auth is allowed on the site or + /// not. + /// + /// + /// 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 GetScmAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetScmAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates whether user publishing credentials are allowed on the site or not. + /// + /// + /// Description for Updates whether user publishing credentials are allowed on + /// the site or not. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// + /// + /// + public static CsmPublishingCredentialsPoliciesEntity UpdateScmAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot) + { + return operations.UpdateScmAllowedSlotAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot).GetAwaiter().GetResult(); + } + + /// + /// Updates whether user publishing credentials are allowed on the site or not. + /// + /// + /// Description for Updates whether user publishing credentials are allowed on + /// the site or not. + /// + /// + /// 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 UpdateScmAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateScmAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List the configurations of an app /// @@ -9695,10 +10284,229 @@ public static AzureStoragePropertyDictionaryResource UpdateAzureStorageAccountsS } /// - /// Gets the Azure storage account configurations of an app. + /// Gets the Azure storage account configurations of an app. + /// + /// + /// Description for Gets the Azure storage account configurations of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the Azure storage account configurations for the production slot. + /// + public static AzureStoragePropertyDictionaryResource ListAzureStorageAccountsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + { + return operations.ListAzureStorageAccountsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + } + + /// + /// Gets the Azure storage account configurations of an app. + /// + /// + /// Description for Gets the Azure storage account configurations of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the Azure storage account configurations for the production slot. + /// + /// + /// The cancellation token. + /// + public static async Task ListAzureStorageAccountsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAzureStorageAccountsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the backup configuration of an app. + /// + /// + /// Description for Updates the backup configuration of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Edited backup configuration. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the backup configuration for the production slot. + /// + public static BackupRequest UpdateBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot) + { + return operations.UpdateBackupConfigurationSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); + } + + /// + /// Updates the backup configuration of an app. + /// + /// + /// Description for Updates the backup configuration of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Edited backup configuration. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// update the backup configuration for the production slot. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the backup configuration of an app. + /// + /// + /// Description for Deletes the backup configuration of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the backup configuration for the production slot. + /// + public static void DeleteBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + { + operations.DeleteBackupConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + } + + /// + /// Deletes the backup configuration of an app. + /// + /// + /// Description for Deletes the backup configuration of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will + /// delete the backup configuration for the production slot. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the backup configuration of an app. + /// + /// + /// Description for Gets the backup configuration of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the backup configuration for the production slot. + /// + public static BackupRequest GetBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + { + return operations.GetBackupConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + } + + /// + /// Gets the backup configuration of an app. + /// + /// + /// Description for Gets the backup configuration of an app. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the app. + /// + /// + /// Name of the deployment slot. If a slot is not specified, the API will get + /// the backup configuration for the production slot. + /// + /// + /// The cancellation token. + /// + public static async Task GetBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets the Azure storage account configurations of an app. + /// Description for Gets the config reference app settings and status of an app /// /// /// The operations group for this extension method. @@ -9710,19 +10518,17 @@ public static AzureStoragePropertyDictionaryResource UpdateAzureStorageAccountsS /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. /// - public static AzureStoragePropertyDictionaryResource ListAzureStorageAccountsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + public static IPage GetAppSettingsKeyVaultReferencesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) { - return operations.ListAzureStorageAccountsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + return operations.GetAppSettingsKeyVaultReferencesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); } /// - /// Gets the Azure storage account configurations of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Gets the Azure storage account configurations of an app. + /// Description for Gets the config reference app settings and status of an app /// /// /// The operations group for this extension method. @@ -9734,25 +10540,23 @@ public static AzureStoragePropertyDictionaryResource ListAzureStorageAccountsSlo /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. /// /// /// The cancellation token. /// - public static async Task ListAzureStorageAccountsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> GetAppSettingsKeyVaultReferencesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListAzureStorageAccountsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetAppSettingsKeyVaultReferencesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Updates the backup configuration of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Updates the backup configuration of an app. + /// Description for Gets the config reference and status of an app /// /// /// The operations group for this extension method. @@ -9763,23 +10567,21 @@ public static AzureStoragePropertyDictionaryResource ListAzureStorageAccountsSlo /// /// Name of the app. /// - /// - /// Edited backup configuration. + /// + /// App Setting key name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the backup configuration for the production slot. /// - public static BackupRequest UpdateBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot) + public static ApiKVReference GetAppSettingKeyVaultReferenceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey, string slot) { - return operations.UpdateBackupConfigurationSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); + return operations.GetAppSettingKeyVaultReferenceSlotAsync(resourceGroupName, name, appSettingKey, slot).GetAwaiter().GetResult(); } /// - /// Updates the backup configuration of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Updates the backup configuration of an app. + /// Description for Gets the config reference and status of an app /// /// /// The operations group for this extension method. @@ -9790,29 +10592,27 @@ public static BackupRequest UpdateBackupConfigurationSlot(this IWebAppsOperation /// /// Name of the app. /// - /// - /// Edited backup configuration. + /// + /// App Setting key name. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the backup configuration for the production slot. /// /// /// The cancellation token. /// - public static async Task UpdateBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAppSettingKeyVaultReferenceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.UpdateBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetAppSettingKeyVaultReferenceSlotWithHttpMessagesAsync(resourceGroupName, name, appSettingKey, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes the backup configuration of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Deletes the backup configuration of an app. + /// Description for Gets the config reference app settings and status of an app /// /// /// The operations group for this extension method. @@ -9824,19 +10624,17 @@ public static BackupRequest UpdateBackupConfigurationSlot(this IWebAppsOperation /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the backup configuration for the production slot. /// - public static void DeleteBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + public static IPage GetSiteConnectionStringKeyVaultReferencesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) { - operations.DeleteBackupConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + return operations.GetSiteConnectionStringKeyVaultReferencesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); } /// - /// Deletes the backup configuration of an app. + /// Gets the config reference app settings and status of an app /// /// - /// Description for Deletes the backup configuration of an app. + /// Description for Gets the config reference app settings and status of an app /// /// /// The operations group for this extension method. @@ -9848,22 +10646,23 @@ public static void DeleteBackupConfigurationSlot(this IWebAppsOperations operati /// Name of the app. /// /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the backup configuration for the production slot. /// /// /// The cancellation token. /// - public static async Task DeleteBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> GetSiteConnectionStringKeyVaultReferencesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Gets the backup configuration of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Gets the backup configuration of an app. + /// Description for Gets the config reference and status of an app /// /// /// The operations group for this extension method. @@ -9874,20 +10673,20 @@ public static void DeleteBackupConfigurationSlot(this IWebAppsOperations operati /// /// Name of the app. /// + /// + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the backup configuration for the production slot. /// - public static BackupRequest GetBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + public static ApiKVReference GetSiteConnectionStringKeyVaultReferenceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey, string slot) { - return operations.GetBackupConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + return operations.GetSiteConnectionStringKeyVaultReferenceSlotAsync(resourceGroupName, name, connectionStringKey, slot).GetAwaiter().GetResult(); } /// - /// Gets the backup configuration of an app. + /// Gets the config reference and status of an app /// /// - /// Description for Gets the backup configuration of an app. + /// Description for Gets the config reference and status of an app /// /// /// The operations group for this extension method. @@ -9898,16 +10697,16 @@ public static BackupRequest GetBackupConfigurationSlot(this IWebAppsOperations o /// /// Name of the app. /// + /// + /// /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the backup configuration for the production slot. /// /// /// The cancellation token. /// - public static async Task GetBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetSiteConnectionStringKeyVaultReferenceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetSiteConnectionStringKeyVaultReferenceSlotWithHttpMessagesAsync(resourceGroupName, name, connectionStringKey, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -14805,80 +15604,6 @@ public static SwiftVirtualNetwork GetSwiftVirtualNetworkConnectionSlot(this IWeb } } - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot) - { - return operations.CreateOrUpdateSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateSwiftVirtualNetworkConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Deletes a Swift Virtual Network connection from an app (or deployment /// slot). @@ -14934,80 +15659,6 @@ public static void DeleteSwiftVirtualNetworkSlot(this IWebAppsOperations operati (await operations.DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); } - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot) - { - return operations.UpdateSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSwiftVirtualNetworkConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Gets all network features used by the app (or deployment slot, if /// specified). @@ -15026,7 +15677,7 @@ public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnectionSlot(this I /// Name of the app. /// /// - /// The type of view. This can either be "summary" or "detailed". + /// The type of view. Only "summary" is supported at this time. /// /// /// Name of the deployment slot. If a slot is not specified, the API will get @@ -15055,7 +15706,7 @@ public static NetworkFeatures ListNetworkFeaturesSlot(this IWebAppsOperations op /// Name of the app. /// /// - /// The type of view. This can either be "summary" or "detailed". + /// The type of view. Only "summary" is supported at this time. /// /// /// Name of the deployment slot. If a slot is not specified, the API will get @@ -16027,7 +16678,66 @@ public static PrivateAccess GetPrivateAccessSlot(this IWebAppsOperations operati /// Networks that can access the site. /// /// - /// Description for Gets data around private site access enablement and + /// Description for Gets data around private site access enablement and + /// authorized Virtual Networks that can access the site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. + /// + /// + /// The name of the slot for the web app. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateAccessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateAccessSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Sets data around private site access enablement and authorized Virtual + /// Networks that can access the site. + /// + /// + /// Description for Sets data around private site access enablement and + /// authorized Virtual Networks that can access the site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// The name of the web app. + /// + /// + /// The information for the private access + /// + /// + /// The name of the slot for the web app. + /// + public static PrivateAccess PutPrivateAccessVnetSlot(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, string slot) + { + return operations.PutPrivateAccessVnetSlotAsync(resourceGroupName, name, access, slot).GetAwaiter().GetResult(); + } + + /// + /// Sets data around private site access enablement and authorized Virtual + /// Networks that can access the site. + /// + /// + /// Description for Sets data around private site access enablement and /// authorized Virtual Networks that can access the site. /// /// @@ -16039,27 +16749,29 @@ public static PrivateAccess GetPrivateAccessSlot(this IWebAppsOperations operati /// /// The name of the web app. /// + /// + /// The information for the private access + /// /// /// The name of the slot for the web app. /// /// /// The cancellation token. /// - public static async Task GetPrivateAccessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PutPrivateAccessVnetSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetPrivateAccessSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PutPrivateAccessVnetSlotWithHttpMessagesAsync(resourceGroupName, name, access, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The operations group for this extension method. @@ -16068,26 +16780,22 @@ public static PrivateAccess GetPrivateAccessSlot(this IWebAppsOperations operati /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The information for the private access + /// Name of the site. /// /// - /// The name of the slot for the web app. + /// Name of the site deployment slot. /// - public static PrivateAccess PutPrivateAccessVnetSlot(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, string slot) + public static IPage GetPrivateEndpointConnectionListSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) { - return operations.PutPrivateAccessVnetSlotAsync(resourceGroupName, name, access, slot).GetAwaiter().GetResult(); + return operations.GetPrivateEndpointConnectionListSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); } /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. + /// Gets the list of private endpoint connections associated with a site /// /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. + /// Description for Gets the list of private endpoint connections associated + /// with a site /// /// /// The operations group for this extension method. @@ -16096,20 +16804,17 @@ public static PrivateAccess PutPrivateAccessVnetSlot(this IWebAppsOperations ope /// Name of the resource group to which the resource belongs. /// /// - /// The name of the web app. - /// - /// - /// The information for the private access + /// Name of the site. /// /// - /// The name of the slot for the web app. + /// Name of the site deployment slot. /// /// /// The cancellation token. /// - public static async Task PutPrivateAccessVnetSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> GetPrivateEndpointConnectionListSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PutPrivateAccessVnetSlotWithHttpMessagesAsync(resourceGroupName, name, access, slot, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -16131,10 +16836,14 @@ public static PrivateAccess PutPrivateAccessVnetSlot(this IWebAppsOperations ope /// Name of the site. /// /// + /// Name of the private endpoint connection. + /// + /// + /// Name of the site deployment slot. /// - public static PrivateEndpointConnectionResource GetPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot) { - return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + return operations.GetPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot).GetAwaiter().GetResult(); } /// @@ -16153,13 +16862,17 @@ public static PrivateEndpointConnectionResource GetPrivateEndpointConnection(thi /// Name of the site. /// /// + /// Name of the private endpoint connection. + /// + /// + /// Name of the site deployment slot. /// /// /// The cancellation token. /// - public static async Task GetPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetPrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -16184,9 +16897,11 @@ public static PrivateEndpointConnectionResource GetPrivateEndpointConnection(thi /// /// /// - public static PrivateEndpointConnectionResource ApproveOrRejectPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + /// + /// + public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot) { - return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + return operations.ApproveOrRejectPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot).GetAwaiter().GetResult(); } /// @@ -16208,12 +16923,14 @@ public static PrivateEndpointConnectionResource ApproveOrRejectPrivateEndpointCo /// /// /// + /// + /// /// /// The cancellation token. /// - public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -16236,9 +16953,11 @@ public static PrivateEndpointConnectionResource ApproveOrRejectPrivateEndpointCo /// /// /// - public static object DeletePrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + /// + /// + public static object DeletePrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot) { - return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + return operations.DeletePrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot).GetAwaiter().GetResult(); } /// @@ -16258,12 +16977,14 @@ public static object DeletePrivateEndpointConnection(this IWebAppsOperations ope /// /// /// + /// + /// /// /// The cancellation token. /// - public static async Task DeletePrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeletePrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -16284,9 +17005,11 @@ public static object DeletePrivateEndpointConnection(this IWebAppsOperations ope /// /// Name of the site. /// - public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IWebAppsOperations operations, string resourceGroupName, string name) + /// + /// + public static PrivateLinkResourcesWrapper GetPrivateLinkResourcesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) { - return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); + return operations.GetPrivateLinkResourcesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); } /// @@ -16304,12 +17027,14 @@ public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IWebAppsO /// /// Name of the site. /// + /// + /// /// /// The cancellation token. /// - public static async Task GetPrivateLinkResourcesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetPrivateLinkResourcesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetPrivateLinkResourcesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -17599,67 +18324,6 @@ public static void DeleteSiteExtensionSlot(this IWebAppsOperations operations, s (await operations.DeleteSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); } - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - public static void CopySlotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot) - { - operations.CopySlotSlotAsync(resourceGroupName, name, copySlotEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The cancellation token. - /// - public static async Task CopySlotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CopySlotSlotWithHttpMessagesAsync(resourceGroupName, name, copySlotEntity, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - /// /// Get the difference in configuration settings between two web app slots. /// @@ -18018,9 +18682,11 @@ public static SiteSourceControl CreateOrUpdateSourceControlSlot(this IWebAppsOpe /// Name of the deployment slot. If a slot is not specified, the API will /// delete the source control configuration for the production slot. /// - public static void DeleteSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) + /// + /// + public static void DeleteSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string additionalFlags = default(string)) { - operations.DeleteSourceControlSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); + operations.DeleteSourceControlSlotAsync(resourceGroupName, name, slot, additionalFlags).GetAwaiter().GetResult(); } /// @@ -18042,12 +18708,14 @@ public static void DeleteSourceControlSlot(this IWebAppsOperations operations, s /// Name of the deployment slot. If a slot is not specified, the API will /// delete the source control configuration for the production slot. /// + /// + /// /// /// The cancellation token. /// - public static async Task DeleteSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string additionalFlags = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, slot, additionalFlags, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -19824,9 +20492,11 @@ public static SiteSourceControl CreateOrUpdateSourceControl(this IWebAppsOperati /// /// Name of the app. /// - public static void DeleteSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name) + /// + /// + public static void DeleteSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name, string additionalFlags = default(string)) { - operations.DeleteSourceControlAsync(resourceGroupName, name).GetAwaiter().GetResult(); + operations.DeleteSourceControlAsync(resourceGroupName, name, additionalFlags).GetAwaiter().GetResult(); } /// @@ -19844,12 +20514,14 @@ public static void DeleteSourceControl(this IWebAppsOperations operations, strin /// /// Name of the app. /// + /// + /// /// /// The cancellation token. /// - public static async Task DeleteSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string additionalFlags = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteSourceControlWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteSourceControlWithHttpMessagesAsync(resourceGroupName, name, additionalFlags, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -21637,6 +22309,110 @@ public static Operation BeginMigrateMySql(this IWebAppsOperations operations, st } } + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + { + return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + public static object BeginDeletePrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + { + return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// Description for Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group to which the resource belongs. + /// + /// + /// Name of the site. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeletePrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Restores an app from a backup blob in Azure Storage. /// @@ -21833,62 +22609,9 @@ public static SiteExtensionInfo BeginInstallSiteExtension(this IWebAppsOperation public static async Task BeginInstallSiteExtensionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginInstallSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - public static void BeginCopyProductionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity) - { - operations.BeginCopyProductionSlotAsync(resourceGroupName, name, copySlotEntity).GetAwaiter().GetResult(); - } - - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCopyProductionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginCopyProductionSlotWithHttpMessagesAsync(resourceGroupName, name, copySlotEntity, null, cancellationToken).ConfigureAwait(false)).Dispose(); + { + return _result.Body; + } } /// @@ -22357,9 +23080,11 @@ public static MSDeployStatus BeginCreateInstanceMSDeployOperationSlot(this IWebA /// /// /// - public static PrivateEndpointConnectionResource BeginApproveOrRejectPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) + /// + /// + public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot) { - return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); + return operations.BeginApproveOrRejectPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot).GetAwaiter().GetResult(); } /// @@ -22381,12 +23106,14 @@ public static PrivateEndpointConnectionResource BeginApproveOrRejectPrivateEndpo /// /// /// + /// + /// /// /// The cancellation token. /// - public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginApproveOrRejectPrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -22409,9 +23136,11 @@ public static PrivateEndpointConnectionResource BeginApproveOrRejectPrivateEndpo /// /// /// - public static object BeginDeletePrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) + /// + /// + public static object BeginDeletePrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot) { - return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); + return operations.BeginDeletePrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot).GetAwaiter().GetResult(); } /// @@ -22431,12 +23160,14 @@ public static object BeginDeletePrivateEndpointConnection(this IWebAppsOperation /// /// /// + /// + /// /// /// The cancellation token. /// - public static async Task BeginDeletePrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeletePrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -22675,67 +23406,6 @@ public static SiteExtensionInfo BeginInstallSiteExtensionSlot(this IWebAppsOpera } } - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - public static void BeginCopySlotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot) - { - operations.BeginCopySlotSlotAsync(resourceGroupName, name, copySlotEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Copies a deployment slot to another deployment slot of an app. - /// - /// - /// Description for Copies a deployment slot to another deployment slot of an - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name and site config properties - /// to override the source slot config. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCopySlotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmCopySlotEntity copySlotEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginCopySlotSlotWithHttpMessagesAsync(resourceGroupName, name, copySlotEntity, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - /// /// Swaps two deployment slots of an app. /// @@ -23250,6 +23920,86 @@ public static IPage ListConfigurationsNext(this IWebAppsOper } } + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetAppSettingsKeyVaultReferencesNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.GetAppSettingsKeyVaultReferencesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an 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> GetAppSettingsKeyVaultReferencesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetSiteConnectionStringKeyVaultReferencesNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.GetSiteConnectionStringKeyVaultReferencesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an 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> GetSiteConnectionStringKeyVaultReferencesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets a list of web app configuration snapshots identifiers. Each element of /// the list contains a timestamp and the ID of the snapshot. @@ -23748,6 +24498,48 @@ public static IPage ListPerfMonCountersNext(this IWebAppsOperat } } + /// + /// Gets the list of private endpoint connections associated with a site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetPrivateEndpointConnectionListNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.GetPrivateEndpointConnectionListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of private endpoint connections associated with a site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetPrivateEndpointConnectionListNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get list of processes for a web site, or a deployment slot, or for a /// specific scaled-out instance in a web site. @@ -24082,6 +24874,86 @@ public static IPage ListConfigurationsSlotNext(this IWebApps } } + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetAppSettingsKeyVaultReferencesSlotNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.GetAppSettingsKeyVaultReferencesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an 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> GetAppSettingsKeyVaultReferencesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppSettingsKeyVaultReferencesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an app + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetSiteConnectionStringKeyVaultReferencesSlotNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.GetSiteConnectionStringKeyVaultReferencesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the config reference app settings and status of an app + /// + /// + /// Description for Gets the config reference app settings and status of an 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> GetSiteConnectionStringKeyVaultReferencesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets a list of web app configuration snapshots identifiers. Each element of /// the list contains a timestamp and the ID of the snapshot. @@ -24580,6 +25452,48 @@ public static IPage ListPerfMonCountersSlotNext(this IWebAppsOp } } + /// + /// Gets the list of private endpoint connections associated with a site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetPrivateEndpointConnectionListSlotNext(this IWebAppsOperations operations, string nextPageLink) + { + return operations.GetPrivateEndpointConnectionListSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of private endpoint connections associated with a site + /// + /// + /// Description for Gets the list of private endpoint connections associated + /// with a site + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetPrivateEndpointConnectionListSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateEndpointConnectionListSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get list of processes for a web site, or a deployment slot, or for a /// specific scaled-out instance in a web site. 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 e13c1b883b34..70af6b9d672f 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs @@ -82,6 +82,11 @@ public partial class WebSiteManagementClient : ServiceClient public virtual IAppServiceCertificateOrdersOperations AppServiceCertificateOrders { get; private set; } + /// + /// Gets the ICertificateOrdersDiagnosticsOperations. + /// + public virtual ICertificateOrdersDiagnosticsOperations CertificateOrdersDiagnostics { get; private set; } + /// /// Gets the ICertificateRegistrationProviderOperations. /// @@ -102,6 +107,16 @@ public partial class WebSiteManagementClient : ServiceClient public virtual IDomainRegistrationProviderOperations DomainRegistrationProvider { get; private set; } + /// + /// Gets the IAppServiceEnvironmentsOperations. + /// + public virtual IAppServiceEnvironmentsOperations AppServiceEnvironments { get; private set; } + + /// + /// Gets the IAppServicePlansOperations. + /// + public virtual IAppServicePlansOperations AppServicePlans { get; private set; } + /// /// Gets the ICertificatesOperations. /// @@ -117,6 +132,11 @@ public partial class WebSiteManagementClient : ServiceClient public virtual IDiagnosticsOperations Diagnostics { get; private set; } + /// + /// Gets the IGlobalModelOperations. + /// + public virtual IGlobalModelOperations GlobalModel { get; private set; } + /// /// Gets the IProviderOperations. /// @@ -128,9 +148,9 @@ public partial class WebSiteManagementClient : ServiceClient - /// Gets the IWebAppsOperations. + /// Gets the IResourceHealthMetadataOperations. /// - public virtual IWebAppsOperations WebApps { get; private set; } + public virtual IResourceHealthMetadataOperations ResourceHealthMetadata { get; private set; } /// /// Gets the IStaticSitesOperations. @@ -138,19 +158,14 @@ public partial class WebSiteManagementClient : ServiceClient - /// Gets the IAppServiceEnvironmentsOperations. - /// - public virtual IAppServiceEnvironmentsOperations AppServiceEnvironments { get; private set; } - - /// - /// Gets the IAppServicePlansOperations. + /// Gets the IWebAppsOperations. /// - public virtual IAppServicePlansOperations AppServicePlans { get; private set; } + public virtual IWebAppsOperations WebApps { get; private set; } /// - /// Gets the IResourceHealthMetadataOperations. + /// Gets the IKubeEnvironmentsOperations. /// - public virtual IResourceHealthMetadataOperations ResourceHealthMetadata { get; private set; } + public virtual IKubeEnvironmentsOperations KubeEnvironments { get; private set; } /// /// Initializes a new instance of the WebSiteManagementClient class. @@ -394,22 +409,25 @@ public WebSiteManagementClient(System.Uri baseUri, ServiceClientCredentials cred private void Initialize() { AppServiceCertificateOrders = new AppServiceCertificateOrdersOperations(this); + CertificateOrdersDiagnostics = new CertificateOrdersDiagnosticsOperations(this); CertificateRegistrationProvider = new CertificateRegistrationProviderOperations(this); Domains = new DomainsOperations(this); TopLevelDomains = new TopLevelDomainsOperations(this); DomainRegistrationProvider = new DomainRegistrationProviderOperations(this); + AppServiceEnvironments = new AppServiceEnvironmentsOperations(this); + AppServicePlans = new AppServicePlansOperations(this); Certificates = new CertificatesOperations(this); DeletedWebApps = new DeletedWebAppsOperations(this); Diagnostics = new DiagnosticsOperations(this); + GlobalModel = new GlobalModelOperations(this); Provider = new ProviderOperations(this); Recommendations = new RecommendationsOperations(this); - WebApps = new WebAppsOperations(this); - StaticSites = new StaticSitesOperations(this); - AppServiceEnvironments = new AppServiceEnvironmentsOperations(this); - AppServicePlans = new AppServicePlansOperations(this); ResourceHealthMetadata = new ResourceHealthMetadataOperations(this); + StaticSites = new StaticSitesOperations(this); + WebApps = new WebAppsOperations(this); + KubeEnvironments = new KubeEnvironmentsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-06-01"; + ApiVersion = "2021-01-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -443,6 +461,204 @@ private void Initialize() DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } + /// + /// 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. + /// + /// + /// 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> GenerateGithubAccessTokenForAppserviceCLIAsyncWithHttpMessagesAsync(string code, string state, 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; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GenerateGithubAccessTokenForAppserviceCLIAsync", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI").ToString(); + List _queryParameters = new List(); + if (ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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 (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; + 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) + { + 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; + } + /// /// Gets publishing user /// @@ -1935,7 +2151,8 @@ private void Initialize() /// /// Name of SKU used to filter the regions. Possible values include: 'Free', /// 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', - /// 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + /// 'IsolatedV2', 'PremiumV2', 'PremiumV3', 'PremiumContainer', + /// 'ElasticPremium', 'ElasticIsolated' /// /// /// Specify <code>true</code> if you want to filter to only 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 ef734c7a7f7b..653d2cddfeee 100644 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs +++ b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs @@ -21,6 +21,52 @@ 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,7 +411,8 @@ public static DeploymentLocations GetSubscriptionDeploymentLocations(this IWebSi /// /// Name of SKU used to filter the regions. Possible values include: 'Free', /// 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', - /// 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + /// 'IsolatedV2', 'PremiumV2', 'PremiumV3', 'PremiumContainer', + /// 'ElasticPremium', 'ElasticIsolated' /// /// /// Specify <code>true</code> if you want to filter to only regions @@ -396,7 +443,8 @@ public static DeploymentLocations GetSubscriptionDeploymentLocations(this IWebSi /// /// Name of SKU used to filter the regions. Possible values include: 'Free', /// 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', - /// 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + /// 'IsolatedV2', 'PremiumV2', 'PremiumV3', 'PremiumContainer', + /// 'ElasticPremium', 'ElasticIsolated' /// /// /// Specify <code>true</code> if you want to filter to only regions