class Azure::Web::Mgmt::V2016_08_01::WebApps
WebSite Management Client
Attributes
@return [WebSiteManagementClient] reference to the WebSiteManagementClient
Private Class Methods
Creates and initializes a new instance of the WebApps
class. @param client service class for accessing basic functionality.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Updates a named add-on of an app.
Updates a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param premier_add_on [PremierAddOn] A JSON representation of the edited premier add-on. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOn] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11730 def add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) response = add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates a named add-on of an app.
Updates a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param premier_add_on [PremierAddOn] A JSON representation of the edited premier add-on. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11771 def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() request_content = @client.serialize(request_mapper, premier_add_on) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates a named add-on of an app.
Updates a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param premier_add_on [PremierAddOn] A JSON representation of the edited premier add-on. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOn] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26059 def add_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) response = add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates a named add-on of an app.
Updates a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param premier_add_on [PremierAddOn] A JSON representation of the edited premier add-on. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26104 def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() request_content = @client.serialize(request_mapper, premier_add_on) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates a named add-on of an app.
Updates a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param premier_add_on [PremierAddOn] A JSON representation of the edited premier add-on. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26082 def add_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:custom_headers).value! end
Updates a named add-on of an app.
Updates a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param premier_add_on [PremierAddOn] A JSON representation of the edited premier add-on. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11751 def add_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:custom_headers).value! end
Analyze a custom hostname.
Analyze a custom hostname.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param host_name [String] Custom hostname. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CustomHostnameAnalysisResult] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 647 def analyze_custom_hostname(resource_group_name, name, host_name:nil, custom_headers:nil) response = analyze_custom_hostname_async(resource_group_name, name, host_name:host_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Analyze a custom hostname.
Analyze a custom hostname.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param host_name [String] Custom hostname. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 684 def analyze_custom_hostname_async(resource_group_name, name, host_name:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'hostName' => host_name,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CustomHostnameAnalysisResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Analyze a custom hostname.
Analyze a custom hostname.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param host_name [String] Custom hostname. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CustomHostnameAnalysisResult] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14672 def analyze_custom_hostname_slot(resource_group_name, name, slot, host_name:nil, custom_headers:nil) response = analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name:host_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Analyze a custom hostname.
Analyze a custom hostname.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param host_name [String] Custom hostname. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14713 def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'hostName' => host_name,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CustomHostnameAnalysisResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Analyze a custom hostname.
Analyze a custom hostname.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param host_name [String] Custom hostname. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14693 def analyze_custom_hostname_slot_with_http_info(resource_group_name, name, slot, host_name:nil, custom_headers:nil) analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name:host_name, custom_headers:custom_headers).value! end
Analyze a custom hostname.
Analyze a custom hostname.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param host_name [String] Custom hostname. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 666 def analyze_custom_hostname_with_http_info(resource_group_name, name, host_name:nil, custom_headers:nil) analyze_custom_hostname_async(resource_group_name, name, host_name:host_name, custom_headers:custom_headers).value! end
Applies the configuration settings from the target slot onto the current slot.
Applies the configuration settings from the target slot onto the current slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 758 def apply_slot_config_to_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) response = apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! nil end
Applies the configuration settings from the target slot onto the current slot.
Applies the configuration settings from the target slot onto the current slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 801 def apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmSlotEntity.mapper() request_content = @client.serialize(request_mapper, slot_swap_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Applies the configuration settings from the target slot onto the current slot.
Applies the configuration settings from the target slot onto the current slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 780 def apply_slot_config_to_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil) apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! end
Applies the configuration settings from the target slot onto the current slot.
Applies the configuration settings from the target slot onto the current slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14790 def apply_slot_configuration_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) response = apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! nil end
Applies the configuration settings from the target slot onto the current slot.
Applies the configuration settings from the target slot onto the current slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14837 def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmSlotEntity.mapper() request_content = @client.serialize(request_mapper, slot_swap_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Applies the configuration settings from the target slot onto the current slot.
Applies the configuration settings from the target slot onto the current slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14814 def apply_slot_configuration_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! end
Creates a backup of an app.
Creates a backup of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItem] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 872 def backup(resource_group_name, name, request, custom_headers:nil) response = backup_async(resource_group_name, name, request, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a backup of an app.
Creates a backup of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 911 def backup_async(resource_group_name, name, request, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a backup of an app.
Creates a backup of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItem] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14911 def backup_slot(resource_group_name, name, request, slot, custom_headers:nil) response = backup_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a backup of an app.
Creates a backup of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14954 def backup_slot_async(resource_group_name, name, request, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a backup of an app.
Creates a backup of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14933 def backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) backup_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value! end
Creates a backup of an app.
Creates a backup of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 892 def backup_with_http_info(resource_group_name, name, request, custom_headers:nil) backup_async(resource_group_name, name, request, custom_headers:custom_headers).value! end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelope] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35265 def begin_create_function(resource_group_name, name, function_name, function_envelope, custom_headers:nil) response = begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param function_envelope [FunctionEnvelope] Function details. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35304 def begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'function_envelope is nil' if function_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() request_content = @client.serialize(request_mapper, function_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35285 def begin_create_function_with_http_info(resource_group_name, name, function_name, function_envelope, custom_headers:nil) begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:custom_headers).value! end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelope] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36523 def begin_create_instance_function_slot(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) response = begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36566 def begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'function_envelope is nil' if function_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() request_content = @client.serialize(request_mapper, function_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36545 def begin_create_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:custom_headers).value! end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35386 def begin_create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) response = begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35425 def begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeploy.mapper() request_content = @client.serialize(request_mapper, msdeploy) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36651 def begin_create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) response = begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36694 def begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeploy.mapper() request_content = @client.serialize(request_mapper, msdeploy) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36673 def begin_create_instance_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:custom_headers).value! end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35406 def begin_create_instance_msdeploy_operation_with_http_info(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:custom_headers).value! end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35147 def begin_create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers:nil) response = begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param msdeploy [MSDeploy] Details of MSDeploy operation @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35184 def begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeploy.mapper() request_content = @client.serialize(request_mapper, msdeploy) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36398 def begin_create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers:nil) response = begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param msdeploy [MSDeploy] Details of MSDeploy operation @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36439 def begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeploy.mapper() request_content = @client.serialize(request_mapper, msdeploy) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36419 def begin_create_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, msdeploy, custom_headers:nil) begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:custom_headers).value! end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35166 def begin_create_msdeploy_operation_with_http_info(resource_group_name, name, msdeploy, custom_headers:nil) begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34785 def begin_create_or_update(resource_group_name, name, site_envelope, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34830 def begin_create_or_update_async(resource_group_name, name, site_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() request_content = @client.serialize(request_mapper, site_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35997 def begin_create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) response = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:skip_dns_registration, skip_custom_domain_verification:skip_custom_domain_verification, force_dns_registration:force_dns_registration, ttl_in_seconds:ttl_in_seconds, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36064 def begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() request_content = @client.serialize(request_mapper, site_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'skipDnsRegistration' => skip_dns_registration,'skipCustomDomainVerification' => skip_custom_domain_verification,'forceDnsRegistration' => force_dns_registration,'ttlInSeconds' => ttl_in_seconds,'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36031 def begin_create_or_update_slot_with_http_info(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:skip_dns_registration, skip_custom_domain_verification:skip_custom_domain_verification, force_dns_registration:force_dns_registration, ttl_in_seconds:ttl_in_seconds, custom_headers:custom_headers).value! end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37395 def begin_create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers:nil) response = begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37434 def begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() request_content = @client.serialize(request_mapper, site_source_control) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37141 def begin_create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers:nil) response = begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37184 def begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() request_content = @client.serialize(request_mapper, site_source_control) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37163 def begin_create_or_update_source_control_slot_with_http_info(resource_group_name, name, site_source_control, slot, custom_headers:nil) begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:custom_headers).value! end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37415 def begin_create_or_update_source_control_with_http_info(resource_group_name, name, site_source_control, custom_headers:nil) begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34808 def begin_create_or_update_with_http_info(resource_group_name, name, site_envelope, custom_headers:nil) begin_create_or_update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value! end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35862 def begin_install_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) response = begin_install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35899 def begin_install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 200 || status_code == 429 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36897 def begin_install_site_extension_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) response = begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36938 def begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 200 || status_code == 429 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36918 def begin_install_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, custom_headers:nil) begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35881 def begin_install_site_extension_with_http_info(resource_group_name, name, site_extension_id, custom_headers:nil) begin_install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [User] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35040 def begin_list_publishing_credentials(resource_group_name, name, custom_headers:nil) response = begin_list_publishing_credentials_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35075 def begin_list_publishing_credentials_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::User.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [User] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36284 def begin_list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers:nil) response = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36323 def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::User.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36304 def begin_list_publishing_credentials_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35058 def begin_list_publishing_credentials_with_http_info(resource_group_name, name, custom_headers:nil) begin_list_publishing_credentials_async(resource_group_name, name, custom_headers:custom_headers).value! end
Migrates a local (in-app) MySql database to a remote MySql database.
Migrates a local (in-app) MySql database to a remote MySql database.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_request_envelope [MigrateMySqlRequest] MySql migration options. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Operation] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35631 def begin_migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers:nil) response = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Migrates a local (in-app) MySql database to a remote MySql database.
Migrates a local (in-app) MySql database to a remote MySql database.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_request_envelope [MigrateMySqlRequest] MySql migration options. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35670 def begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'migration_request_envelope is nil' if migration_request_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MigrateMySqlRequest.mapper() request_content = @client.serialize(request_mapper, migration_request_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Operation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Migrates a local (in-app) MySql database to a remote MySql database.
Migrates a local (in-app) MySql database to a remote MySql database.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_request_envelope [MigrateMySqlRequest] MySql migration options. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35651 def begin_migrate_my_sql_with_http_info(resource_group_name, name, migration_request_envelope, custom_headers:nil) begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:custom_headers).value! end
Restores a web app.
Restores a web app.
@param subscription_name [String] Azure
subscription. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_options [StorageMigrationOptions] Migration migrationOptions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StorageMigrationResponse] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35508 def begin_migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) response = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:custom_headers).value! response.body unless response.nil? end
Restores a web app.
Restores a web app.
@param subscription_name [String] Azure
subscription. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_options [StorageMigrationOptions] Migration migrationOptions. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35549 def begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) fail ArgumentError, 'subscription_name is nil' if subscription_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'migration_options is nil' if migration_options.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StorageMigrationOptions.mapper() request_content = @client.serialize(request_mapper, migration_options) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'subscriptionName' => subscription_name,'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StorageMigrationResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Restores a web app.
Restores a web app.
@param subscription_name [String] Azure
subscription. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_options [StorageMigrationOptions] Migration migrationOptions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35529 def begin_migrate_storage_with_http_info(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:custom_headers).value! end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35751 def begin_recover(resource_group_name, name, recovery_entity, custom_headers:nil) response = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers:custom_headers).value! nil end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35792 def begin_recover_async(resource_group_name, name, recovery_entity, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'recovery_entity is nil' if recovery_entity.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SnapshotRecoveryRequest.mapper() request_content = @client.serialize(request_mapper, recovery_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36779 def begin_recover_slot(resource_group_name, name, recovery_entity, slot, custom_headers:nil) response = begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers:custom_headers).value! nil end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36824 def begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'recovery_entity is nil' if recovery_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SnapshotRecoveryRequest.mapper() request_content = @client.serialize(request_mapper, recovery_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36802 def begin_recover_slot_with_http_info(resource_group_name, name, recovery_entity, slot, custom_headers:nil) begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers:custom_headers).value! end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 35772 def begin_recover_with_http_info(resource_group_name, name, recovery_entity, custom_headers:nil) begin_recover_async(resource_group_name, name, recovery_entity, custom_headers:custom_headers).value! end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RestoreResponse] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34921 def begin_restore(resource_group_name, name, backup_id, request, custom_headers:nil) response = begin_restore_async(resource_group_name, name, backup_id, request, custom_headers:custom_headers).value! response.body unless response.nil? end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34960 def begin_restore_async(resource_group_name, name, backup_id, request, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RestoreResponse] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36158 def begin_restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers:nil) response = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36201 def begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 36180 def begin_restore_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers:nil) begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:custom_headers).value! end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34941 def begin_restore_with_http_info(resource_group_name, name, backup_id, request, custom_headers:nil) begin_restore_async(resource_group_name, name, backup_id, request, custom_headers:custom_headers).value! end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37024 def begin_swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) response = begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! nil end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37067 def begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmSlotEntity.mapper() request_content = @client.serialize(request_mapper, slot_swap_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37046 def begin_swap_slot_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37285 def begin_swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) response = begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! nil end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37324 def begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmSlotEntity.mapper() request_content = @client.serialize(request_mapper, slot_swap_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37305 def begin_swap_slot_with_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil) begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! end
Create a deployment for an app, or a deployment slot.
Create a deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param deployment [Deployment] Deployment details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Deployment] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5308 def create_deployment(resource_group_name, name, id, deployment, custom_headers:nil) response = create_deployment_async(resource_group_name, name, id, deployment, custom_headers:custom_headers).value! response.body unless response.nil? end
Create a deployment for an app, or a deployment slot.
Create a deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param deployment [Deployment] Deployment details. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5347 def create_deployment_async(resource_group_name, name, id, deployment, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, deployment) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create a deployment for an app, or a deployment slot.
Create a deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param slot [String] Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. @param deployment [Deployment] Deployment details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Deployment] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19376 def create_deployment_slot(resource_group_name, name, id, slot, deployment, custom_headers:nil) response = create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers:custom_headers).value! response.body unless response.nil? end
Create a deployment for an app, or a deployment slot.
Create a deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param slot [String] Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. @param deployment [Deployment] Deployment details. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19419 def create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, deployment) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create a deployment for an app, or a deployment slot.
Create a deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param slot [String] Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. @param deployment [Deployment] Deployment details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19398 def create_deployment_slot_with_http_info(resource_group_name, name, id, slot, deployment, custom_headers:nil) create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers:custom_headers).value! end
Create a deployment for an app, or a deployment slot.
Create a deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param deployment [Deployment] Deployment details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5328 def create_deployment_with_http_info(resource_group_name, name, id, deployment, custom_headers:nil) create_deployment_async(resource_group_name, name, id, deployment, custom_headers:custom_headers).value! end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelope] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6820 def create_function(resource_group_name, name, function_name, function_envelope, custom_headers:nil) response = create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6837 def create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:nil) # Send request promise = begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Create function for web site, or a deployment slot.
Create function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelope] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20983 def create_instance_function_slot(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) response = create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21002 def create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) # Send request promise = begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9008 def create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) response = create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9025 def create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) # Send request promise = begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23290 def create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) response = create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23309 def create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) # Send request promise = begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6336 def create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers:nil) response = create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6352 def create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:nil) # Send request promise = begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Invoke the MSDeploy web app extension.
Invoke the MSDeploy web app extension.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20467 def create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers:nil) response = create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param msdeploy [MSDeploy] Details of MSDeploy operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20485 def create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:nil) # Send request promise = begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 351 def create_or_update(resource_group_name, name, site_envelope, custom_headers:nil) response = create_or_update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 369 def create_or_update_async(resource_group_name, name, site_envelope, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3792 def create_or_update_configuration(resource_group_name, name, site_config, custom_headers:nil) response = create_or_update_configuration_async(resource_group_name, name, site_config, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3831 def create_or_update_configuration_async(resource_group_name, name, site_config, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() request_content = @client.serialize(request_mapper, site_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17762 def create_or_update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers:nil) response = create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17805 def create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() request_content = @client.serialize(request_mapper, site_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17784 def create_or_update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers:nil) create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:custom_headers).value! end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3812 def create_or_update_configuration_with_http_info(resource_group_name, name, site_config, custom_headers:nil) create_or_update_configuration_async(resource_group_name, name, site_config, custom_headers:custom_headers).value! end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Identifier] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5867 def create_or_update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) response = create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5914 def create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() request_content = @client.serialize(request_mapper, domain_ownership_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Identifier] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19970 def create_or_update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) response = create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20021 def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() request_content = @client.serialize(request_mapper, domain_ownership_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19996 def create_or_update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:custom_headers).value! end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5891 def create_or_update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:custom_headers).value! end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param host_name_binding [HostNameBinding] Binding details. This is the JSON representation of a HostNameBinding object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBinding] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7296 def create_or_update_host_name_binding(resource_group_name, name, host_name, host_name_binding, custom_headers:nil) response = create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param host_name_binding [HostNameBinding] Binding details. This is the JSON representation of a HostNameBinding object. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7337 def create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBinding.mapper() request_content = @client.serialize(request_mapper, host_name_binding) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param host_name_binding [HostNameBinding] Binding details. This is the JSON representation of a HostNameBinding object. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBinding] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21491 def create_or_update_host_name_binding_slot(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:nil) response = create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param host_name_binding [HostNameBinding] Binding details. This is the JSON representation of a HostNameBinding object. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21536 def create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBinding.mapper() request_content = @client.serialize(request_mapper, host_name_binding) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param host_name_binding [HostNameBinding] Binding details. This is the JSON representation of a HostNameBinding object. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21514 def create_or_update_host_name_binding_slot_with_http_info(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:nil) create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:custom_headers).value! end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param host_name_binding [HostNameBinding] Binding details. This is the JSON representation of a HostNameBinding object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7317 def create_or_update_host_name_binding_with_http_info(resource_group_name, name, host_name, host_name_binding, custom_headers:nil) create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers:custom_headers).value! end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7634 def create_or_update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) response = create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7677 def create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21846 def create_or_update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) response = create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21891 def create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21869 def create_or_update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7656 def create_or_update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:custom_headers).value! end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param public_certificate [PublicCertificate] Public certificate details. This is the JSON representation of a PublicCertificate object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificate] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13103 def create_or_update_public_certificate(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:nil) response = create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param public_certificate [PublicCertificate] Public certificate details. This is the JSON representation of a PublicCertificate object. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13144 def create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, 'public_certificate is nil' if public_certificate.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificate.mapper() request_content = @client.serialize(request_mapper, public_certificate) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param public_certificate [PublicCertificate] Public certificate details. This is the JSON representation of a PublicCertificate object. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificate] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27516 def create_or_update_public_certificate_slot(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:nil) response = create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param public_certificate [PublicCertificate] Public certificate details. This is the JSON representation of a PublicCertificate object. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27561 def create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, 'public_certificate is nil' if public_certificate.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificate.mapper() request_content = @client.serialize(request_mapper, public_certificate) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param public_certificate [PublicCertificate] Public certificate details. This is the JSON representation of a PublicCertificate object. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27539 def create_or_update_public_certificate_slot_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:nil) create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:custom_headers).value! end
Creates a hostname binding for an app.
Creates a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param public_certificate [PublicCertificate] Public certificate details. This is the JSON representation of a PublicCertificate object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13124 def create_or_update_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:nil) create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:custom_headers).value! end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8436 def create_or_update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) response = create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8481 def create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22683 def create_or_update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) response = create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22732 def create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22708 def create_or_update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8459 def create_or_update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14319 def create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) response = create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:skip_dns_registration, skip_custom_domain_verification:skip_custom_domain_verification, force_dns_registration:force_dns_registration, ttl_in_seconds:ttl_in_seconds, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [Site] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14348 def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) # Send request promise = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:skip_dns_registration, skip_custom_domain_verification:skip_custom_domain_verification, force_dns_registration:force_dns_registration, ttl_in_seconds:ttl_in_seconds, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32166 def create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers:nil) response = create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32183 def create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:nil) # Send request promise = begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28983 def create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers:nil) response = create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29002 def create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:nil) # Send request promise = begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33825 def create_or_update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) response = create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33870 def create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetGateway] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34307 def create_or_update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) response = create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34352 def create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param slot [String] 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetGateway] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31262 def create_or_update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) response = create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param slot [String] 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31313 def create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param slot [String] 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31288 def create_or_update_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34330 def create_or_update_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:custom_headers).value! end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30751 def create_or_update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) response = create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30800 def create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30776 def create_or_update_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33848 def create_or_update_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:custom_headers).value! end
Deletes a web, mobile, or API app, or one of the deployment slots.
Deletes a web, mobile, or API app, or one of the deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 403 def delete(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) response = delete_async(resource_group_name, name, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, custom_headers:custom_headers).value! nil end
Deletes a web, mobile, or API app, or one of the deployment slots.
Deletes a web, mobile, or API app, or one of the deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 446 def delete_async(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a backup of an app by its ID.
Deletes a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1332 def delete_backup(resource_group_name, name, backup_id, custom_headers:nil) response = delete_backup_async(resource_group_name, name, backup_id, custom_headers:custom_headers).value! nil end
Deletes a backup of an app by its ID.
Deletes a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1369 def delete_backup_async(resource_group_name, name, backup_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes the backup configuration of an app.
Deletes the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2291 def delete_backup_configuration(resource_group_name, name, custom_headers:nil) response = delete_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Deletes the backup configuration of an app.
Deletes the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2326 def delete_backup_configuration_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes the backup configuration of an app.
Deletes the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16418 def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil) response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Deletes the backup configuration of an app.
Deletes the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16457 def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes the backup configuration of an app.
Deletes the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16438 def delete_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Deletes the backup configuration of an app.
Deletes the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2309 def delete_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil) delete_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! end
Deletes a backup of an app by its ID.
Deletes a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15399 def delete_backup_slot(resource_group_name, name, backup_id, slot, custom_headers:nil) response = delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers:custom_headers).value! nil end
Deletes a backup of an app by its ID.
Deletes a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15440 def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a backup of an app by its ID.
Deletes a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15420 def delete_backup_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers:nil) delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers:custom_headers).value! end
Deletes a backup of an app by its ID.
Deletes a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1351 def delete_backup_with_http_info(resource_group_name, name, backup_id, custom_headers:nil) delete_backup_async(resource_group_name, name, backup_id, custom_headers:custom_headers).value! end
Delete a continuous web job by its ID for an app, or a deployment slot.
Delete a continuous web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4793 def delete_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = delete_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! nil end
Delete a continuous web job by its ID for an app, or a deployment slot.
Delete a continuous web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4830 def delete_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a continuous web job by its ID for an app, or a deployment slot.
Delete a continuous web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18826 def delete_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = delete_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! nil end
Delete a continuous web job by its ID for an app, or a deployment slot.
Delete a continuous web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18867 def delete_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a continuous web job by its ID for an app, or a deployment slot.
Delete a continuous web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18847 def delete_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) delete_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Delete a continuous web job by its ID for an app, or a deployment slot.
Delete a continuous web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4812 def delete_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) delete_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Delete a deployment by its ID for an app, or a deployment slot.
Delete a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5427 def delete_deployment(resource_group_name, name, id, custom_headers:nil) response = delete_deployment_async(resource_group_name, name, id, custom_headers:custom_headers).value! nil end
Delete a deployment by its ID for an app, or a deployment slot.
Delete a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5464 def delete_deployment_async(resource_group_name, name, id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a deployment by its ID for an app, or a deployment slot.
Delete a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19502 def delete_deployment_slot(resource_group_name, name, id, slot, custom_headers:nil) response = delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:custom_headers).value! nil end
Delete a deployment by its ID for an app, or a deployment slot.
Delete a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19543 def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a deployment by its ID for an app, or a deployment slot.
Delete a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19523 def delete_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers:nil) delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:custom_headers).value! end
Delete a deployment by its ID for an app, or a deployment slot.
Delete a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5446 def delete_deployment_with_http_info(resource_group_name, name, id, custom_headers:nil) delete_deployment_async(resource_group_name, name, id, custom_headers:custom_headers).value! end
Deletes a domain ownership identifier for a web app.
Deletes a domain ownership identifier for a web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5995 def delete_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) response = delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:custom_headers).value! nil end
Deletes a domain ownership identifier for a web app.
Deletes a domain ownership identifier for a web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6034 def delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a domain ownership identifier for a web app.
Deletes a domain ownership identifier for a web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20105 def delete_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) response = delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:custom_headers).value! nil end
Deletes a domain ownership identifier for a web app.
Deletes a domain ownership identifier for a web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20148 def delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a domain ownership identifier for a web app.
Deletes a domain ownership identifier for a web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20127 def delete_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:custom_headers).value! end
Deletes a domain ownership identifier for a web app.
Deletes a domain ownership identifier for a web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6015 def delete_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:custom_headers).value! end
Delete a function for web site, or a deployment slot.
Delete a function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6868 def delete_function(resource_group_name, name, function_name, custom_headers:nil) response = delete_function_async(resource_group_name, name, function_name, custom_headers:custom_headers).value! nil end
Delete a function for web site, or a deployment slot.
Delete a function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6905 def delete_function_async(resource_group_name, name, function_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a function for web site, or a deployment slot.
Delete a function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6887 def delete_function_with_http_info(resource_group_name, name, function_name, custom_headers:nil) delete_function_async(resource_group_name, name, function_name, custom_headers:custom_headers).value! end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7417 def delete_host_name_binding(resource_group_name, name, host_name, custom_headers:nil) response = delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers:custom_headers).value! nil end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7454 def delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21619 def delete_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers:nil) response = delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:custom_headers).value! nil end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param host_name [String] Hostname in the hostname binding. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21660 def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21640 def delete_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers:nil) delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:custom_headers).value! end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7436 def delete_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers:nil) delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers:custom_headers).value! end
Removes a Hybrid Connection from this site.
Removes a Hybrid Connection from this site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7759 def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value! nil end
Removes a Hybrid Connection from this site.
Removes a Hybrid Connection from this site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7798 def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Removes a Hybrid Connection from this site.
Removes a Hybrid Connection from this site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21975 def delete_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) response = delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value! nil end
Removes a Hybrid Connection from this site.
Removes a Hybrid Connection from this site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22016 def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Removes a Hybrid Connection from this site.
Removes a Hybrid Connection from this site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21996 def delete_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value! end
Removes a Hybrid Connection from this site.
Removes a Hybrid Connection from this site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7779 def delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value! end
Delete a function for web site, or a deployment slot.
Delete a function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21035 def delete_instance_function_slot(resource_group_name, name, function_name, slot, custom_headers:nil) response = delete_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value! nil end
Delete a function for web site, or a deployment slot.
Delete a function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21076 def delete_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a function for web site, or a deployment slot.
Delete a function for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21056 def delete_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) delete_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value! end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9419 def delete_instance_process(resource_group_name, name, process_id, instance_id, custom_headers:nil) response = delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! nil end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9466 def delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23726 def delete_instance_process_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) response = delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! nil end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23777 def delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23752 def delete_instance_process_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9443 def delete_instance_process_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! end
Delete a premier add-on from an app.
Delete a premier add-on from an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11851 def delete_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers:nil) response = delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:custom_headers).value! nil end
Delete a premier add-on from an app.
Delete a premier add-on from an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11888 def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a premier add-on from an app.
Delete a premier add-on from an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26187 def delete_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) response = delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:custom_headers).value! nil end
Delete a premier add-on from an app.
Delete a premier add-on from an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26228 def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a premier add-on from an app.
Delete a premier add-on from an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26208 def delete_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:custom_headers).value! end
Delete a premier add-on from an app.
Delete a premier add-on from an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11870 def delete_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers:nil) delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:custom_headers).value! end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12180 def delete_process(resource_group_name, name, process_id, custom_headers:nil) response = delete_process_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! nil end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12221 def delete_process_async(resource_group_name, name, process_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26537 def delete_process_slot(resource_group_name, name, process_id, slot, custom_headers:nil) response = delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! nil end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26582 def delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26560 def delete_process_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! end
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12201 def delete_process_with_http_info(resource_group_name, name, process_id, custom_headers:nil) delete_process_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13224 def delete_public_certificate(resource_group_name, name, public_certificate_name, custom_headers:nil) response = delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:custom_headers).value! nil end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13261 def delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27644 def delete_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) response = delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:custom_headers).value! nil end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param public_certificate_name [String] Public certificate name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27685 def delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27665 def delete_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:custom_headers).value! end
Deletes a hostname binding for an app.
Deletes a hostname binding for an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13243 def delete_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers:nil) delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:custom_headers).value! end
Deletes a relay service connection by its name.
Deletes a relay service connection by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8561 def delete_relay_service_connection(resource_group_name, name, entity_name, custom_headers:nil) response = delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:custom_headers).value! nil end
Deletes a relay service connection by its name.
Deletes a relay service connection by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8598 def delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a relay service connection by its name.
Deletes a relay service connection by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22815 def delete_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers:nil) response = delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:custom_headers).value! nil end
Deletes a relay service connection by its name.
Deletes a relay service connection by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22856 def delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a relay service connection by its name.
Deletes a relay service connection by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22836 def delete_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers:nil) delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:custom_headers).value! end
Deletes a relay service connection by its name.
Deletes a relay service connection by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8580 def delete_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers:nil) delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:custom_headers).value! end
Remove a site extension from a web site, or a deployment slot.
Remove a site extension from a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13985 def delete_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) response = delete_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! nil end
Remove a site extension from a web site, or a deployment slot.
Remove a site extension from a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14022 def delete_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Remove a site extension from a web site, or a deployment slot.
Remove a site extension from a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28455 def delete_site_extension_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) response = delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! nil end
Remove a site extension from a web site, or a deployment slot.
Remove a site extension from a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28496 def delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Remove a site extension from a web site, or a deployment slot.
Remove a site extension from a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28476 def delete_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, custom_headers:nil) delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! end
Remove a site extension from a web site, or a deployment slot.
Remove a site extension from a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14004 def delete_site_extension_with_http_info(resource_group_name, name, site_extension_id, custom_headers:nil) delete_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! end
Deletes a web, mobile, or API app, or one of the deployment slots.
Deletes a web, mobile, or API app, or one of the deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param slot [String] Name of the deployment slot to delete. By default, the API deletes the production slot. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] 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. @param skip_dns_registration [Boolean] If true, DNS registration is skipped. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14385 def delete_slot(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, skip_dns_registration:nil, custom_headers:nil) response = delete_slot_async(resource_group_name, name, slot, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, skip_dns_registration:skip_dns_registration, custom_headers:custom_headers).value! nil end
Deletes a web, mobile, or API app, or one of the deployment slots.
Deletes a web, mobile, or API app, or one of the deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param slot [String] Name of the deployment slot to delete. By default, the API deletes the production slot. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] 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. @param skip_dns_registration [Boolean] If true, DNS registration is skipped. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14434 def delete_slot_async(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, skip_dns_registration:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'skipDnsRegistration' => skip_dns_registration,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a web, mobile, or API app, or one of the deployment slots.
Deletes a web, mobile, or API app, or one of the deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param slot [String] Name of the deployment slot to delete. By default, the API deletes the production slot. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] 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. @param skip_dns_registration [Boolean] If true, DNS registration is skipped. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14410 def delete_slot_with_http_info(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, skip_dns_registration:nil, custom_headers:nil) delete_slot_async(resource_group_name, name, slot, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, skip_dns_registration:skip_dns_registration, custom_headers:custom_headers).value! end
Deletes the source control configuration of an app.
Deletes the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32213 def delete_source_control(resource_group_name, name, custom_headers:nil) response = delete_source_control_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Deletes the source control configuration of an app.
Deletes the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32248 def delete_source_control_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes the source control configuration of an app.
Deletes the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29034 def delete_source_control_slot(resource_group_name, name, slot, custom_headers:nil) response = delete_source_control_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Deletes the source control configuration of an app.
Deletes the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29073 def delete_source_control_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes the source control configuration of an app.
Deletes the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29054 def delete_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) delete_source_control_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Deletes the source control configuration of an app.
Deletes the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32231 def delete_source_control_with_http_info(resource_group_name, name, custom_headers:nil) delete_source_control_async(resource_group_name, name, custom_headers:custom_headers).value! end
Delete a triggered web job by its ID for an app, or a deployment slot.
Delete a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33035 def delete_triggered_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = delete_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! nil end
Delete a triggered web job by its ID for an app, or a deployment slot.
Delete a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33072 def delete_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a triggered web job by its ID for an app, or a deployment slot.
Delete a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29912 def delete_triggered_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = delete_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! nil end
Delete a triggered web job by its ID for an app, or a deployment slot.
Delete a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29953 def delete_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete a triggered web job by its ID for an app, or a deployment slot.
Delete a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29933 def delete_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) delete_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Delete a triggered web job by its ID for an app, or a deployment slot.
Delete a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33054 def delete_triggered_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) delete_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Deletes a connection from an app (or deployment slot to a named virtual network.
Deletes a connection from an app (or deployment slot to a named virtual network.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33952 def delete_vnet_connection(resource_group_name, name, vnet_name, custom_headers:nil) response = delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value! nil end
Deletes a connection from an app (or deployment slot to a named virtual network.
Deletes a connection from an app (or deployment slot to a named virtual network.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33993 def delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a connection from an app (or deployment slot to a named virtual network.
Deletes a connection from an app (or deployment slot to a named virtual network.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30885 def delete_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers:nil) response = delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:custom_headers).value! nil end
Deletes a connection from an app (or deployment slot to a named virtual network.
Deletes a connection from an app (or deployment slot to a named virtual network.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30930 def delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Deletes a connection from an app (or deployment slot to a named virtual network.
Deletes a connection from an app (or deployment slot to a named virtual network.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30908 def delete_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers:nil) delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:custom_headers).value! end
Deletes a connection from an app (or deployment slot to a named virtual network.
Deletes a connection from an app (or deployment slot to a named virtual network.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33973 def delete_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers:nil) delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value! end
Deletes a web, mobile, or API app, or one of the deployment slots.
Deletes a web, mobile, or API app, or one of the deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 425 def delete_with_http_info(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) delete_async(resource_group_name, name, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, custom_headers:custom_headers).value! end
Discovers an existing app backup that can be restored from a blob in Azure
storage.
Discovers an existing app backup that can be restored from a blob in Azure
storage.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [RestoreRequest] A RestoreRequest object that includes Azure
storage URL and blog name for discovery of backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RestoreRequest] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1100 def discover_restore(resource_group_name, name, request, custom_headers:nil) response = discover_restore_async(resource_group_name, name, request, custom_headers:custom_headers).value! response.body unless response.nil? end
Discovers an existing app backup that can be restored from a blob in Azure
storage.
Discovers an existing app backup that can be restored from a blob in Azure
storage.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [RestoreRequest] A RestoreRequest object that includes Azure
storage URL and blog name for discovery of backup. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1143 def discover_restore_async(resource_group_name, name, request, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Discovers an existing app backup that can be restored from a blob in Azure
storage.
Discovers an existing app backup that can be restored from a blob in Azure
storage.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [RestoreRequest] A RestoreRequest object that includes Azure
storage URL and blog name for discovery of backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RestoreRequest] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15153 def discover_restore_slot(resource_group_name, name, request, slot, custom_headers:nil) response = discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Discovers an existing app backup that can be restored from a blob in Azure
storage.
Discovers an existing app backup that can be restored from a blob in Azure
storage.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [RestoreRequest] A RestoreRequest object that includes Azure
storage URL and blog name for discovery of backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15200 def discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Discovers an existing app backup that can be restored from a blob in Azure
storage.
Discovers an existing app backup that can be restored from a blob in Azure
storage.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [RestoreRequest] A RestoreRequest object that includes Azure
storage URL and blog name for discovery of backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15177 def discover_restore_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value! end
Discovers an existing app backup that can be restored from a blob in Azure
storage.
Discovers an existing app backup that can be restored from a blob in Azure
storage.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [RestoreRequest] A RestoreRequest object that includes Azure
storage URL and blog name for discovery of backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1122 def discover_restore_with_http_info(resource_group_name, name, request, custom_headers:nil) discover_restore_async(resource_group_name, name, request, custom_headers:custom_headers).value! end
Generates a new publishing password for an app (or deployment slot, if specified).
Generates a new publishing password for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11186 def generate_new_site_publishing_password(resource_group_name, name, custom_headers:nil) response = generate_new_site_publishing_password_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Generates a new publishing password for an app (or deployment slot, if specified).
Generates a new publishing password for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11225 def generate_new_site_publishing_password_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Generates a new publishing password for an app (or deployment slot, if specified).
Generates a new publishing password for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25480 def generate_new_site_publishing_password_slot(resource_group_name, name, slot, custom_headers:nil) response = generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Generates a new publishing password for an app (or deployment slot, if specified).
Generates a new publishing password for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25523 def generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Generates a new publishing password for an app (or deployment slot, if specified).
Generates a new publishing password for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25502 def generate_new_site_publishing_password_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Generates a new publishing password for an app (or deployment slot, if specified).
Generates a new publishing password for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11206 def generate_new_site_publishing_password_with_http_info(resource_group_name, name, custom_headers:nil) generate_new_site_publishing_password_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the details of a web, mobile, or API app.
Gets the details of a web, mobile, or API app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 240 def get(resource_group_name, name, custom_headers:nil) response = get_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the details of a web, mobile, or API app.
Gets the details of a web, mobile, or API app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 275 def get_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Authentication/Authorization settings of an app.
Gets the Authentication/Authorization settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteAuthSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2069 def get_auth_settings(resource_group_name, name, custom_headers:nil) response = get_auth_settings_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the Authentication/Authorization settings of an app.
Gets the Authentication/Authorization settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2104 def get_auth_settings_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Authentication/Authorization settings of an app.
Gets the Authentication/Authorization settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteAuthSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16182 def get_auth_settings_slot(resource_group_name, name, slot, custom_headers:nil) response = get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the Authentication/Authorization settings of an app.
Gets the Authentication/Authorization settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16221 def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Authentication/Authorization settings of an app.
Gets the Authentication/Authorization settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16202 def get_auth_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the Authentication/Authorization settings of an app.
Gets the Authentication/Authorization settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2087 def get_auth_settings_with_http_info(resource_group_name, name, custom_headers:nil) get_auth_settings_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the backup configuration of an app.
Gets the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupRequest] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2387 def get_backup_configuration(resource_group_name, name, custom_headers:nil) response = get_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the backup configuration of an app.
Gets the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2422 def get_backup_configuration_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the backup configuration of an app.
Gets the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupRequest] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16521 def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil) response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the backup configuration of an app.
Gets the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16560 def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the backup configuration of an app.
Gets the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16541 def get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the backup configuration of an app.
Gets the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2405 def get_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil) get_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets a backup of an app by its ID.
Gets a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItem] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1223 def get_backup_status(resource_group_name, name, backup_id, custom_headers:nil) response = get_backup_status_async(resource_group_name, name, backup_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a backup of an app by its ID.
Gets a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1260 def get_backup_status_async(resource_group_name, name, backup_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a backup of an app by its ID.
Gets a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItem] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15283 def get_backup_status_slot(resource_group_name, name, backup_id, slot, custom_headers:nil) response = get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a backup of an app by its ID.
Gets a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15324 def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a backup of an app by its ID.
Gets a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15304 def get_backup_status_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers:nil) get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers:custom_headers).value! end
Gets a backup of an app by its ID.
Gets a backup of an app by its ID.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1242 def get_backup_status_with_http_info(resource_group_name, name, backup_id, custom_headers:nil) get_backup_status_async(resource_group_name, name, backup_id, custom_headers:custom_headers).value! end
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3680 def get_configuration(resource_group_name, name, custom_headers:nil) response = get_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3719 def get_configuration_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17643 def get_configuration_slot(resource_group_name, name, slot, custom_headers:nil) response = get_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17686 def get_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17665 def get_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets a snapshot of the configuration of an app at a previous point in time.
Gets a snapshot of the configuration of an app at a previous point in time.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4143 def get_configuration_snapshot(resource_group_name, name, snapshot_id, custom_headers:nil) response = get_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a snapshot of the configuration of an app at a previous point in time.
Gets a snapshot of the configuration of an app at a previous point in time.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4180 def get_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a snapshot of the configuration of an app at a previous point in time.
Gets a snapshot of the configuration of an app at a previous point in time.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18134 def get_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers:nil) response = get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a snapshot of the configuration of an app at a previous point in time.
Gets a snapshot of the configuration of an app at a previous point in time.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18175 def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a snapshot of the configuration of an app at a previous point in time.
Gets a snapshot of the configuration of an app at a previous point in time.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18155 def get_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers:nil) get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:custom_headers).value! end
Gets a snapshot of the configuration of an app at a previous point in time.
Gets a snapshot of the configuration of an app at a previous point in time.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4162 def get_configuration_snapshot_with_http_info(resource_group_name, name, snapshot_id, custom_headers:nil) get_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:custom_headers).value! end
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3700 def get_configuration_with_http_info(resource_group_name, name, custom_headers:nil) get_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets a continuous web job 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ContinuousWebJob] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4684 def get_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = get_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a continuous web job 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4721 def get_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ContinuousWebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a continuous web job 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ContinuousWebJob] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18710 def get_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = get_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a continuous web job 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18751 def get_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ContinuousWebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a continuous web job 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18731 def get_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) get_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Gets a continuous web job 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4703 def get_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) get_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Get a deployment by its ID for an app, or a deployment slot.
Get a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Deployment] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5197 def get_deployment(resource_group_name, name, id, custom_headers:nil) response = get_deployment_async(resource_group_name, name, id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a deployment by its ID for an app, or a deployment slot.
Get a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5234 def get_deployment_async(resource_group_name, name, id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a deployment by its ID for an app, or a deployment slot.
Get a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Deployment] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19258 def get_deployment_slot(resource_group_name, name, id, slot, custom_headers:nil) response = get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a deployment by its ID for an app, or a deployment slot.
Get a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19299 def get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a deployment by its ID for an app, or a deployment slot.
Get a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19279 def get_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers:nil) get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:custom_headers).value! end
Get a deployment by its ID for an app, or a deployment slot.
Get a deployment by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] Deployment ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5216 def get_deployment_with_http_info(resource_group_name, name, id, custom_headers:nil) get_deployment_async(resource_group_name, name, id, custom_headers:custom_headers).value! end
Gets the logging configuration of an app.
Gets the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteLogsConfig] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2719 def get_diagnostic_logs_configuration(resource_group_name, name, custom_headers:nil) response = get_diagnostic_logs_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the logging configuration of an app.
Gets the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2754 def get_diagnostic_logs_configuration_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the logging configuration of an app.
Gets the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteLogsConfig] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16874 def get_diagnostic_logs_configuration_slot(resource_group_name, name, slot, custom_headers:nil) response = get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the logging configuration of an app.
Gets the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16913 def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the logging configuration of an app.
Gets the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16894 def get_diagnostic_logs_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the logging configuration of an app.
Gets the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2737 def get_diagnostic_logs_configuration_with_http_info(resource_group_name, name, custom_headers:nil) get_diagnostic_logs_configuration_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get domain ownership identifier for web app.
Get domain ownership identifier for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Identifier] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5750 def get_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) response = get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get domain ownership identifier for web app.
Get domain ownership identifier for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5789 def get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get domain ownership identifier for web app.
Get domain ownership identifier for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Identifier] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19846 def get_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) response = get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get domain ownership identifier for web app.
Get domain ownership identifier for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19889 def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get domain ownership identifier for web app.
Get domain ownership identifier for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19868 def get_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:custom_headers).value! end
Get domain ownership identifier for web app.
Get domain ownership identifier for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5770 def get_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:custom_headers).value! end
Get function information by its ID for web site, or a deployment slot.
Get function information by its ID for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelope] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6709 def get_function(resource_group_name, name, function_name, custom_headers:nil) response = get_function_async(resource_group_name, name, function_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get function information by its ID for web site, or a deployment slot.
Get function information by its ID for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6746 def get_function_async(resource_group_name, name, function_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get function information by its ID for web site, or a deployment slot.
Get function information by its ID for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6728 def get_function_with_http_info(resource_group_name, name, function_name, custom_headers:nil) get_function_async(resource_group_name, name, function_name, custom_headers:custom_headers).value! end
Fetch a short lived token that can be exchanged for a master key.
Fetch a short lived token that can be exchanged for a master key.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [String] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6595 def get_functions_admin_token(resource_group_name, name, custom_headers:nil) response = get_functions_admin_token_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Fetch a short lived token that can be exchanged for a master key.
Fetch a short lived token that can be exchanged for a master key.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6630 def get_functions_admin_token_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Fetch a short lived token that can be exchanged for a master key.
Fetch a short lived token that can be exchanged for a master key.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [String] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20744 def get_functions_admin_token_slot(resource_group_name, name, slot, custom_headers:nil) response = get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Fetch a short lived token that can be exchanged for a master key.
Fetch a short lived token that can be exchanged for a master key.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20783 def get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Fetch a short lived token that can be exchanged for a master key.
Fetch a short lived token that can be exchanged for a master key.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20764 def get_functions_admin_token_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Fetch a short lived token that can be exchanged for a master key.
Fetch a short lived token that can be exchanged for a master key.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6613 def get_functions_admin_token_with_http_info(resource_group_name, name, custom_headers:nil) get_functions_admin_token_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get the named hostname binding for an app (or deployment slot, if specified).
Get the named hostname binding for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBinding] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7184 def get_host_name_binding(resource_group_name, name, host_name, custom_headers:nil) response = get_host_name_binding_async(resource_group_name, name, host_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the named hostname binding for an app (or deployment slot, if specified).
Get the named hostname binding for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7221 def get_host_name_binding_async(resource_group_name, name, host_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the named hostname binding for an app (or deployment slot, if specified).
Get the named hostname binding for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBinding] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21372 def get_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers:nil) response = get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the named hostname binding for an app (or deployment slot, if specified).
Get the named hostname binding for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @param host_name [String] Hostname in the hostname binding. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21413 def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the named hostname binding for an app (or deployment slot, if specified).
Get the named hostname binding for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21393 def get_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers:nil) get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:custom_headers).value! end
Get the named hostname binding for an app (or deployment slot, if specified).
Get the named hostname binding for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param host_name [String] Hostname in the hostname binding. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7203 def get_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers:nil) get_host_name_binding_async(resource_group_name, name, host_name, custom_headers:custom_headers).value! end
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7518 def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7557 def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21726 def get_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) response = get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21767 def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21747 def get_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value! end
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
Retrieves a specific Service Bus Hybrid Connection used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7538 def get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value! end
Get function information by its ID for web site, or a deployment slot.
Get function information by its ID for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelope] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20865 def get_instance_function_slot(resource_group_name, name, function_name, slot, custom_headers:nil) response = get_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get function information by its ID for web site, or a deployment slot.
Get function information by its ID for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20906 def get_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelope.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get function information by its ID for web site, or a deployment slot.
Get function information by its ID for web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20886 def get_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) get_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value! end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8897 def get_instance_ms_deploy_status(resource_group_name, name, instance_id, custom_headers:nil) response = get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8934 def get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23172 def get_instance_ms_deploy_status_slot(resource_group_name, name, slot, instance_id, custom_headers:nil) response = get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23213 def get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23193 def get_instance_ms_deploy_status_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers:nil) get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers:custom_headers).value! end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8916 def get_instance_ms_deploy_status_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value! end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployLog] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9057 def get_instance_msdeploy_log(resource_group_name, name, instance_id, custom_headers:nil) response = get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9094 def get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployLog] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23343 def get_instance_msdeploy_log_slot(resource_group_name, name, slot, instance_id, custom_headers:nil) response = get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23384 def get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23364 def get_instance_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers:nil) get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers:custom_headers).value! end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param instance_id [String] ID of web app instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9076 def get_instance_msdeploy_log_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9294 def get_instance_process(resource_group_name, name, process_id, instance_id, custom_headers:nil) response = get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9341 def get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9535 def get_instance_process_dump(resource_group_name, name, process_id, instance_id, custom_headers:nil) response = get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9582 def get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23849 def get_instance_process_dump_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) response = get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23900 def get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23875 def get_instance_process_dump_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9559 def get_instance_process_dump_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9795 def get_instance_process_module(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil) response = get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9844 def get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'base_address is nil' if base_address.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24123 def get_instance_process_module_slot(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil) response = get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24176 def get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'base_address is nil' if base_address.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24150 def get_instance_process_module_slot_with_http_info(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil) get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9820 def get_instance_process_module_with_http_info(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil) get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23594 def get_instance_process_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) response = get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23645 def get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23620 def get_instance_process_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10051 def get_instance_process_thread(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil) response = get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10100 def get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'thread_id is nil' if thread_id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24393 def get_instance_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil) response = get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24446 def get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'thread_id is nil' if thread_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24420 def get_instance_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil) get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:custom_headers).value! end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10076 def get_instance_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil) get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9318 def get_instance_process_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! end
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MigrateMySqlStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10721 def get_migrate_my_sql_status(resource_group_name, name, custom_headers:nil) response = get_migrate_my_sql_status_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10760 def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MigrateMySqlStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of the deployment slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MigrateMySqlStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24995 def get_migrate_my_sql_status_slot(resource_group_name, name, slot, custom_headers:nil) response = get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of the deployment slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25036 def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MigrateMySqlStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of the deployment slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25016 def get_migrate_my_sql_status_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10741 def get_migrate_my_sql_status_with_http_info(resource_group_name, name, custom_headers:nil) get_migrate_my_sql_status_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployLog] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6383 def get_msdeploy_log(resource_group_name, name, custom_headers:nil) response = get_msdeploy_log_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6418 def get_msdeploy_log_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployLog] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20518 def get_msdeploy_log_slot(resource_group_name, name, slot, custom_headers:nil) response = get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20557 def get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20538 def get_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Get the MSDeploy Log for the last MSDeploy operation.
Get the MSDeploy Log for the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6401 def get_msdeploy_log_with_http_info(resource_group_name, name, custom_headers:nil) get_msdeploy_log_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6229 def get_msdeploy_status(resource_group_name, name, custom_headers:nil) response = get_msdeploy_status_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6264 def get_msdeploy_status_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MSDeployStatus] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20353 def get_msdeploy_status_slot(resource_group_name, name, slot, custom_headers:nil) response = get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20392 def get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20373 def get_msdeploy_status_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Get the status of the last MSDeploy operation.
Get the status of the last MSDeploy operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6247 def get_msdeploy_status_with_http_info(resource_group_name, name, custom_headers:nil) get_msdeploy_status_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets a named add-on of an app.
Gets a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOn] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11618 def get_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers:nil) response = get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a named add-on of an app.
Gets a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11655 def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a named add-on of an app.
Gets a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOn] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25940 def get_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) response = get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a named add-on of an app.
Gets a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25981 def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a named add-on of an app.
Gets a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25961 def get_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:custom_headers).value! end
Gets a named add-on of an app.
Gets a named add-on of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param premier_add_on_name [String] Add-on name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11637 def get_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers:nil) get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12065 def get_process(resource_group_name, name, process_id, custom_headers:nil) response = get_process_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12106 def get_process_async(resource_group_name, name, process_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12286 def get_process_dump(resource_group_name, name, process_id, custom_headers:nil) response = get_process_dump_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12327 def get_process_dump_async(resource_group_name, name, process_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26650 def get_process_dump_slot(resource_group_name, name, process_id, slot, custom_headers:nil) response = get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26695 def get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26673 def get_process_dump_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! end
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12307 def get_process_dump_with_http_info(resource_group_name, name, process_id, custom_headers:nil) get_process_dump_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12526 def get_process_module(resource_group_name, name, process_id, base_address, custom_headers:nil) response = get_process_module_async(resource_group_name, name, process_id, base_address, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12569 def get_process_module_async(resource_group_name, name, process_id, base_address, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'base_address is nil' if base_address.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26904 def get_process_module_slot(resource_group_name, name, process_id, base_address, slot, custom_headers:nil) response = get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26951 def get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'base_address is nil' if base_address.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26928 def get_process_module_slot_with_http_info(resource_group_name, name, process_id, base_address, slot, custom_headers:nil) get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param base_address [String] Module base address. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12548 def get_process_module_with_http_info(resource_group_name, name, process_id, base_address, custom_headers:nil) get_process_module_async(resource_group_name, name, process_id, base_address, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26415 def get_process_slot(resource_group_name, name, process_id, slot, custom_headers:nil) response = get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26460 def get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26438 def get_process_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12762 def get_process_thread(resource_group_name, name, process_id, thread_id, custom_headers:nil) response = get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12805 def get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'thread_id is nil' if thread_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27154 def get_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil) response = get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27201 def get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'thread_id is nil' if thread_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27178 def get_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil) get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers:custom_headers).value! end
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12784 def get_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, custom_headers:nil) get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers:custom_headers).value! end
Get process information 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12086 def get_process_with_http_info(resource_group_name, name, process_id, custom_headers:nil) get_process_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! end
Get the named public certificate for an app (or deployment slot, if specified).
Get the named public certificate for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificate] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12987 def get_public_certificate(resource_group_name, name, public_certificate_name, custom_headers:nil) response = get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the named public certificate for an app (or deployment slot, if specified).
Get the named public certificate for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13028 def get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the named public certificate for an app (or deployment slot, if specified).
Get the named public certificate for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificate] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27393 def get_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) response = get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the named public certificate for an app (or deployment slot, if specified).
Get the named public certificate for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @param public_certificate_name [String] Public certificate name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27438 def get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the named public certificate for an app (or deployment slot, if specified).
Get the named public certificate for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27416 def get_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:custom_headers).value! end
Get the named public certificate for an app (or deployment slot, if specified).
Get the named public certificate for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param public_certificate_name [String] Public certificate name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13008 def get_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers:nil) get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:custom_headers).value! end
Gets a hybrid connection configuration by its name.
Gets a hybrid connection configuration by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8322 def get_relay_service_connection(resource_group_name, name, entity_name, custom_headers:nil) response = get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a hybrid connection configuration by its name.
Gets a hybrid connection configuration by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8359 def get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a hybrid connection configuration by its name.
Gets a hybrid connection configuration by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22562 def get_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers:nil) response = get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a hybrid connection configuration by its name.
Gets a hybrid connection configuration by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22603 def get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a hybrid connection configuration by its name.
Gets a hybrid connection configuration by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22583 def get_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers:nil) get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:custom_headers).value! end
Gets a hybrid connection configuration by its name.
Gets a hybrid connection configuration by its name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8341 def get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers:nil) get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:custom_headers).value! end
Get site extension information by its ID for a web site, or a deployment slot.
Get site extension information by its ID for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13824 def get_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) response = get_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Get site extension information by its ID for a web site, or a deployment slot.
Get site extension information by its ID for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13865 def get_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get site extension information by its ID for a web site, or a deployment slot.
Get site extension information by its ID for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28283 def get_site_extension_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) response = get_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get site extension information by its ID for a web site, or a deployment slot.
Get site extension information by its ID for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28328 def get_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get site extension information by its ID for a web site, or a deployment slot.
Get site extension information by its ID for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28306 def get_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, custom_headers:nil) get_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! end
Get site extension information by its ID for a web site, or a deployment slot.
Get site extension information by its ID for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13845 def get_site_extension_with_http_info(resource_group_name, name, site_extension_id, custom_headers:nil) get_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! end
Gets web app's event logs.
Gets web app's event logs.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SitePhpErrorLogFlag] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11405 def get_site_php_error_log_flag(resource_group_name, name, custom_headers:nil) response = get_site_php_error_log_flag_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets web app's event logs.
Gets web app's event logs.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11440 def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SitePhpErrorLogFlag.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets web app's event logs.
Gets web app's event logs.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SitePhpErrorLogFlag] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25713 def get_site_php_error_log_flag_slot(resource_group_name, name, slot, custom_headers:nil) response = get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets web app's event logs.
Gets web app's event logs.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25752 def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SitePhpErrorLogFlag.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets web app's event logs.
Gets web app's event logs.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25733 def get_site_php_error_log_flag_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets web app's event logs.
Gets web app's event logs.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11423 def get_site_php_error_log_flag_with_http_info(resource_group_name, name, custom_headers:nil) get_site_php_error_log_flag_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the details of a web, mobile, or API app.
Gets the details of a web, mobile, or API app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. By default, this API returns the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14192 def get_slot(resource_group_name, name, slot, custom_headers:nil) response = get_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the details of a web, mobile, or API app.
Gets the details of a web, mobile, or API app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. By default, this API returns the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14231 def get_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the details of a web, mobile, or API app.
Gets the details of a web, mobile, or API app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. By default, this API returns the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14212 def get_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the source control configuration of an app.
Gets the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32038 def get_source_control(resource_group_name, name, custom_headers:nil) response = get_source_control_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the source control configuration of an app.
Gets the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32073 def get_source_control_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the source control configuration of an app.
Gets the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28848 def get_source_control_slot(resource_group_name, name, slot, custom_headers:nil) response = get_source_control_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the source control configuration of an app.
Gets the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28887 def get_source_control_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the source control configuration of an app.
Gets the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28868 def get_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_source_control_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the source control configuration of an app.
Gets the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32056 def get_source_control_with_http_info(resource_group_name, name, custom_headers:nil) get_source_control_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets a triggered web job by its ID for an app, or a deployment slot.
Gets a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredWebJob] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32926 def get_triggered_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = get_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a triggered web job by its ID for an app, or a deployment slot.
Gets a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32963 def get_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredWebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param id [String] History ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredJobHistory] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33248 def get_triggered_web_job_history(resource_group_name, name, web_job_name, id, custom_headers:nil) response = get_triggered_web_job_history_async(resource_group_name, name, web_job_name, id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param id [String] History ID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33291 def get_triggered_web_job_history_async(resource_group_name, name, web_job_name, id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredJobHistory.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param id [String] History ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredJobHistory] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30139 def get_triggered_web_job_history_slot(resource_group_name, name, web_job_name, id, slot, custom_headers:nil) response = get_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param id [String] History ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30186 def get_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredJobHistory.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param id [String] History ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30163 def get_triggered_web_job_history_slot_with_http_info(resource_group_name, name, web_job_name, id, slot, custom_headers:nil) get_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, id, slot, custom_headers:custom_headers).value! end
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
Gets a triggered web job's history by its ID for an app, , or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param id [String] History ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33270 def get_triggered_web_job_history_with_http_info(resource_group_name, name, web_job_name, id, custom_headers:nil) get_triggered_web_job_history_async(resource_group_name, name, web_job_name, id, custom_headers:custom_headers).value! end
Gets a triggered web job by its ID for an app, or a deployment slot.
Gets a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredWebJob] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29796 def get_triggered_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = get_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a triggered web job by its ID for an app, or a deployment slot.
Gets a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29837 def get_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredWebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a triggered web job by its ID for an app, or a deployment slot.
Gets a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29817 def get_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) get_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Gets a triggered web job by its ID for an app, or a deployment slot.
Gets a triggered web job by its ID for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32945 def get_triggered_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) get_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Gets a virtual network the app (or deployment slot) is connected to by name.
Gets a virtual network the app (or deployment slot) is connected to by name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33711 def get_vnet_connection(resource_group_name, name, vnet_name, custom_headers:nil) response = get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a virtual network the app (or deployment slot) is connected to by name.
Gets a virtual network the app (or deployment slot) is connected to by name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33748 def get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets an app's Virtual Network gateway.
Gets an app's Virtual Network gateway.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetGateway] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34188 def get_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil) response = get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets an app's Virtual Network gateway.
Gets an app's Virtual Network gateway.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34229 def get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets an app's Virtual Network gateway.
Gets an app's Virtual Network gateway.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetGateway] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31135 def get_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil) response = get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets an app's Virtual Network gateway.
Gets an app's Virtual Network gateway.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31180 def get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets an app's Virtual Network gateway.
Gets an app's Virtual Network gateway.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual Network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31158 def get_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil) get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:custom_headers).value! end
Gets an app's Virtual Network gateway.
Gets an app's Virtual Network gateway.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34209 def get_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil) get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:custom_headers).value! end
Gets a virtual network the app (or deployment slot) is connected to by name.
Gets a virtual network the app (or deployment slot) is connected to by name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30630 def get_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers:nil) response = get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a virtual network the app (or deployment slot) is connected to by name.
Gets a virtual network the app (or deployment slot) is connected to by name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30671 def get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a virtual network the app (or deployment slot) is connected to by name.
Gets a virtual network the app (or deployment slot) is connected to by name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30651 def get_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers:nil) get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:custom_headers).value! end
Gets a virtual network the app (or deployment slot) is connected to by name.
Gets a virtual network the app (or deployment slot) is connected to by name.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33730 def get_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers:nil) get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value! end
Get webjob information for an app, or a deployment slot.
Get webjob information for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of the web job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebJob] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34671 def get_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = get_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get webjob information for an app, or a deployment slot.
Get webjob information for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of the web job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34708 def get_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get webjob information for an app, or a deployment slot.
Get webjob information for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of the web job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebJob] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31652 def get_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = get_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get webjob information for an app, or a deployment slot.
Get webjob information for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of the web job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31693 def get_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get webjob information for an app, or a deployment slot.
Get webjob information for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of the web job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31673 def get_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) get_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Get webjob information for an app, or a deployment slot.
Get webjob information for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of the web job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34690 def get_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) get_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Gets the last lines of docker logs for the given site
Gets the last lines of docker logs for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4351 def get_web_site_container_logs(resource_group_name, name, custom_headers:nil) response = get_web_site_container_logs_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the last lines of docker logs for the given site
Gets the last lines of docker logs for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4386 def get_web_site_container_logs_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the last lines of docker logs for the given site
Gets the last lines of docker logs for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18356 def get_web_site_container_logs_slot(resource_group_name, name, slot, custom_headers:nil) response = get_web_site_container_logs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the last lines of docker logs for the given site
Gets the last lines of docker logs for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18395 def get_web_site_container_logs_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the last lines of docker logs for the given site
Gets the last lines of docker logs for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18376 def get_web_site_container_logs_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_web_site_container_logs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the last lines of docker logs for the given site
Gets the last lines of docker logs for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4369 def get_web_site_container_logs_with_http_info(resource_group_name, name, custom_headers:nil) get_web_site_container_logs_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the ZIP archived docker log files for the given site
Gets the ZIP archived docker log files for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4464 def get_web_site_container_logs_zip(resource_group_name, name, custom_headers:nil) response = get_web_site_container_logs_zip_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the ZIP archived docker log files for the given site
Gets the ZIP archived docker log files for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4499 def get_web_site_container_logs_zip_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the ZIP archived docker log files for the given site
Gets the ZIP archived docker log files for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18476 def get_web_site_container_logs_zip_slot(resource_group_name, name, slot, custom_headers:nil) response = get_web_site_container_logs_zip_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the ZIP archived docker log files for the given site
Gets the ZIP archived docker log files for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18515 def get_web_site_container_logs_zip_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the ZIP archived docker log files for the given site
Gets the ZIP archived docker log files for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18496 def get_web_site_container_logs_zip_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) get_web_site_container_logs_zip_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the ZIP archived docker log files for the given site
Gets the ZIP archived docker log files for the given site
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4482 def get_web_site_container_logs_zip_with_http_info(resource_group_name, name, custom_headers:nil) get_web_site_container_logs_zip_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the details of a web, mobile, or API app.
Gets the details of a web, mobile, or API app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 258 def get_with_http_info(resource_group_name, name, custom_headers:nil) get_async(resource_group_name, name, custom_headers:custom_headers).value! end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13938 def install_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) response = install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13954 def install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) # Send request promise = begin_install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Install site extension on a web site, or a deployment slot.
Install site extension on a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28404 def install_site_extension_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) response = install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28422 def install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) # Send request promise = begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfo.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Shows whether an app can be cloned to another resource group or subscription.
Shows whether an app can be cloned to another resource group or subscription.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteCloneability] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10174 def is_cloneable(resource_group_name, name, custom_headers:nil) response = is_cloneable_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Shows whether an app can be cloned to another resource group or subscription.
Shows whether an app can be cloned to another resource group or subscription.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10209 def is_cloneable_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteCloneability.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Shows whether an app can be cloned to another resource group or subscription.
Shows whether an app can be cloned to another resource group or subscription.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. By default, this API returns information on the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteCloneability] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24523 def is_cloneable_slot(resource_group_name, name, slot, custom_headers:nil) response = is_cloneable_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Shows whether an app can be cloned to another resource group or subscription.
Shows whether an app can be cloned to another resource group or subscription.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. By default, this API returns information on the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24562 def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteCloneability.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Shows whether an app can be cloned to another resource group or subscription.
Shows whether an app can be cloned to another resource group or subscription.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. By default, this API returns information on the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24543 def is_cloneable_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) is_cloneable_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Shows whether an app can be cloned to another resource group or subscription.
Shows whether an app can be cloned to another resource group or subscription.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10192 def is_cloneable_with_http_info(resource_group_name, name, custom_headers:nil) is_cloneable_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get all apps for a subscription.
Get all apps for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34 def list(custom_headers:nil) first_page = list_as_lazy(custom_headers:custom_headers) first_page.get_all_items end
Gets the application settings of an app.
Gets the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1843 def list_application_settings(resource_group_name, name, custom_headers:nil) response = list_application_settings_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the application settings of an app.
Gets the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1878 def list_application_settings_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the application settings of an app.
Gets the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15942 def list_application_settings_slot(resource_group_name, name, slot, custom_headers:nil) response = list_application_settings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the application settings of an app.
Gets the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15981 def list_application_settings_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the application settings of an app.
Gets the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15962 def list_application_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_application_settings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the application settings of an app.
Gets the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1861 def list_application_settings_with_http_info(resource_group_name, name, custom_headers:nil) list_application_settings_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get all apps for a subscription.
Get all apps for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42907 def list_as_lazy(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all apps for a subscription.
Get all apps for a subscription.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 63 def list_async(custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/sites' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
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.
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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param backup_id [String] ID of backup. @param request [BackupRequest] Information on backup request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItem] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1439 def list_backup_status_secrets(resource_group_name, name, backup_id, request, custom_headers:nil) response = list_backup_status_secrets_async(resource_group_name, name, backup_id, request, custom_headers:custom_headers).value! response.body unless response.nil? end
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.
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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param backup_id [String] ID of backup. @param request [BackupRequest] Information on backup request. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1490 def list_backup_status_secrets_async(resource_group_name, name, backup_id, request, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
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.
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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param backup_id [String] ID of backup. @param request [BackupRequest] Information on backup request. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItem] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15513 def list_backup_status_secrets_slot(resource_group_name, name, backup_id, request, slot, custom_headers:nil) response = list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
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.
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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param backup_id [String] ID of backup. @param request [BackupRequest] Information on backup request. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15568 def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
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.
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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param backup_id [String] ID of backup. @param request [BackupRequest] Information on backup request. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15541 def list_backup_status_secrets_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers:nil) list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:custom_headers).value! end
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.
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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param backup_id [String] ID of backup. @param request [BackupRequest] Information on backup request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1465 def list_backup_status_secrets_with_http_info(resource_group_name, name, backup_id, request, custom_headers:nil) list_backup_status_secrets_async(resource_group_name, name, backup_id, request, custom_headers:custom_headers).value! end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<BackupItem>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 990 def list_backups(resource_group_name, name, custom_headers:nil) first_page = list_backups_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItemCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42959 def list_backups_as_lazy(resource_group_name, name, custom_headers:nil) response = list_backups_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_backups_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1025 def list_backups_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItemCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets existing backups of an app.
Gets existing backups of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItemCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37724 def list_backups_next(next_page_link, custom_headers:nil) response = list_backups_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets existing backups of an app.
Gets existing backups of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37757 def list_backups_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItemCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets existing backups of an app.
Gets existing backups of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37741 def list_backups_next_with_http_info(next_page_link, custom_headers:nil) list_backups_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<BackupItem>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15036 def list_backups_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItemCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43523 def list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_backups_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_backups_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15075 def list_backups_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItemCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets existing backups of an app.
Gets existing backups of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupItemCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39782 def list_backups_slot_next(next_page_link, custom_headers:nil) response = list_backups_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets existing backups of an app.
Gets existing backups of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39815 def list_backups_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupItemCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets existing backups of an app.
Gets existing backups of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39799 def list_backups_slot_next_with_http_info(next_page_link, custom_headers:nil) list_backups_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15056 def list_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_backups_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets existing backups of an app.
Gets existing backups of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1008 def list_backups_with_http_info(resource_group_name, name, custom_headers:nil) list_backups_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param include_slots [Boolean] Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 131 def list_by_resource_group(resource_group_name, include_slots:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, include_slots:include_slots, custom_headers:custom_headers) first_page.get_all_items end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param include_slots [Boolean] Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42934 def list_by_resource_group_as_lazy(resource_group_name, include_slots:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, include_slots:include_slots, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param include_slots [Boolean] Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 170 def list_by_resource_group_async(resource_group_name, include_slots:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'includeSlots' => include_slots,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37628 def list_by_resource_group_next(next_page_link, custom_headers:nil) response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37661 def list_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37645 def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all web, mobile, and API apps in the specified resource group.
Gets all web, mobile, and API apps in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param include_slots [Boolean] Specify <strong>true</strong> to include deployment slots in results. The default is false, which only gives you the production slot of all apps. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 151 def list_by_resource_group_with_http_info(resource_group_name, include_slots:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, include_slots:include_slots, custom_headers:custom_headers).value! end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteConfigurationSnapshotInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4032 def list_configuration_snapshot_info(resource_group_name, name, custom_headers:nil) first_page = list_configuration_snapshot_info_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigurationSnapshotInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43011 def list_configuration_snapshot_info_as_lazy(resource_group_name, name, custom_headers:nil) response = list_configuration_snapshot_info_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_configuration_snapshot_info_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4071 def list_configuration_snapshot_info_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigurationSnapshotInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigurationSnapshotInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37918 def list_configuration_snapshot_info_next(next_page_link, custom_headers:nil) response = list_configuration_snapshot_info_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37955 def list_configuration_snapshot_info_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigurationSnapshotInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37937 def list_configuration_snapshot_info_next_with_http_info(next_page_link, custom_headers:nil) list_configuration_snapshot_info_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteConfigurationSnapshotInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18016 def list_configuration_snapshot_info_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_configuration_snapshot_info_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigurationSnapshotInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43579 def list_configuration_snapshot_info_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_configuration_snapshot_info_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18059 def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigurationSnapshotInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigurationSnapshotInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39976 def list_configuration_snapshot_info_slot_next(next_page_link, custom_headers:nil) response = list_configuration_snapshot_info_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40013 def list_configuration_snapshot_info_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigurationSnapshotInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39995 def list_configuration_snapshot_info_slot_next_with_http_info(next_page_link, custom_headers:nil) list_configuration_snapshot_info_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18038 def list_configuration_snapshot_info_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4052 def list_configuration_snapshot_info_with_http_info(resource_group_name, name, custom_headers:nil) list_configuration_snapshot_info_async(resource_group_name, name, custom_headers:custom_headers).value! end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteConfigResource>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1620 def list_configurations(resource_group_name, name, custom_headers:nil) first_page = list_configurations_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResourceCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42984 def list_configurations_as_lazy(resource_group_name, name, custom_headers:nil) response = list_configurations_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_configurations_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1655 def list_configurations_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResourceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the configurations of an app
List the configurations of an app
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResourceCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37820 def list_configurations_next(next_page_link, custom_headers:nil) response = list_configurations_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the configurations of an app
List the configurations of an app
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37853 def list_configurations_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResourceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the configurations of an app
List the configurations of an app
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37837 def list_configurations_next_with_http_info(next_page_link, custom_headers:nil) list_configurations_next_async(next_page_link, custom_headers:custom_headers).value! end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteConfigResource>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15705 def list_configurations_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResourceCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43550 def list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_configurations_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_configurations_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15744 def list_configurations_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResourceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the configurations of an app
List the configurations of an app
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResourceCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39878 def list_configurations_slot_next(next_page_link, custom_headers:nil) response = list_configurations_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the configurations of an app
List the configurations of an app
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39911 def list_configurations_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResourceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the configurations of an app
List the configurations of an app
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39895 def list_configurations_slot_next_with_http_info(next_page_link, custom_headers:nil) list_configurations_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15725 def list_configurations_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_configurations_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
List the configurations of an app
List the configurations of an app
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1638 def list_configurations_with_http_info(resource_group_name, name, custom_headers:nil) list_configurations_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the connection strings of an app.
Gets the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ConnectionStringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2613 def list_connection_strings(resource_group_name, name, custom_headers:nil) response = list_connection_strings_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the connection strings of an app.
Gets the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2648 def list_connection_strings_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the connection strings of an app.
Gets the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ConnectionStringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16761 def list_connection_strings_slot(resource_group_name, name, slot, custom_headers:nil) response = list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the connection strings of an app.
Gets the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16800 def list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the connection strings of an app.
Gets the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16781 def list_connection_strings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the connection strings of an app.
Gets the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2631 def list_connection_strings_with_http_info(resource_group_name, name, custom_headers:nil) list_connection_strings_async(resource_group_name, name, custom_headers:custom_headers).value! end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ContinuousWebJob>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4577 def list_continuous_web_jobs(resource_group_name, name, custom_headers:nil) first_page = list_continuous_web_jobs_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ContinuousWebJobCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43036 def list_continuous_web_jobs_as_lazy(resource_group_name, name, custom_headers:nil) response = list_continuous_web_jobs_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_continuous_web_jobs_next_async(next_page_link, custom_headers:custom_headers) end page end end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4612 def list_continuous_web_jobs_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ContinuousWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ContinuousWebJobCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38018 def list_continuous_web_jobs_next(next_page_link, custom_headers:nil) response = list_continuous_web_jobs_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38051 def list_continuous_web_jobs_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ContinuousWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38035 def list_continuous_web_jobs_next_with_http_info(next_page_link, custom_headers:nil) list_continuous_web_jobs_next_async(next_page_link, custom_headers:custom_headers).value! end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ContinuousWebJob>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18596 def list_continuous_web_jobs_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_continuous_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ContinuousWebJobCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43606 def list_continuous_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_continuous_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18635 def list_continuous_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ContinuousWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ContinuousWebJobCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40076 def list_continuous_web_jobs_slot_next(next_page_link, custom_headers:nil) response = list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40109 def list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ContinuousWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40093 def list_continuous_web_jobs_slot_next_with_http_info(next_page_link, custom_headers:nil) list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18616 def list_continuous_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_continuous_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
List continuous web jobs for an app, or a deployment slot.
List continuous web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4595 def list_continuous_web_jobs_with_http_info(resource_group_name, name, custom_headers:nil) list_continuous_web_jobs_async(resource_group_name, name, custom_headers:custom_headers).value! end
List deployment log for specific deployment for an app, or a deployment slot.
List deployment log for specific deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] The ID of a specific deployment. This is the value of the name property in the JSON response from “GET /api/sites/{siteName}/deployments”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Deployment] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5529 def list_deployment_log(resource_group_name, name, id, custom_headers:nil) response = list_deployment_log_async(resource_group_name, name, id, custom_headers:custom_headers).value! response.body unless response.nil? end
List deployment log for specific deployment for an app, or a deployment slot.
List deployment log for specific deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] The ID of a specific deployment. This is the value of the name property in the JSON response from “GET /api/sites/{siteName}/deployments”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5570 def list_deployment_log_async(resource_group_name, name, id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List deployment log for specific deployment for an app, or a deployment slot.
List deployment log for specific deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] The ID of a specific deployment. This is the value of the name property in the JSON response from “GET /api/sites/{siteName}/deployments”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Deployment] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19611 def list_deployment_log_slot(resource_group_name, name, id, slot, custom_headers:nil) response = list_deployment_log_slot_async(resource_group_name, name, id, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
List deployment log for specific deployment for an app, or a deployment slot.
List deployment log for specific deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] The ID of a specific deployment. This is the value of the name property in the JSON response from “GET /api/sites/{siteName}/deployments”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19656 def list_deployment_log_slot_async(resource_group_name, name, id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List deployment log for specific deployment for an app, or a deployment slot.
List deployment log for specific deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] The ID of a specific deployment. This is the value of the name property in the JSON response from “GET /api/sites/{siteName}/deployments”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19634 def list_deployment_log_slot_with_http_info(resource_group_name, name, id, slot, custom_headers:nil) list_deployment_log_slot_async(resource_group_name, name, id, slot, custom_headers:custom_headers).value! end
List deployment log for specific deployment for an app, or a deployment slot.
List deployment log for specific deployment for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] The ID of a specific deployment. This is the value of the name property in the JSON response from “GET /api/sites/{siteName}/deployments”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5550 def list_deployment_log_with_http_info(resource_group_name, name, id, custom_headers:nil) list_deployment_log_async(resource_group_name, name, id, custom_headers:custom_headers).value! end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Deployment>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5090 def list_deployments(resource_group_name, name, custom_headers:nil) first_page = list_deployments_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DeploymentCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43061 def list_deployments_as_lazy(resource_group_name, name, custom_headers:nil) response = list_deployments_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_deployments_next_async(next_page_link, custom_headers:custom_headers) end page end end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5125 def list_deployments_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DeploymentCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38114 def list_deployments_next(next_page_link, custom_headers:nil) response = list_deployments_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38147 def list_deployments_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38131 def list_deployments_next_with_http_info(next_page_link, custom_headers:nil) list_deployments_next_async(next_page_link, custom_headers:custom_headers).value! end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Deployment>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19144 def list_deployments_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DeploymentCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43633 def list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_deployments_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_deployments_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19183 def list_deployments_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DeploymentCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40172 def list_deployments_slot_next(next_page_link, custom_headers:nil) response = list_deployments_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40205 def list_deployments_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40189 def list_deployments_slot_next_with_http_info(next_page_link, custom_headers:nil) list_deployments_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19164 def list_deployments_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_deployments_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
List deployments for an app, or a deployment slot.
List deployments for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5108 def list_deployments_with_http_info(resource_group_name, name, custom_headers:nil) list_deployments_async(resource_group_name, name, custom_headers:custom_headers).value! end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Identifier>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5642 def list_domain_ownership_identifiers(resource_group_name, name, custom_headers:nil) first_page = list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [IdentifierCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43086 def list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers:nil) response = list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_domain_ownership_identifiers_next_async(next_page_link, custom_headers:custom_headers) end page end end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5677 def list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [IdentifierCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38210 def list_domain_ownership_identifiers_next(next_page_link, custom_headers:nil) response = list_domain_ownership_identifiers_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38243 def list_domain_ownership_identifiers_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38227 def list_domain_ownership_identifiers_next_with_http_info(next_page_link, custom_headers:nil) list_domain_ownership_identifiers_next_async(next_page_link, custom_headers:custom_headers).value! end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Identifier>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19731 def list_domain_ownership_identifiers_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [IdentifierCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43660 def list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19770 def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [IdentifierCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40268 def list_domain_ownership_identifiers_slot_next(next_page_link, custom_headers:nil) response = list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40301 def list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40285 def list_domain_ownership_identifiers_slot_next_with_http_info(next_page_link, custom_headers:nil) list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19751 def list_domain_ownership_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Lists ownership identifiers for domain associated with web app.
Lists ownership identifiers for domain associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5660 def list_domain_ownership_identifiers_with_http_info(resource_group_name, name, custom_headers:nil) list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get function secrets for a function in a web site, or a deployment slot.
Get function secrets for a function in a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionSecrets] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6968 def list_function_secrets(resource_group_name, name, function_name, custom_headers:nil) response = list_function_secrets_async(resource_group_name, name, function_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get function secrets for a function in a web site, or a deployment slot.
Get function secrets for a function in a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7005 def list_function_secrets_async(resource_group_name, name, function_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get function secrets for a function in a web site, or a deployment slot.
Get function secrets for a function in a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionSecrets] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21142 def list_function_secrets_slot(resource_group_name, name, function_name, slot, custom_headers:nil) response = list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get function secrets for a function in a web site, or a deployment slot.
Get function secrets for a function in a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21183 def list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get function secrets for a function in a web site, or a deployment slot.
Get function secrets for a function in a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21163 def list_function_secrets_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value! end
Get function secrets for a function in a web site, or a deployment slot.
Get function secrets for a function in a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6987 def list_function_secrets_with_http_info(resource_group_name, name, function_name, custom_headers:nil) list_function_secrets_async(resource_group_name, name, function_name, custom_headers:custom_headers).value! end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<FunctionEnvelope>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6489 def list_functions(resource_group_name, name, custom_headers:nil) first_page = list_functions_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelopeCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43111 def list_functions_as_lazy(resource_group_name, name, custom_headers:nil) response = list_functions_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_functions_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6524 def list_functions_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelopeCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelopeCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38306 def list_functions_next(next_page_link, custom_headers:nil) response = list_functions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38339 def list_functions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelopeCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38323 def list_functions_next_with_http_info(next_page_link, custom_headers:nil) list_functions_next_async(next_page_link, custom_headers:custom_headers).value! end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6507 def list_functions_with_http_info(resource_group_name, name, custom_headers:nil) list_functions_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<HostNameBinding>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7077 def list_host_name_bindings(resource_group_name, name, custom_headers:nil) first_page = list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBindingCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43136 def list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers:nil) response = list_host_name_bindings_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_host_name_bindings_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7112 def list_host_name_bindings_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBindingCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBindingCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38402 def list_host_name_bindings_next(next_page_link, custom_headers:nil) response = list_host_name_bindings_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38435 def list_host_name_bindings_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBindingCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38419 def list_host_name_bindings_next_with_http_info(next_page_link, custom_headers:nil) list_host_name_bindings_next_async(next_page_link, custom_headers:custom_headers).value! end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<HostNameBinding>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21258 def list_host_name_bindings_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBindingCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43714 def list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_host_name_bindings_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21297 def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBindingCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostNameBindingCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40460 def list_host_name_bindings_slot_next(next_page_link, custom_headers:nil) response = list_host_name_bindings_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40493 def list_host_name_bindings_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HostNameBindingCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40477 def list_host_name_bindings_slot_next_with_http_info(next_page_link, custom_headers:nil) list_host_name_bindings_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 21278 def list_host_name_bindings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Get hostname bindings for an app or a deployment slot.
Get hostname bindings for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7095 def list_host_name_bindings_with_http_info(resource_group_name, name, custom_headers:nil) list_host_name_bindings_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the send key name and value for a Hybrid Connection.
Gets the send key name and value for a Hybrid Connection.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnectionKey] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7991 def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the send key name and value for a Hybrid Connection.
Gets the send key name and value for a Hybrid Connection.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8030 def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnectionKey.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the send key name and value for a Hybrid Connection.
Gets the send key name and value for a Hybrid Connection.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnectionKey] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22215 def list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) response = list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the send key name and value for a Hybrid Connection.
Gets the send key name and value for a Hybrid Connection.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22256 def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnectionKey.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the send key name and value for a Hybrid Connection.
Gets the send key name and value for a Hybrid Connection.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22236 def list_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value! end
Gets the send key name and value for a Hybrid Connection.
Gets the send key name and value for a Hybrid Connection.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8011 def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value! end
Retrieves all Service Bus Hybrid Connections used by this Web
App.
Retrieves all Service Bus Hybrid Connections used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8103 def list_hybrid_connections(resource_group_name, name, custom_headers:nil) response = list_hybrid_connections_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Retrieves all Service Bus Hybrid Connections used by this Web
App.
Retrieves all Service Bus Hybrid Connections used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8138 def list_hybrid_connections_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Retrieves all Service Bus Hybrid Connections used by this Web
App.
Retrieves all Service Bus Hybrid Connections used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22331 def list_hybrid_connections_slot(resource_group_name, name, slot, custom_headers:nil) response = list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Retrieves all Service Bus Hybrid Connections used by this Web
App.
Retrieves all Service Bus Hybrid Connections used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22368 def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Retrieves all Service Bus Hybrid Connections used by this Web
App.
Retrieves all Service Bus Hybrid Connections used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22350 def list_hybrid_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Retrieves all Service Bus Hybrid Connections used by this Web
App.
Retrieves all Service Bus Hybrid Connections used by this Web
App.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8121 def list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers:nil) list_hybrid_connections_async(resource_group_name, name, custom_headers:custom_headers).value! end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<FunctionEnvelope>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20631 def list_instance_functions_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_instance_functions_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelopeCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43687 def list_instance_functions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_instance_functions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_functions_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20670 def list_instance_functions_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelopeCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionEnvelopeCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40364 def list_instance_functions_slot_next(next_page_link, custom_headers:nil) response = list_instance_functions_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40397 def list_instance_functions_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionEnvelopeCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40381 def list_instance_functions_slot_next_with_http_info(next_page_link, custom_headers:nil) list_instance_functions_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List the functions for a web site, or a deployment slot.
List the functions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20651 def list_instance_functions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_instance_functions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteInstance>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8790 def list_instance_identifiers(resource_group_name, name, custom_headers:nil) first_page = list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppInstanceCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43161 def list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers:nil) response = list_instance_identifiers_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_identifiers_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8825 def list_instance_identifiers_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppInstanceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppInstanceCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38498 def list_instance_identifiers_next(next_page_link, custom_headers:nil) response = list_instance_identifiers_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38531 def list_instance_identifiers_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppInstanceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38515 def list_instance_identifiers_next_with_http_info(next_page_link, custom_headers:nil) list_instance_identifiers_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteInstance>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23058 def list_instance_identifiers_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppInstanceCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43741 def list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_identifiers_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23097 def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppInstanceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppInstanceCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40556 def list_instance_identifiers_slot_next(next_page_link, custom_headers:nil) response = list_instance_identifiers_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40589 def list_instance_identifiers_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppInstanceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40573 def list_instance_identifiers_slot_next_with_http_info(next_page_link, custom_headers:nil) list_instance_identifiers_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23078 def list_instance_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets all scale-out instances of an app.
Gets all scale-out instances of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8808 def list_instance_identifiers_with_http_info(resource_group_name, name, custom_headers:nil) list_instance_identifiers_async(resource_group_name, name, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessModuleInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9668 def list_instance_process_modules(resource_group_name, name, process_id, instance_id, custom_headers:nil) first_page = list_instance_process_modules_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers) first_page.get_all_items end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43222 def list_instance_process_modules_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers:nil) response = list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_process_modules_next_async(next_page_link, custom_headers:custom_headers) end page end end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9715 def list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38698 def list_instance_process_modules_next(next_page_link, custom_headers:nil) response = list_instance_process_modules_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38735 def list_instance_process_modules_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38717 def list_instance_process_modules_next_with_http_info(next_page_link, custom_headers:nil) list_instance_process_modules_next_async(next_page_link, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessModuleInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23989 def list_instance_process_modules_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) first_page = list_instance_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers) first_page.get_all_items end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43806 def list_instance_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) response = list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_process_modules_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24040 def list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40756 def list_instance_process_modules_slot_next(next_page_link, custom_headers:nil) response = list_instance_process_modules_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40793 def list_instance_process_modules_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40775 def list_instance_process_modules_slot_next_with_http_info(next_page_link, custom_headers:nil) list_instance_process_modules_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24015 def list_instance_process_modules_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9692 def list_instance_process_modules_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessThreadInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9924 def list_instance_process_threads(resource_group_name, name, process_id, instance_id, custom_headers:nil) first_page = list_instance_process_threads_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers) first_page.get_all_items end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43253 def list_instance_process_threads_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers:nil) response = list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_process_threads_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9971 def list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38800 def list_instance_process_threads_next(next_page_link, custom_headers:nil) response = list_instance_process_threads_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38837 def list_instance_process_threads_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38819 def list_instance_process_threads_next_with_http_info(next_page_link, custom_headers:nil) list_instance_process_threads_next_async(next_page_link, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessThreadInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24259 def list_instance_process_threads_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) first_page = list_instance_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers) first_page.get_all_items end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43839 def list_instance_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) response = list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_process_threads_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24310 def list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40858 def list_instance_process_threads_slot_next(next_page_link, custom_headers:nil) response = list_instance_process_threads_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40895 def list_instance_process_threads_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40877 def list_instance_process_threads_slot_next_with_http_info(next_page_link, custom_headers:nil) list_instance_process_threads_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24285 def list_instance_process_threads_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9948 def list_instance_process_threads_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9171 def list_instance_processes(resource_group_name, name, instance_id, custom_headers:nil) first_page = list_instance_processes_as_lazy(resource_group_name, name, instance_id, custom_headers:custom_headers) first_page.get_all_items end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43191 def list_instance_processes_as_lazy(resource_group_name, name, instance_id, custom_headers:nil) response = list_instance_processes_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_processes_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9216 def list_instance_processes_async(resource_group_name, name, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38596 def list_instance_processes_next(next_page_link, custom_headers:nil) response = list_instance_processes_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38633 def list_instance_processes_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38615 def list_instance_processes_next_with_http_info(next_page_link, custom_headers:nil) list_instance_processes_next_async(next_page_link, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23464 def list_instance_processes_slot(resource_group_name, name, slot, instance_id, custom_headers:nil) first_page = list_instance_processes_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers:custom_headers) first_page.get_all_items end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43773 def list_instance_processes_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers:nil) response = list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_instance_processes_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23513 def list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40654 def list_instance_processes_slot_next(next_page_link, custom_headers:nil) response = list_instance_processes_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40691 def list_instance_processes_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40673 def list_instance_processes_slot_next_with_http_info(next_page_link, custom_headers:nil) list_instance_processes_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 23489 def list_instance_processes_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers:nil) list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param instance_id [String] 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”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 9194 def list_instance_processes_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) list_instance_processes_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value! end
Gets the metadata of an app.
Gets the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3065 def list_metadata(resource_group_name, name, custom_headers:nil) response = list_metadata_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the metadata of an app.
Gets the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3100 def list_metadata_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the metadata of an app.
Gets the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17241 def list_metadata_slot(resource_group_name, name, slot, custom_headers:nil) response = list_metadata_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the metadata of an app.
Gets the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17280 def list_metadata_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the metadata of an app.
Gets the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17261 def list_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_metadata_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the metadata of an app.
Gets the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3083 def list_metadata_with_http_info(resource_group_name, name, custom_headers:nil) list_metadata_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetricDefinition>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10386 def list_metric_definitions(resource_group_name, name, custom_headers:nil) first_page = list_metric_definitions_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43278 def list_metric_definitions_as_lazy(resource_group_name, name, custom_headers:nil) response = list_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_metric_definitions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10421 def list_metric_definitions_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38900 def list_metric_definitions_next(next_page_link, custom_headers:nil) response = list_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38933 def list_metric_definitions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38917 def list_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil) list_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetricDefinition>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24749 def list_metric_definitions_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43866 def list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_metric_definitions_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24788 def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40958 def list_metric_definitions_slot_next(next_page_link, custom_headers:nil) response = list_metric_definitions_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40991 def list_metric_definitions_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 40975 def list_metric_definitions_slot_next_with_http_info(next_page_link, custom_headers:nil) list_metric_definitions_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24769 def list_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets all metric definitions of an app (or deployment slot, if specified).
Gets all metric definitions of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10404 def list_metric_definitions_with_http_info(resource_group_name, name, custom_headers:nil) list_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetric>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10498 def list_metrics(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) first_page = list_metrics_as_lazy(resource_group_name, name, details:details, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43309 def list_metrics_as_lazy(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) response = list_metrics_async(resource_group_name, name, details:details, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_metrics_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10545 def list_metrics_async(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'details' => details,'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 38996 def list_metrics_next(next_page_link, custom_headers:nil) response = list_metrics_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39029 def list_metrics_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39013 def list_metrics_next_with_http_info(next_page_link, custom_headers:nil) list_metrics_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetric>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24868 def list_metrics_slot(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) first_page = list_metrics_slot_as_lazy(resource_group_name, name, slot, details:details, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43899 def list_metrics_slot_as_lazy(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) response = list_metrics_slot_async(resource_group_name, name, slot, details:details, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_metrics_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24919 def list_metrics_slot_async(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'details' => details,'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41054 def list_metrics_slot_next(next_page_link, custom_headers:nil) response = list_metrics_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41087 def list_metrics_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41071 def list_metrics_slot_next_with_http_info(next_page_link, custom_headers:nil) list_metrics_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24894 def list_metrics_slot_with_http_info(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) list_metrics_slot_async(resource_group_name, name, slot, details:details, filter:filter, custom_headers:custom_headers).value! end
Gets performance metrics of an app (or deployment slot, if specified).
Gets performance metrics of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10522 def list_metrics_with_http_info(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) list_metrics_async(resource_group_name, name, details:details, filter:filter, custom_headers:custom_headers).value! end
Gets all network features used by the app (or deployment slot, if specified).
Gets all network features used by the app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param view [String] The type of view. This can either be “summary” or “detailed”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NetworkFeatures] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10833 def list_network_features(resource_group_name, name, view, custom_headers:nil) response = list_network_features_async(resource_group_name, name, view, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all network features used by the app (or deployment slot, if specified).
Gets all network features used by the app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param view [String] The type of view. This can either be “summary” or “detailed”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10872 def list_network_features_async(resource_group_name, name, view, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::NetworkFeatures.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all network features used by the app (or deployment slot, if specified).
Gets all network features used by the app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param view [String] The type of view. This can either be “summary” or “detailed”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NetworkFeatures] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25112 def list_network_features_slot(resource_group_name, name, view, slot, custom_headers:nil) response = list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all network features used by the app (or deployment slot, if specified).
Gets all network features used by the app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param view [String] The type of view. This can either be “summary” or “detailed”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25155 def list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::NetworkFeatures.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets all network features used by the app (or deployment slot, if specified).
Gets all network features used by the app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param view [String] The type of view. This can either be “summary” or “detailed”. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25134 def list_network_features_slot_with_http_info(resource_group_name, name, view, slot, custom_headers:nil) list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers:custom_headers).value! end
Gets all network features used by the app (or deployment slot, if specified).
Gets all network features used by the app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param view [String] The type of view. This can either be “summary” or “detailed”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10853 def list_network_features_with_http_info(resource_group_name, name, view, custom_headers:nil) list_network_features_async(resource_group_name, name, view, custom_headers:custom_headers).value! end
Get all apps for a subscription.
Get all apps for a subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37532 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all apps for a subscription.
Get all apps for a subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37565 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all apps for a subscription.
Get all apps for a subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 37549 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<PerfMonResponse>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11290 def list_perf_mon_counters(resource_group_name, name, filter:nil, custom_headers:nil) first_page = list_perf_mon_counters_as_lazy(resource_group_name, name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PerfMonCounterCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43338 def list_perf_mon_counters_as_lazy(resource_group_name, name, filter:nil, custom_headers:nil) response = list_perf_mon_counters_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_perf_mon_counters_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param filter [String] 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11333 def list_perf_mon_counters_async(resource_group_name, name, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PerfMonCounterCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PerfMonCounterCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39092 def list_perf_mon_counters_next(next_page_link, custom_headers:nil) response = list_perf_mon_counters_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39125 def list_perf_mon_counters_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PerfMonCounterCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39109 def list_perf_mon_counters_next_with_http_info(next_page_link, custom_headers:nil) list_perf_mon_counters_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<PerfMonResponse>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25591 def list_perf_mon_counters_slot(resource_group_name, name, slot, filter:nil, custom_headers:nil) first_page = list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PerfMonCounterCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43930 def list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter:nil, custom_headers:nil) response = list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_perf_mon_counters_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param filter [String] 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25638 def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PerfMonCounterCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PerfMonCounterCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41150 def list_perf_mon_counters_slot_next(next_page_link, custom_headers:nil) response = list_perf_mon_counters_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41183 def list_perf_mon_counters_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PerfMonCounterCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41167 def list_perf_mon_counters_slot_next_with_http_info(next_page_link, custom_headers:nil) list_perf_mon_counters_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25615 def list_perf_mon_counters_slot_with_http_info(resource_group_name, name, slot, filter:nil, custom_headers:nil) list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter:filter, custom_headers:custom_headers).value! end
Gets perfmon counters for web app.
Gets perfmon counters for web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11312 def list_perf_mon_counters_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil) list_perf_mon_counters_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value! end
Gets the premier add-ons of an app.
Gets the premier add-ons of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOn] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11511 def list_premier_add_ons(resource_group_name, name, custom_headers:nil) response = list_premier_add_ons_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the premier add-ons of an app.
Gets the premier add-ons of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11546 def list_premier_add_ons_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the premier add-ons of an app.
Gets the premier add-ons of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOn] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25826 def list_premier_add_ons_slot(resource_group_name, name, slot, custom_headers:nil) response = list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the premier add-ons of an app.
Gets the premier add-ons of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25865 def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the premier add-ons of an app.
Gets the premier add-ons of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25846 def list_premier_add_ons_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the premier add-ons of an app.
Gets the premier add-ons of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11529 def list_premier_add_ons_with_http_info(resource_group_name, name, custom_headers:nil) list_premier_add_ons_async(resource_group_name, name, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessModuleInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12409 def list_process_modules(resource_group_name, name, process_id, custom_headers:nil) first_page = list_process_modules_as_lazy(resource_group_name, name, process_id, custom_headers:custom_headers) first_page.get_all_items end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43393 def list_process_modules_as_lazy(resource_group_name, name, process_id, custom_headers:nil) response = list_process_modules_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_process_modules_next_async(next_page_link, custom_headers:custom_headers) end page end end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12450 def list_process_modules_async(resource_group_name, name, process_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39292 def list_process_modules_next(next_page_link, custom_headers:nil) response = list_process_modules_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39329 def list_process_modules_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39311 def list_process_modules_next_with_http_info(next_page_link, custom_headers:nil) list_process_modules_next_async(next_page_link, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessModuleInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26780 def list_process_modules_slot(resource_group_name, name, process_id, slot, custom_headers:nil) first_page = list_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers:custom_headers) first_page.get_all_items end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43989 def list_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers:nil) response = list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_process_modules_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26825 def list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessModuleInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41350 def list_process_modules_slot_next(next_page_link, custom_headers:nil) response = list_process_modules_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41387 def list_process_modules_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41369 def list_process_modules_slot_next_with_http_info(next_page_link, custom_headers:nil) list_process_modules_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26803 def list_process_modules_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! end
List module information for a process by its ID for a specific scaled-out instance in a web site.
List module information for a process by its ID for a specific scaled-out instance in a web site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12430 def list_process_modules_with_http_info(resource_group_name, name, process_id, custom_headers:nil) list_process_modules_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessThreadInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12645 def list_process_threads(resource_group_name, name, process_id, custom_headers:nil) first_page = list_process_threads_as_lazy(resource_group_name, name, process_id, custom_headers:custom_headers) first_page.get_all_items end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43421 def list_process_threads_as_lazy(resource_group_name, name, process_id, custom_headers:nil) response = list_process_threads_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_process_threads_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12686 def list_process_threads_async(resource_group_name, name, process_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39394 def list_process_threads_next(next_page_link, custom_headers:nil) response = list_process_threads_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39431 def list_process_threads_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39413 def list_process_threads_next_with_http_info(next_page_link, custom_headers:nil) list_process_threads_next_async(next_page_link, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessThreadInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27030 def list_process_threads_slot(resource_group_name, name, process_id, slot, custom_headers:nil) first_page = list_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers:custom_headers) first_page.get_all_items end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44019 def list_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers:nil) response = list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_process_threads_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27075 def list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessThreadInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41452 def list_process_threads_slot_next(next_page_link, custom_headers:nil) response = list_process_threads_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41489 def list_process_threads_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List the threads in 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41471 def list_process_threads_slot_next_with_http_info(next_page_link, custom_headers:nil) list_process_threads_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27053 def list_process_threads_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers:custom_headers).value! end
List the threads in 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12666 def list_process_threads_with_http_info(resource_group_name, name, process_id, custom_headers:nil) list_process_threads_async(resource_group_name, name, process_id, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11952 def list_processes(resource_group_name, name, custom_headers:nil) first_page = list_processes_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43365 def list_processes_as_lazy(resource_group_name, name, custom_headers:nil) response = list_processes_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_processes_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11991 def list_processes_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39190 def list_processes_next(next_page_link, custom_headers:nil) response = list_processes_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39227 def list_processes_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39209 def list_processes_next_with_http_info(next_page_link, custom_headers:nil) list_processes_next_async(next_page_link, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ProcessInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26295 def list_processes_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_processes_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43959 def list_processes_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_processes_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_processes_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26338 def list_processes_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ProcessInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41248 def list_processes_slot_next(next_page_link, custom_headers:nil) response = list_processes_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41285 def list_processes_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of processes for a web site, or a deployment slot, or 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.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41267 def list_processes_slot_next_with_http_info(next_page_link, custom_headers:nil) list_processes_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 26317 def list_processes_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_processes_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Get list of processes for a web site, or a deployment slot, or 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.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11972 def list_processes_with_http_info(resource_group_name, name, custom_headers:nil) list_processes_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<PublicCertificate>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12878 def list_public_certificates(resource_group_name, name, custom_headers:nil) first_page = list_public_certificates_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificateCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43446 def list_public_certificates_as_lazy(resource_group_name, name, custom_headers:nil) response = list_public_certificates_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_public_certificates_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12913 def list_public_certificates_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificateCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39494 def list_public_certificates_next(next_page_link, custom_headers:nil) response = list_public_certificates_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39527 def list_public_certificates_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39511 def list_public_certificates_next_with_http_info(next_page_link, custom_headers:nil) list_public_certificates_next_async(next_page_link, custom_headers:custom_headers).value! end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<PublicCertificate>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27277 def list_public_certificates_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificateCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44046 def list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_public_certificates_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27316 def list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PublicCertificateCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41552 def list_public_certificates_slot_next(next_page_link, custom_headers:nil) response = list_public_certificates_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41585 def list_public_certificates_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41569 def list_public_certificates_slot_next_with_http_info(next_page_link, custom_headers:nil) list_public_certificates_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27297 def list_public_certificates_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Get public certificates for an app or a deployment slot.
Get public certificates for an app or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 12896 def list_public_certificates_with_http_info(resource_group_name, name, custom_headers:nil) list_public_certificates_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [User] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3171 def list_publishing_credentials(resource_group_name, name, custom_headers:nil) response = list_publishing_credentials_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3186 def list_publishing_credentials_async(resource_group_name, name, custom_headers:nil) # Send request promise = begin_list_publishing_credentials_async(resource_group_name, name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::User.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Gets the Git/FTP publishing credentials of an app.
Gets the Git/FTP publishing credentials of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [User] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17354 def list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers:nil) response = list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17371 def list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:nil) # Send request promise = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::User.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Gets the publishing profile for an app (or deployment slot, if specified).
Gets the publishing profile for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param publishing_profile_options [CsmPublishingProfileOptions] Specifies publishingProfileOptions for publishing profile. For example, use {“format”: “FileZilla3”} to get a FileZilla publishing profile. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13326 def list_publishing_profile_xml_with_secrets(resource_group_name, name, publishing_profile_options, custom_headers:nil) response = list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the publishing profile for an app (or deployment slot, if specified).
Gets the publishing profile for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param publishing_profile_options [CsmPublishingProfileOptions] Specifies publishingProfileOptions for publishing profile. For example, use {“format”: “FileZilla3”} to get a FileZilla publishing profile. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13367 def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmPublishingProfileOptions.mapper() request_content = @client.serialize(request_mapper, publishing_profile_options) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the publishing profile for an app (or deployment slot, if specified).
Gets the publishing profile for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param publishing_profile_options [CsmPublishingProfileOptions] Specifies publishingProfileOptions for publishing profile. For example, use {“format”: “FileZilla3”} to get a FileZilla publishing profile. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [NOT_IMPLEMENTED] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27753 def list_publishing_profile_xml_with_secrets_slot(resource_group_name, name, publishing_profile_options, slot, custom_headers:nil) response = list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the publishing profile for an app (or deployment slot, if specified).
Gets the publishing profile for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param publishing_profile_options [CsmPublishingProfileOptions] Specifies publishingProfileOptions for publishing profile. For example, use {“format”: “FileZilla3”} to get a FileZilla publishing profile. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27798 def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmPublishingProfileOptions.mapper() request_content = @client.serialize(request_mapper, publishing_profile_options) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the publishing profile for an app (or deployment slot, if specified).
Gets the publishing profile for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param publishing_profile_options [CsmPublishingProfileOptions] Specifies publishingProfileOptions for publishing profile. For example, use {“format”: “FileZilla3”} to get a FileZilla publishing profile. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27776 def list_publishing_profile_xml_with_secrets_slot_with_http_info(resource_group_name, name, publishing_profile_options, slot, custom_headers:nil) list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers:custom_headers).value! end
Gets the publishing profile for an app (or deployment slot, if specified).
Gets the publishing profile for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param publishing_profile_options [CsmPublishingProfileOptions] Specifies publishingProfileOptions for publishing profile. For example, use {“format”: “FileZilla3”} to get a FileZilla publishing profile. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13347 def list_publishing_profile_xml_with_secrets_with_http_info(resource_group_name, name, publishing_profile_options, custom_headers:nil) list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers:custom_headers).value! end
Gets hybrid connections configured for an app (or deployment slot, if specified).
Gets hybrid connections configured for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8211 def list_relay_service_connections(resource_group_name, name, custom_headers:nil) response = list_relay_service_connections_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets hybrid connections configured for an app (or deployment slot, if specified).
Gets hybrid connections configured for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8250 def list_relay_service_connections_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets hybrid connections configured for an app (or deployment slot, if specified).
Gets hybrid connections configured for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22444 def list_relay_service_connections_slot(resource_group_name, name, slot, custom_headers:nil) response = list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets hybrid connections configured for an app (or deployment slot, if specified).
Gets hybrid connections configured for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22487 def list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets hybrid connections configured for an app (or deployment slot, if specified).
Gets hybrid connections configured for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22466 def list_relay_service_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets hybrid connections configured for an app (or deployment slot, if specified).
Gets hybrid connections configured for an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8231 def list_relay_service_connections_with_http_info(resource_group_name, name, custom_headers:nil) list_relay_service_connections_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteExtensionInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13715 def list_site_extensions(resource_group_name, name, custom_headers:nil) first_page = list_site_extensions_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43471 def list_site_extensions_as_lazy(resource_group_name, name, custom_headers:nil) response = list_site_extensions_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_extensions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13750 def list_site_extensions_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39590 def list_site_extensions_next(next_page_link, custom_headers:nil) response = list_site_extensions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39623 def list_site_extensions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39607 def list_site_extensions_next_with_http_info(next_page_link, custom_headers:nil) list_site_extensions_next_async(next_page_link, custom_headers:custom_headers).value! end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SiteExtensionInfo>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28167 def list_site_extensions_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_site_extensions_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfoCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44073 def list_site_extensions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_extensions_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28206 def list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteExtensionInfoCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41648 def list_site_extensions_slot_next(next_page_link, custom_headers:nil) response = list_site_extensions_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41681 def list_site_extensions_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteExtensionInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41665 def list_site_extensions_slot_next_with_http_info(next_page_link, custom_headers:nil) list_site_extensions_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28187 def list_site_extensions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Get list of siteextensions for a web site, or a deployment slot.
Get list of siteextensions for a web site, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13733 def list_site_extensions_with_http_info(resource_group_name, name, custom_headers:nil) list_site_extensions_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the Push settings associated with web app.
Gets the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PushSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3334 def list_site_push_settings(resource_group_name, name, custom_headers:nil) response = list_site_push_settings_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the Push settings associated with web app.
Gets the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3369 def list_site_push_settings_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Push settings associated with web app.
Gets the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PushSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17528 def list_site_push_settings_slot(resource_group_name, name, slot, custom_headers:nil) response = list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the Push settings associated with web app.
Gets the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17567 def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the Push settings associated with web app.
Gets the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17548 def list_site_push_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the Push settings associated with web app.
Gets the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3352 def list_site_push_settings_with_http_info(resource_group_name, name, custom_headers:nil) list_site_push_settings_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the names of app settings and connection strings that stick to the slot (not swapped).
Gets the names of app settings and connection strings that stick to the slot (not swapped).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SlotConfigNamesResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3442 def list_slot_configuration_names(resource_group_name, name, custom_headers:nil) response = list_slot_configuration_names_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the names of app settings and connection strings that stick to the slot (not swapped).
Gets the names of app settings and connection strings that stick to the slot (not swapped).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3481 def list_slot_configuration_names_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotConfigNamesResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the names of app settings and connection strings that stick to the slot (not swapped).
Gets the names of app settings and connection strings that stick to the slot (not swapped).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3462 def list_slot_configuration_names_with_http_info(resource_group_name, name, custom_headers:nil) list_slot_configuration_names_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SlotDifference>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31768 def list_slot_differences_from_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) first_page = list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers) first_page.get_all_items end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SlotDifferenceCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44270 def list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers:nil) response = list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_slot_differences_from_production_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31807 def list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmSlotEntity.mapper() request_content = @client.serialize(request_mapper, slot_swap_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotDifferenceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SlotDifferenceCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42326 def list_slot_differences_from_production_next(next_page_link, custom_headers:nil) response = list_slot_differences_from_production_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42359 def list_slot_differences_from_production_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotDifferenceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42343 def list_slot_differences_from_production_next_with_http_info(next_page_link, custom_headers:nil) list_slot_differences_from_production_next_async(next_page_link, custom_headers:custom_headers).value! end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31788 def list_slot_differences_from_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil) list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SlotDifference>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28563 def list_slot_differences_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) first_page = list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers) first_page.get_all_items end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SlotDifferenceCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44102 def list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) response = list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_slot_differences_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28606 def list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmSlotEntity.mapper() request_content = @client.serialize(request_mapper, slot_swap_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotDifferenceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SlotDifferenceCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41744 def list_slot_differences_slot_next(next_page_link, custom_headers:nil) response = list_slot_differences_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41777 def list_slot_differences_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotDifferenceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41761 def list_slot_differences_slot_next_with_http_info(next_page_link, custom_headers:nil) list_slot_differences_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get the difference in configuration settings between two web app slots.
Get the difference in configuration settings between two web app slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28585 def list_slot_differences_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14084 def list_slots(resource_group_name, name, custom_headers:nil) first_page = list_slots_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 43496 def list_slots_as_lazy(resource_group_name, name, custom_headers:nil) response = list_slots_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_slots_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14119 def list_slots_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39686 def list_slots_next(next_page_link, custom_headers:nil) response = list_slots_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39719 def list_slots_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 39703 def list_slots_next_with_http_info(next_page_link, custom_headers:nil) list_slots_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets an app's deployment slots.
Gets an app's deployment slots.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14102 def list_slots_with_http_info(resource_group_name, name, custom_headers:nil) list_slots_async(resource_group_name, name, custom_headers:custom_headers).value! end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Snapshot>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31932 def list_snapshots(resource_group_name, name, custom_headers:nil) first_page = list_snapshots_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SnapshotCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44295 def list_snapshots_as_lazy(resource_group_name, name, custom_headers:nil) response = list_snapshots_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_snapshots_next_async(next_page_link, custom_headers:custom_headers) end page end end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31967 def list_snapshots_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SnapshotCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SnapshotCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42422 def list_snapshots_next(next_page_link, custom_headers:nil) response = list_snapshots_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42455 def list_snapshots_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SnapshotCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42439 def list_snapshots_next_with_http_info(next_page_link, custom_headers:nil) list_snapshots_next_async(next_page_link, custom_headers:custom_headers).value! end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param slot [String] Website Slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Snapshot>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28737 def list_snapshots_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param slot [String] Website Slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SnapshotCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44128 def list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_snapshots_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_snapshots_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param slot [String] Website Slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28774 def list_snapshots_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SnapshotCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SnapshotCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41840 def list_snapshots_slot_next(next_page_link, custom_headers:nil) response = list_snapshots_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41873 def list_snapshots_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SnapshotCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41857 def list_snapshots_slot_next_with_http_info(next_page_link, custom_headers:nil) list_snapshots_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param slot [String] Website Slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28756 def list_snapshots_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_snapshots_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Returns all Snapshots to the user.
Returns all Snapshots to the user.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Website Name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31950 def list_snapshots_with_http_info(resource_group_name, name, custom_headers:nil) list_snapshots_async(resource_group_name, name, custom_headers:custom_headers).value! end
This is to allow calling via powershell and ARM template.
This is to allow calling via powershell and ARM template.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionSecrets] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10280 def list_sync_function_triggers(resource_group_name, name, custom_headers:nil) response = list_sync_function_triggers_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
This is to allow calling via powershell and ARM template.
This is to allow calling via powershell and ARM template.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10315 def list_sync_function_triggers_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
This is to allow calling via powershell and ARM template.
This is to allow calling via powershell and ARM template.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [FunctionSecrets] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24636 def list_sync_function_triggers_slot(resource_group_name, name, slot, custom_headers:nil) response = list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
This is to allow calling via powershell and ARM template.
This is to allow calling via powershell and ARM template.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24675 def list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
This is to allow calling via powershell and ARM template.
This is to allow calling via powershell and ARM template.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 24656 def list_sync_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
This is to allow calling via powershell and ARM template.
This is to allow calling via powershell and ARM template.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10298 def list_sync_function_triggers_with_http_info(resource_group_name, name, custom_headers:nil) list_sync_function_triggers_async(resource_group_name, name, custom_headers:custom_headers).value! end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<TriggeredJobHistory>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33135 def list_triggered_web_job_history(resource_group_name, name, web_job_name, custom_headers:nil) first_page = list_triggered_web_job_history_as_lazy(resource_group_name, name, web_job_name, custom_headers:custom_headers) first_page.get_all_items end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredJobHistoryCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44346 def list_triggered_web_job_history_as_lazy(resource_group_name, name, web_job_name, custom_headers:nil) response = list_triggered_web_job_history_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_triggered_web_job_history_next_async(next_page_link, custom_headers:custom_headers) end page end end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33172 def list_triggered_web_job_history_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredJobHistoryCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredJobHistoryCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42614 def list_triggered_web_job_history_next(next_page_link, custom_headers:nil) response = list_triggered_web_job_history_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42647 def list_triggered_web_job_history_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredJobHistoryCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42631 def list_triggered_web_job_history_next_with_http_info(next_page_link, custom_headers:nil) list_triggered_web_job_history_next_async(next_page_link, custom_headers:custom_headers).value! end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<TriggeredJobHistory>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30019 def list_triggered_web_job_history_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) first_page = list_triggered_web_job_history_slot_as_lazy(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers) first_page.get_all_items end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredJobHistoryCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44183 def list_triggered_web_job_history_slot_as_lazy(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = list_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30060 def list_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredJobHistoryCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredJobHistoryCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42032 def list_triggered_web_job_history_slot_next(next_page_link, custom_headers:nil) response = list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42065 def list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredJobHistoryCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42049 def list_triggered_web_job_history_slot_next_with_http_info(next_page_link, custom_headers:nil) list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30040 def list_triggered_web_job_history_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) list_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
List a triggered web job's history for an app, or a deployment slot.
List a triggered web job's history for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33154 def list_triggered_web_job_history_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) list_triggered_web_job_history_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<TriggeredWebJob>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32819 def list_triggered_web_jobs(resource_group_name, name, custom_headers:nil) first_page = list_triggered_web_jobs_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredWebJobCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44320 def list_triggered_web_jobs_as_lazy(resource_group_name, name, custom_headers:nil) response = list_triggered_web_jobs_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_triggered_web_jobs_next_async(next_page_link, custom_headers:custom_headers) end page end end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32854 def list_triggered_web_jobs_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredWebJobCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42518 def list_triggered_web_jobs_next(next_page_link, custom_headers:nil) response = list_triggered_web_jobs_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42551 def list_triggered_web_jobs_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42535 def list_triggered_web_jobs_next_with_http_info(next_page_link, custom_headers:nil) list_triggered_web_jobs_next_async(next_page_link, custom_headers:custom_headers).value! end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<TriggeredWebJob>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29682 def list_triggered_web_jobs_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_triggered_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredWebJobCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44155 def list_triggered_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_triggered_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29721 def list_triggered_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [TriggeredWebJobCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41936 def list_triggered_web_jobs_slot_next(next_page_link, custom_headers:nil) response = list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41969 def list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::TriggeredWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 41953 def list_triggered_web_jobs_slot_next_with_http_info(next_page_link, custom_headers:nil) list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29702 def list_triggered_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_triggered_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
List triggered web jobs for an app, or a deployment slot.
List triggered web jobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32837 def list_triggered_web_jobs_with_http_info(resource_group_name, name, custom_headers:nil) list_triggered_web_jobs_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<CsmUsageQuota>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33469 def list_usages(resource_group_name, name, filter:nil, custom_headers:nil) first_page = list_usages_as_lazy(resource_group_name, name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CsmUsageQuotaCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44377 def list_usages_as_lazy(resource_group_name, name, filter:nil, custom_headers:nil) response = list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_usages_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param filter [String] 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33516 def list_usages_async(resource_group_name, name, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmUsageQuotaCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CsmUsageQuotaCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42712 def list_usages_next(next_page_link, custom_headers:nil) response = list_usages_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42749 def list_usages_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmUsageQuotaCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42731 def list_usages_next_with_http_info(next_page_link, custom_headers:nil) list_usages_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<CsmUsageQuota>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30374 def list_usages_slot(resource_group_name, name, slot, filter:nil, custom_headers:nil) first_page = list_usages_slot_as_lazy(resource_group_name, name, slot, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CsmUsageQuotaCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44216 def list_usages_slot_as_lazy(resource_group_name, name, slot, filter:nil, custom_headers:nil) response = list_usages_slot_async(resource_group_name, name, slot, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_usages_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. @param filter [String] 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30425 def list_usages_slot_async(resource_group_name, name, slot, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmUsageQuotaCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CsmUsageQuotaCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42130 def list_usages_slot_next(next_page_link, custom_headers:nil) response = list_usages_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42167 def list_usages_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::CsmUsageQuotaCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42149 def list_usages_slot_next_with_http_info(next_page_link, custom_headers:nil) list_usages_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30400 def list_usages_slot_with_http_info(resource_group_name, name, slot, filter:nil, custom_headers:nil) list_usages_slot_async(resource_group_name, name, slot, filter:filter, custom_headers:custom_headers).value! end
Gets the quota usage information of an app (or deployment slot, if specified).
Gets the quota usage information of an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param filter [String] 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33493 def list_usages_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil) list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value! end
Gets the virtual networks the app (or deployment slot) is connected to.
Gets the virtual networks the app (or deployment slot) is connected to.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33588 def list_vnet_connections(resource_group_name, name, custom_headers:nil) response = list_vnet_connections_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the virtual networks the app (or deployment slot) is connected to.
Gets the virtual networks the app (or deployment slot) is connected to.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33623 def list_vnet_connections_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'VnetInfoElementType', type: { name: 'Composite', class_name: 'VnetInfo' } } } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the virtual networks the app (or deployment slot) is connected to.
Gets the virtual networks the app (or deployment slot) is connected to.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30500 def list_vnet_connections_slot(resource_group_name, name, slot, custom_headers:nil) response = list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the virtual networks the app (or deployment slot) is connected to.
Gets the virtual networks the app (or deployment slot) is connected to.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30539 def list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'VnetInfoElementType', type: { name: 'Composite', class_name: 'VnetInfo' } } } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the virtual networks the app (or deployment slot) is connected to.
Gets the virtual networks the app (or deployment slot) is connected to.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30520 def list_vnet_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Gets the virtual networks the app (or deployment slot) is connected to.
Gets the virtual networks the app (or deployment slot) is connected to.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33606 def list_vnet_connections_with_http_info(resource_group_name, name, custom_headers:nil) list_vnet_connections_async(resource_group_name, name, custom_headers:custom_headers).value! end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<WebJob>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34564 def list_web_jobs(resource_group_name, name, custom_headers:nil) first_page = list_web_jobs_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebJobCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44402 def list_web_jobs_as_lazy(resource_group_name, name, custom_headers:nil) response = list_web_jobs_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_jobs_next_async(next_page_link, custom_headers:custom_headers) end page end end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34599 def list_web_jobs_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebJobCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42812 def list_web_jobs_next(next_page_link, custom_headers:nil) response = list_web_jobs_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42845 def list_web_jobs_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42829 def list_web_jobs_next_with_http_info(next_page_link, custom_headers:nil) list_web_jobs_next_async(next_page_link, custom_headers:custom_headers).value! end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<WebJob>] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31538 def list_web_jobs_slot(resource_group_name, name, slot, custom_headers:nil) first_page = list_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers) first_page.get_all_items end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebJobCollection] which provide lazy access to pages of the response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 44243 def list_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) response = list_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31577 def list_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebJobCollection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42230 def list_web_jobs_slot_next(next_page_link, custom_headers:nil) response = list_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42263 def list_web_jobs_slot_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::WebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 42247 def list_web_jobs_slot_next_with_http_info(next_page_link, custom_headers:nil) list_web_jobs_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31558 def list_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) list_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
List webjobs for an app, or a deployment slot.
List webjobs for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34582 def list_web_jobs_with_http_info(resource_group_name, name, custom_headers:nil) list_web_jobs_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get all apps for a subscription.
Get all apps for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 49 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end
Migrates a local (in-app) MySql database to a remote MySql database.
Migrates a local (in-app) MySql database to a remote MySql database.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_request_envelope [MigrateMySqlRequest] MySql migration options. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Operation] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10671 def migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers:nil) response = migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_request_envelope [MigrateMySqlRequest] MySql migration options. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10688 def migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:nil) # Send request promise = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Operation.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Restores a web app.
Restores a web app.
@param subscription_name [String] Azure
subscription. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_options [StorageMigrationOptions] Migration migrationOptions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StorageMigrationResponse] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10620 def migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) response = migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:custom_headers).value! response.body unless response.nil? end
@param subscription_name [String] Azure
subscription. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param migration_options [StorageMigrationOptions] Migration migrationOptions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10638 def migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) # Send request promise = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StorageMigrationResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13454 def recover(resource_group_name, name, recovery_entity, custom_headers:nil) response = recover_async(resource_group_name, name, recovery_entity, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13472 def recover_async(resource_group_name, name, recovery_entity, custom_headers:nil) # Send request promise = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Reverts the configuration of an app to a previous snapshot.
Reverts the configuration of an app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4252 def recover_site_configuration_snapshot(resource_group_name, name, snapshot_id, custom_headers:nil) response = recover_site_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:custom_headers).value! nil end
Reverts the configuration of an app to a previous snapshot.
Reverts the configuration of an app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4289 def recover_site_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Reverts the configuration of an app to a previous snapshot.
Reverts the configuration of an app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18250 def recover_site_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers:nil) response = recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:custom_headers).value! nil end
Reverts the configuration of an app to a previous snapshot.
Reverts the configuration of an app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18291 def recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Reverts the configuration of an app to a previous snapshot.
Reverts the configuration of an app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18271 def recover_site_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers:nil) recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:custom_headers).value! end
Reverts the configuration of an app to a previous snapshot.
Reverts the configuration of an app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param snapshot_id [String] The ID of the snapshot to read. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4271 def recover_site_configuration_snapshot_with_http_info(resource_group_name, name, snapshot_id, custom_headers:nil) recover_site_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:custom_headers).value! end
Recovers a web app to a previous snapshot.
Recovers a web app to a previous snapshot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27888 def recover_slot(resource_group_name, name, recovery_entity, slot, custom_headers:nil) response = recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27908 def recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers:nil) # Send request promise = begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13502 def reset_production_slot_config(resource_group_name, name, custom_headers:nil) response = reset_production_slot_config_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13541 def reset_production_slot_config_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13522 def reset_production_slot_config_with_http_info(resource_group_name, name, custom_headers:nil) reset_production_slot_config_async(resource_group_name, name, custom_headers:custom_headers).value! end
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27940 def reset_slot_configuration_slot(resource_group_name, name, slot, custom_headers:nil) response = reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27983 def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 27962 def reset_slot_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Restarts an app (or deployment slot, if specified).
Restarts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param soft_restart [Boolean] Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. @param synchronous [Boolean] Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13607 def restart(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil) response = restart_async(resource_group_name, name, soft_restart:soft_restart, synchronous:synchronous, custom_headers:custom_headers).value! nil end
Restarts an app (or deployment slot, if specified).
Restarts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param soft_restart [Boolean] Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. @param synchronous [Boolean] Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13654 def restart_async(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Restarts an app (or deployment slot, if specified).
Restarts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restart the production slot. @param soft_restart [Boolean] Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. @param synchronous [Boolean] Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28052 def restart_slot(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil) response = restart_slot_async(resource_group_name, name, slot, soft_restart:soft_restart, synchronous:synchronous, custom_headers:custom_headers).value! nil end
Restarts an app (or deployment slot, if specified).
Restarts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restart the production slot. @param soft_restart [Boolean] Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. @param synchronous [Boolean] Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28103 def restart_slot_async(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Restarts an app (or deployment slot, if specified).
Restarts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restart the production slot. @param soft_restart [Boolean] Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. @param synchronous [Boolean] Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28078 def restart_slot_with_http_info(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil) restart_slot_async(resource_group_name, name, slot, soft_restart:soft_restart, synchronous:synchronous, custom_headers:custom_headers).value! end
Restarts an app (or deployment slot, if specified).
Restarts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param soft_restart [Boolean] Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. @param synchronous [Boolean] Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 13631 def restart_with_http_info(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil) restart_async(resource_group_name, name, soft_restart:soft_restart, synchronous:synchronous, custom_headers:custom_headers).value! end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RestoreResponse] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1572 def restore(resource_group_name, name, backup_id, request, custom_headers:nil) response = restore_async(resource_group_name, name, backup_id, request, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1589 def restore_async(resource_group_name, name, backup_id, request, custom_headers:nil) # Send request promise = begin_restore_async(resource_group_name, name, backup_id, request, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Restores a specific backup to another app (or deployment slot, if specified).
Restores a specific backup to another app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RestoreResponse] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15653 def restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers:nil) response = restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param backup_id [String] ID of the backup. @param request [RestoreRequest] Information on restore request . @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15672 def restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:nil) # Send request promise = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RestoreResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Run a triggered web job for an app, or a deployment slot.
Run a triggered web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33364 def run_triggered_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = run_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! nil end
Run a triggered web job for an app, or a deployment slot.
Run a triggered web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33401 def run_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Run a triggered web job for an app, or a deployment slot.
Run a triggered web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30262 def run_triggered_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = run_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! nil end
Run a triggered web job for an app, or a deployment slot.
Run a triggered web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30303 def run_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Run a triggered web job for an app, or a deployment slot.
Run a triggered web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 30283 def run_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) run_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Run a triggered web job for an app, or a deployment slot.
Run a triggered web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 33383 def run_triggered_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) run_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Starts an app (or deployment slot, if specified).
Starts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32438 def start(resource_group_name, name, custom_headers:nil) response = start_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Starts an app (or deployment slot, if specified).
Starts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32473 def start_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Start a continuous web job for an app, or a deployment slot.
Start a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4892 def start_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = start_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! nil end
Start a continuous web job for an app, or a deployment slot.
Start a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4929 def start_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Start a continuous web job for an app, or a deployment slot.
Start a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18932 def start_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = start_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! nil end
Start a continuous web job for an app, or a deployment slot.
Start a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18973 def start_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Start a continuous web job for an app, or a deployment slot.
Start a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 18953 def start_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) start_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Start a continuous web job for an app, or a deployment slot.
Start a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4911 def start_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) start_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Starts an app (or deployment slot, if specified).
Starts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will start the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29273 def start_slot(resource_group_name, name, slot, custom_headers:nil) response = start_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Starts an app (or deployment slot, if specified).
Starts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will start the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29312 def start_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Starts an app (or deployment slot, if specified).
Starts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will start the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29293 def start_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) start_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Start capturing network packets for the site.
Start capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param duration_in_seconds [Integer] The duration to keep capturing in seconds. @param max_frame_length [Integer] The maximum frame length in bytes (Optional). @param sas_url [String] The Blob URL to store capture file. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [String] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10949 def start_web_site_network_trace(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) response = start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value! response.body unless response.nil? end
Start capturing network packets for the site.
Start capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param duration_in_seconds [Integer] The duration to keep capturing in seconds. @param max_frame_length [Integer] The maximum frame length in bytes (Optional). @param sas_url [String] The Blob URL to store capture file. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10994 def start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Start capturing network packets for the site.
Start capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for this web app. @param duration_in_seconds [Integer] The duration to keep capturing in seconds. @param max_frame_length [Integer] The maximum frame length in bytes (Optional). @param sas_url [String] The Blob URL to store capture file. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [String] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25234 def start_web_site_network_trace_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) response = start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value! response.body unless response.nil? end
Start capturing network packets for the site.
Start capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for this web app. @param duration_in_seconds [Integer] The duration to keep capturing in seconds. @param max_frame_length [Integer] The maximum frame length in bytes (Optional). @param sas_url [String] The Blob URL to store capture file. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25281 def start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Start capturing network packets for the site.
Start capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for this web app. @param duration_in_seconds [Integer] The duration to keep capturing in seconds. @param max_frame_length [Integer] The maximum frame length in bytes (Optional). @param sas_url [String] The Blob URL to store capture file. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25258 def start_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value! end
Start capturing network packets for the site.
Start capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param duration_in_seconds [Integer] The duration to keep capturing in seconds. @param max_frame_length [Integer] The maximum frame length in bytes (Optional). @param sas_url [String] The Blob URL to store capture file. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 10972 def start_web_site_network_trace_with_http_info(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value! end
Starts an app (or deployment slot, if specified).
Starts an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32456 def start_with_http_info(resource_group_name, name, custom_headers:nil) start_async(resource_group_name, name, custom_headers:custom_headers).value! end
Stops an app (or deployment slot, if specified).
Stops an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32533 def stop(resource_group_name, name, custom_headers:nil) response = stop_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Stops an app (or deployment slot, if specified).
Stops an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32568 def stop_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Stop a continuous web job for an app, or a deployment slot.
Stop a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 4991 def stop_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) response = stop_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! nil end
Stop a continuous web job for an app, or a deployment slot.
Stop a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5028 def stop_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Stop a continuous web job for an app, or a deployment slot.
Stop a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19038 def stop_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) response = stop_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! nil end
Stop a continuous web job for an app, or a deployment slot.
Stop a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19079 def stop_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Stop a continuous web job for an app, or a deployment slot.
Stop a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 19059 def stop_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) stop_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:custom_headers).value! end
Stop a continuous web job for an app, or a deployment slot.
Stop a continuous web job for an app, or a deployment slot.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web
Job. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 5010 def stop_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) stop_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:custom_headers).value! end
Stops an app (or deployment slot, if specified).
Stops an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will stop the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29375 def stop_slot(resource_group_name, name, slot, custom_headers:nil) response = stop_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Stops an app (or deployment slot, if specified).
Stops an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will stop the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29414 def stop_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Stops an app (or deployment slot, if specified).
Stops an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will stop the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29395 def stop_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) stop_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Stop ongoing capturing network packets for the site.
Stop ongoing capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [String] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11072 def stop_web_site_network_trace(resource_group_name, name, custom_headers:nil) response = stop_web_site_network_trace_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Stop ongoing capturing network packets for the site.
Stop ongoing capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11107 def stop_web_site_network_trace_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Stop ongoing capturing network packets for the site.
Stop ongoing capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for this web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [String] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25361 def stop_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers:nil) response = stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Stop ongoing capturing network packets for the site.
Stop ongoing capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for this web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25398 def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Stop ongoing capturing network packets for the site.
Stop ongoing capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param slot [String] The name of the slot for this web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 25380 def stop_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Stop ongoing capturing network packets for the site.
Stop ongoing capturing network packets for the site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 11090 def stop_web_site_network_trace_with_http_info(resource_group_name, name, custom_headers:nil) stop_web_site_network_trace_async(resource_group_name, name, custom_headers:custom_headers).value! end
Stops an app (or deployment slot, if specified).
Stops an app (or deployment slot, if specified).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32551 def stop_with_http_info(resource_group_name, name, custom_headers:nil) stop_async(resource_group_name, name, custom_headers:custom_headers).value! end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28688 def swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) response = swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param slot [String] Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 28707 def swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) # Send request promise = begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Swaps two deployment slots of an app.
Swaps two deployment slots of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31886 def swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) response = swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target slot name. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31903 def swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) # Send request promise = begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Syncs function trigger metadata to the scale controller
Syncs function trigger metadata to the scale controller
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32723 def sync_function_triggers(resource_group_name, name, custom_headers:nil) response = sync_function_triggers_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Syncs function trigger metadata to the scale controller
Syncs function trigger metadata to the scale controller
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32758 def sync_function_triggers_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Syncs function trigger metadata to the scale controller
Syncs function trigger metadata to the scale controller
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29579 def sync_function_triggers_slot(resource_group_name, name, slot, custom_headers:nil) response = sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Syncs function trigger metadata to the scale controller
Syncs function trigger metadata to the scale controller
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29618 def sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Syncs function trigger metadata to the scale controller
Syncs function trigger metadata to the scale controller
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29599 def sync_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Syncs function trigger metadata to the scale controller
Syncs function trigger metadata to the scale controller
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32741 def sync_function_triggers_with_http_info(resource_group_name, name, custom_headers:nil) sync_function_triggers_async(resource_group_name, name, custom_headers:custom_headers).value! end
Sync web app repository.
Sync web app repository.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32628 def sync_repository(resource_group_name, name, custom_headers:nil) response = sync_repository_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Sync web app repository.
Sync web app repository.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32663 def sync_repository_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Sync web app repository.
Sync web app repository.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29477 def sync_repository_slot(resource_group_name, name, slot, custom_headers:nil) response = sync_repository_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! nil end
Sync web app repository.
Sync web app repository.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29516 def sync_repository_slot_async(resource_group_name, name, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Sync web app repository.
Sync web app repository.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29497 def sync_repository_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) sync_repository_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value! end
Sync web app repository.
Sync web app repository.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32646 def sync_repository_with_http_info(resource_group_name, name, custom_headers:nil) sync_repository_async(resource_group_name, name, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [SitePatchResource] A JSON representation of the app properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 512 def update(resource_group_name, name, site_envelope, custom_headers:nil) response = update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the application settings of an app.
Replaces the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param app_settings [StringDictionary] Application settings of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1727 def update_application_settings(resource_group_name, name, app_settings, custom_headers:nil) response = update_application_settings_async(resource_group_name, name, app_settings, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the application settings of an app.
Replaces the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param app_settings [StringDictionary] Application settings of the app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1764 def update_application_settings_async(resource_group_name, name, app_settings, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() request_content = @client.serialize(request_mapper, app_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Replaces the application settings of an app.
Replaces the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param app_settings [StringDictionary] Application settings of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15819 def update_application_settings_slot(resource_group_name, name, app_settings, slot, custom_headers:nil) response = update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the application settings of an app.
Replaces the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param app_settings [StringDictionary] Application settings of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15860 def update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() request_content = @client.serialize(request_mapper, app_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Replaces the application settings of an app.
Replaces the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param app_settings [StringDictionary] Application settings of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 15840 def update_application_settings_slot_with_http_info(resource_group_name, name, app_settings, slot, custom_headers:nil) update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers:custom_headers).value! end
Replaces the application settings of an app.
Replaces the application settings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param app_settings [StringDictionary] Application settings of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1746 def update_application_settings_with_http_info(resource_group_name, name, app_settings, custom_headers:nil) update_application_settings_async(resource_group_name, name, app_settings, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [SitePatchResource] A JSON representation of the app properties. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 557 def update_async(resource_group_name, name, site_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SitePatchResource.mapper() request_content = @client.serialize(request_mapper, site_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the Authentication / Authorization settings associated with web app.
Updates the Authentication / Authorization settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param site_auth_settings [SiteAuthSettings] Auth settings associated with web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteAuthSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1951 def update_auth_settings(resource_group_name, name, site_auth_settings, custom_headers:nil) response = update_auth_settings_async(resource_group_name, name, site_auth_settings, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the Authentication / Authorization settings associated with web app.
Updates the Authentication / Authorization settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param site_auth_settings [SiteAuthSettings] Auth settings associated with web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1990 def update_auth_settings_async(resource_group_name, name, site_auth_settings, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_auth_settings is nil' if site_auth_settings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteAuthSettings.mapper() request_content = @client.serialize(request_mapper, site_auth_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the Authentication / Authorization settings associated with web app.
Updates the Authentication / Authorization settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param site_auth_settings [SiteAuthSettings] Auth settings associated with web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteAuthSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16057 def update_auth_settings_slot(resource_group_name, name, site_auth_settings, slot, custom_headers:nil) response = update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the Authentication / Authorization settings associated with web app.
Updates the Authentication / Authorization settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param site_auth_settings [SiteAuthSettings] Auth settings associated with web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16100 def update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_auth_settings is nil' if site_auth_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteAuthSettings.mapper() request_content = @client.serialize(request_mapper, site_auth_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the Authentication / Authorization settings associated with web app.
Updates the Authentication / Authorization settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param site_auth_settings [SiteAuthSettings] Auth settings associated with web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16079 def update_auth_settings_slot_with_http_info(resource_group_name, name, site_auth_settings, slot, custom_headers:nil) update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers:custom_headers).value! end
Updates the Authentication / Authorization settings associated with web app.
Updates the Authentication / Authorization settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param site_auth_settings [SiteAuthSettings] Auth settings associated with web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 1971 def update_auth_settings_with_http_info(resource_group_name, name, site_auth_settings, custom_headers:nil) update_auth_settings_async(resource_group_name, name, site_auth_settings, custom_headers:custom_headers).value! end
Updates the backup configuration of an app.
Updates the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Edited backup configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupRequest] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2176 def update_backup_configuration(resource_group_name, name, request, custom_headers:nil) response = update_backup_configuration_async(resource_group_name, name, request, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the backup configuration of an app.
Updates the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Edited backup configuration. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2213 def update_backup_configuration_async(resource_group_name, name, request, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the backup configuration of an app.
Updates the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Edited backup configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BackupRequest] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16296 def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers:nil) response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the backup configuration of an app.
Updates the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Edited backup configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16337 def update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the backup configuration of an app.
Updates the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Edited backup configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16317 def update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value! end
Updates the backup configuration of an app.
Updates the backup configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Edited backup configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2195 def update_backup_configuration_with_http_info(resource_group_name, name, request, custom_headers:nil) update_backup_configuration_async(resource_group_name, name, request, custom_headers:custom_headers).value! end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3912 def update_configuration(resource_group_name, name, site_config, custom_headers:nil) response = update_configuration_async(resource_group_name, name, site_config, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3951 def update_configuration_async(resource_group_name, name, site_config, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() request_content = @client.serialize(request_mapper, site_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteConfigResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17889 def update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers:nil) response = update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17932 def update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() request_content = @client.serialize(request_mapper, site_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17911 def update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers:nil) update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:custom_headers).value! end
Updates the configuration of an app.
Updates the configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_config [SiteConfigResource] JSON representation of a SiteConfig object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3932 def update_configuration_with_http_info(resource_group_name, name, site_config, custom_headers:nil) update_configuration_async(resource_group_name, name, site_config, custom_headers:custom_headers).value! end
Replaces the connection strings of an app.
Replaces the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_strings [ConnectionStringDictionary] Connection strings of the app or deployment slot. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ConnectionStringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2495 def update_connection_strings(resource_group_name, name, connection_strings, custom_headers:nil) response = update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the connection strings of an app.
Replaces the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_strings [ConnectionStringDictionary] Connection strings of the app or deployment slot. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2534 def update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'connection_strings is nil' if connection_strings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ConnectionStringDictionary.mapper() request_content = @client.serialize(request_mapper, connection_strings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Replaces the connection strings of an app.
Replaces the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_strings [ConnectionStringDictionary] Connection strings of the app or deployment slot. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ConnectionStringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16636 def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers:nil) response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the connection strings of an app.
Replaces the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_strings [ConnectionStringDictionary] Connection strings of the app or deployment slot. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16679 def update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'connection_strings is nil' if connection_strings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ConnectionStringDictionary.mapper() request_content = @client.serialize(request_mapper, connection_strings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Replaces the connection strings of an app.
Replaces the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_strings [ConnectionStringDictionary] Connection strings of the app or deployment slot. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16658 def update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers:nil) update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:custom_headers).value! end
Replaces the connection strings of an app.
Replaces the connection strings of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_strings [ConnectionStringDictionary] Connection strings of the app or deployment slot. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2515 def update_connection_strings_with_http_info(resource_group_name, name, connection_strings, custom_headers:nil) update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:custom_headers).value! end
Updates the logging configuration of an app.
Updates the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that contains the logging configuration to change in the “properties” property. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteLogsConfig] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2827 def update_diagnostic_logs_config(resource_group_name, name, site_logs_config, custom_headers:nil) response = update_diagnostic_logs_config_async(resource_group_name, name, site_logs_config, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the logging configuration of an app.
Updates the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that contains the logging configuration to change in the “properties” property. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2866 def update_diagnostic_logs_config_async(resource_group_name, name, site_logs_config, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_logs_config is nil' if site_logs_config.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteLogsConfig.mapper() request_content = @client.serialize(request_mapper, site_logs_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the logging configuration of an app.
Updates the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that contains the logging configuration to change in the “properties” property. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteLogsConfig] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 16989 def update_diagnostic_logs_config_slot(resource_group_name, name, site_logs_config, slot, custom_headers:nil) response = update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the logging configuration of an app.
Updates the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that contains the logging configuration to change in the “properties” property. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17032 def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_logs_config is nil' if site_logs_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteLogsConfig.mapper() request_content = @client.serialize(request_mapper, site_logs_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the logging configuration of an app.
Updates the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that contains the logging configuration to change in the “properties” property. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17011 def update_diagnostic_logs_config_slot_with_http_info(resource_group_name, name, site_logs_config, slot, custom_headers:nil) update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers:custom_headers).value! end
Updates the logging configuration of an app.
Updates the logging configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that contains the logging configuration to change in the “properties” property. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2847 def update_diagnostic_logs_config_with_http_info(resource_group_name, name, site_logs_config, custom_headers:nil) update_diagnostic_logs_config_async(resource_group_name, name, site_logs_config, custom_headers:custom_headers).value! end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Identifier] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6102 def update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) response = update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6149 def update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() request_content = @client.serialize(request_mapper, domain_ownership_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Identifier] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20219 def update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) response = update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20270 def update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() request_content = @client.serialize(request_mapper, domain_ownership_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 20245 def update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:custom_headers).value! end
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
Creates a domain ownership identifier for web app, or updates an existing ownership identifier.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param domain_ownership_identifier_name [String] Name of domain ownership identifier. @param domain_ownership_identifier [Identifier] A JSON representation of the domain ownership properties. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 6126 def update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:custom_headers).value! end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7865 def update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) response = update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7908 def update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HybridConnection] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22085 def update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) response = update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22130 def update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22108 def update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Creates a new Hybrid Connection using a Service Bus relay.
Creates a new Hybrid Connection using a Service Bus relay.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param connection_envelope [HybridConnection] The details of the hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 7887 def update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:custom_headers).value! end
Replaces the metadata of an app.
Replaces the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param metadata [StringDictionary] Edited metadata of the app or deployment slot. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2947 def update_metadata(resource_group_name, name, metadata, custom_headers:nil) response = update_metadata_async(resource_group_name, name, metadata, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the metadata of an app.
Replaces the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param metadata [StringDictionary] Edited metadata of the app or deployment slot. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2986 def update_metadata_async(resource_group_name, name, metadata, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'metadata is nil' if metadata.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() request_content = @client.serialize(request_mapper, metadata) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Replaces the metadata of an app.
Replaces the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param metadata [StringDictionary] Edited metadata of the app or deployment slot. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17116 def update_metadata_slot(resource_group_name, name, metadata, slot, custom_headers:nil) response = update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Replaces the metadata of an app.
Replaces the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param metadata [StringDictionary] Edited metadata of the app or deployment slot. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17159 def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'metadata is nil' if metadata.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() request_content = @client.serialize(request_mapper, metadata) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Replaces the metadata of an app.
Replaces the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param metadata [StringDictionary] Edited metadata of the app or deployment slot. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17138 def update_metadata_slot_with_http_info(resource_group_name, name, metadata, slot, custom_headers:nil) update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers:custom_headers).value! end
Replaces the metadata of an app.
Replaces the metadata of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param metadata [StringDictionary] Edited metadata of the app or deployment slot. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 2967 def update_metadata_with_http_info(resource_group_name, name, metadata, custom_headers:nil) update_metadata_async(resource_group_name, name, metadata, custom_headers:custom_headers).value! end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8665 def update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) response = update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8710 def update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [RelayServiceConnectionEntity] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22926 def update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) response = update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22975 def update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 22951 def update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param entity_name [String] Name of the hybrid connection configuration. @param connection_envelope [RelayServiceConnectionEntity] Details of the hybrid connection configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 8688 def update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:custom_headers).value! end
Updates the Push settings associated with web app.
Updates the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PushSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3218 def update_site_push_settings(resource_group_name, name, push_settings, custom_headers:nil) response = update_site_push_settings_async(resource_group_name, name, push_settings, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the Push settings associated with web app.
Updates the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3255 def update_site_push_settings_async(resource_group_name, name, push_settings, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'push_settings is nil' if push_settings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PushSettings.mapper() request_content = @client.serialize(request_mapper, push_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the Push settings associated with web app.
Updates the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PushSettings] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17405 def update_site_push_settings_slot(resource_group_name, name, push_settings, slot, custom_headers:nil) response = update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the Push settings associated with web app.
Updates the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17446 def update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'push_settings is nil' if push_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PushSettings.mapper() request_content = @client.serialize(request_mapper, push_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the Push settings associated with web app.
Updates the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 17426 def update_site_push_settings_slot_with_http_info(resource_group_name, name, push_settings, slot, custom_headers:nil) update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers:custom_headers).value! end
Updates the Push settings associated with web app.
Updates the Push settings associated with web app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3237 def update_site_push_settings_with_http_info(resource_group_name, name, push_settings, custom_headers:nil) update_site_push_settings_async(resource_group_name, name, push_settings, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [SitePatchResource] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Site] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14512 def update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) response = update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:skip_dns_registration, skip_custom_domain_verification:skip_custom_domain_verification, force_dns_registration:force_dns_registration, ttl_in_seconds:ttl_in_seconds, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [SitePatchResource] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14579 def update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SitePatchResource.mapper() request_content = @client.serialize(request_mapper, site_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'skipDnsRegistration' => skip_dns_registration,'skipCustomDomainVerification' => skip_custom_domain_verification,'forceDnsRegistration' => force_dns_registration,'ttlInSeconds' => ttl_in_seconds,'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the names of application settings and connection string that remain with the slot during swap operation.
Updates the names of application settings and connection string that remain with the slot during swap operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_config_names [SlotConfigNamesResource] Names of application settings and connection strings. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SlotConfigNamesResource] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3556 def update_slot_configuration_names(resource_group_name, name, slot_config_names, custom_headers:nil) response = update_slot_configuration_names_async(resource_group_name, name, slot_config_names, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the names of application settings and connection string that remain with the slot during swap operation.
Updates the names of application settings and connection string that remain with the slot during swap operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_config_names [SlotConfigNamesResource] Names of application settings and connection strings. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3599 def update_slot_configuration_names_async(resource_group_name, name, slot_config_names, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot_config_names is nil' if slot_config_names.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotConfigNamesResource.mapper() request_content = @client.serialize(request_mapper, slot_config_names) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SlotConfigNamesResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the names of application settings and connection string that remain with the slot during swap operation.
Updates the names of application settings and connection string that remain with the slot during swap operation.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot_config_names [SlotConfigNamesResource] Names of application settings and connection strings. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 3578 def update_slot_configuration_names_with_http_info(resource_group_name, name, slot_config_names, custom_headers:nil) update_slot_configuration_names_async(resource_group_name, name, slot_config_names, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [SitePatchResource] A JSON representation of the app properties. See example. @param slot [String] Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. @param skip_dns_registration [Boolean] If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @param skip_custom_domain_verification [Boolean] If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. @param force_dns_registration [Boolean] If true, web app hostname is force registered with DNS. @param ttl_in_seconds [String] Time to live in seconds for web app's default domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 14546 def update_slot_with_http_info(resource_group_name, name, site_envelope, slot, skip_dns_registration:nil, skip_custom_domain_verification:nil, force_dns_registration:nil, ttl_in_seconds:nil, custom_headers:nil) update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration:skip_dns_registration, skip_custom_domain_verification:skip_custom_domain_verification, force_dns_registration:force_dns_registration, ttl_in_seconds:ttl_in_seconds, custom_headers:custom_headers).value! end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32311 def update_source_control(resource_group_name, name, site_source_control, custom_headers:nil) response = update_source_control_async(resource_group_name, name, site_source_control, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32350 def update_source_control_async(resource_group_name, name, site_source_control, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() request_content = @client.serialize(request_mapper, site_source_control) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SiteSourceControl] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29139 def update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers:nil) response = update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29182 def update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() request_content = @client.serialize(request_mapper, site_source_control) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 29161 def update_source_control_slot_with_http_info(resource_group_name, name, site_source_control, slot, custom_headers:nil) update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:custom_headers).value! end
Updates the source control configuration of an app.
Updates the source control configuration of an app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param site_source_control [SiteSourceControl] JSON representation of a SiteSourceControl object. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 32331 def update_source_control_with_http_info(resource_group_name, name, site_source_control, custom_headers:nil) update_source_control_async(resource_group_name, name, site_source_control, custom_headers:custom_headers).value! end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34060 def update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) response = update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34105 def update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetGateway] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34438 def update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) response = update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34483 def update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param slot [String] 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetGateway] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31403 def update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) response = update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param slot [String] 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31454 def update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetGateway.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param slot [String] 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31429 def update_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of the Virtual Network. @param gateway_name [String] Name of the gateway. Currently, the only supported string is “primary”. @param connection_envelope [VnetGateway] The properties to update this gateway with. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34461 def update_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:custom_headers).value! end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetInfo] operation results.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31000 def update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) response = update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31049 def update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_08_01::Models::VnetInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 31025 def update_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:custom_headers).value! end
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param vnet_name [String] Name of an existing Virtual Network. @param connection_envelope [VnetInfo] Properties of the Virtual Network connection. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 34083 def update_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:custom_headers).value! end
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. @param site_envelope [SitePatchResource] A JSON representation of the app properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb, line 535 def update_with_http_info(resource_group_name, name, site_envelope, custom_headers:nil) update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value! end