class Azure::Web::Mgmt::V2020_09_01::WebApps

WebSite Management Client

Attributes

client[R]

@return [WebSiteManagementClient] reference to the WebSiteManagementClient

Private Class Methods

new(client) click to toggle source

Creates and initializes a new instance of the WebApps class. @param client service class for accessing basic functionality.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17
def initialize(client)
  @client = client
end

Private Instance Methods

add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14553
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
add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14594
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
add_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31572
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
add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31617
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
add_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31595
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
add_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14574
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_custom_hostname(resource_group_name, name, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 650
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_custom_hostname_async(resource_group_name, name, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 687
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_custom_hostname_slot(resource_group_name, name, slot, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17837
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_custom_hostname_slot_async(resource_group_name, name, slot, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17878
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_custom_hostname_slot_with_http_info(resource_group_name, name, slot, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17858
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_custom_hostname_with_http_info(resource_group_name, name, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 669
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
apply_slot_config_to_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Applies the configuration settings from the target slot onto the current slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 761
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
apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Applies the configuration settings from the target slot onto the current slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 804
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
apply_slot_config_to_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Applies the configuration settings from the target slot onto the current slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 783
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
apply_slot_configuration_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Applies the configuration settings from the target slot onto the current slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17955
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
apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Applies the configuration settings from the target slot onto the current slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18002
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
apply_slot_configuration_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Applies the configuration settings from the target slot onto the current slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17979
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
approve_or_reject_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil) click to toggle source

Approves or rejects a private endpoint connection

Description for Approves or rejects a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param private_endpoint_wrapper

PrivateLinkConnectionApprovalRequestResource

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PrivateEndpointConnectionResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32291
def approve_or_reject_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil)
  response = approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param private_endpoint_wrapper

PrivateLinkConnectionApprovalRequestResource

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32309
def approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil)
  # Send request
  promise = begin_approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateEndpointConnectionResource.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
backup(resource_group_name, name, request, custom_headers:nil) click to toggle source

Creates a backup of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 875
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
backup_async(resource_group_name, name, request, custom_headers:nil) click to toggle source

Creates a backup of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 914
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
backup_slot(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Creates a backup of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18076
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
backup_slot_async(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Creates a backup of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18119
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Creates a backup of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18098
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
backup_with_http_info(resource_group_name, name, request, custom_headers:nil) click to toggle source

Creates a backup of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 895
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
begin_approve_or_reject_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil) click to toggle source

Approves or rejects a private endpoint connection

Description for Approves or rejects a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param private_endpoint_wrapper

PrivateLinkConnectionApprovalRequestResource

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PrivateEndpointConnectionResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44259
def begin_approve_or_reject_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil)
  response = begin_approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
begin_approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil) click to toggle source

Approves or rejects a private endpoint connection

Description for Approves or rejects a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param private_endpoint_wrapper

PrivateLinkConnectionApprovalRequestResource

@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44300
def begin_approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
  fail ArgumentError, 'private_endpoint_wrapper is nil' if private_endpoint_wrapper.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::PrivateLinkConnectionApprovalRequestResource.mapper()
  request_content = @client.serialize(request_mapper,  private_endpoint_wrapper)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'privateEndpointConnectionName' => private_endpoint_connection_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateEndpointConnectionResource.mapper()
        result.body = @client.deserialize(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::V2020_09_01::Models::PrivateEndpointConnectionResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
begin_approve_or_reject_private_endpoint_connection_with_http_info(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil) click to toggle source

Approves or rejects a private endpoint connection

Description for Approves or rejects a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param private_endpoint_wrapper

PrivateLinkConnectionApprovalRequestResource

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44280
def begin_approve_or_reject_private_endpoint_connection_with_http_info(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:nil)
  begin_approve_or_reject_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers:custom_headers).value!
end
begin_copy_production_slot(resource_group_name, name, copy_slot_entity, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43221
def begin_copy_production_slot(resource_group_name, name, copy_slot_entity, custom_headers:nil)
  response = begin_copy_production_slot_async(resource_group_name, name, copy_slot_entity, custom_headers:custom_headers).value!
  nil
end
begin_copy_production_slot_async(resource_group_name, name, copy_slot_entity, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43264
def begin_copy_production_slot_async(resource_group_name, name, copy_slot_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, 'copy_slot_entity is nil' if copy_slot_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::V2020_09_01::Models::CsmCopySlotEntity.mapper()
  request_content = @client.serialize(request_mapper,  copy_slot_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}/slotcopy'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_copy_production_slot_with_http_info(resource_group_name, name, copy_slot_entity, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43243
def begin_copy_production_slot_with_http_info(resource_group_name, name, copy_slot_entity, custom_headers:nil)
  begin_copy_production_slot_async(resource_group_name, name, copy_slot_entity, custom_headers:custom_headers).value!
end
begin_copy_slot_slot(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44970
def begin_copy_slot_slot(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil)
  response = begin_copy_slot_slot_async(resource_group_name, name, copy_slot_entity, slot, custom_headers:custom_headers).value!
  nil
end
begin_copy_slot_slot_async(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45017
def begin_copy_slot_slot_async(resource_group_name, name, copy_slot_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, 'copy_slot_entity is nil' if copy_slot_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::V2020_09_01::Models::CsmCopySlotEntity.mapper()
  request_content = @client.serialize(request_mapper,  copy_slot_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}/slotcopy'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_copy_slot_slot_with_http_info(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44994
def begin_copy_slot_slot_with_http_info(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil)
  begin_copy_slot_slot_async(resource_group_name, name, copy_slot_entity, slot, custom_headers:custom_headers).value!
end
begin_create_function(resource_group_name, name, function_name, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42121
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
begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42160
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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
begin_create_function_with_http_info(resource_group_name, name, function_name, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42141
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
begin_create_instance_function_slot(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43839
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
begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43880
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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
begin_create_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43860
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
begin_create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42242
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
begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42281
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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
begin_create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43965
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
begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44008
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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
begin_create_instance_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43987
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
begin_create_instance_msdeploy_operation_with_http_info(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42262
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
begin_create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42003
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
begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42040
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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
begin_create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43715
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
begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43756
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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
begin_create_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43736
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
begin_create_msdeploy_operation_with_http_info(resource_group_name, name, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42022
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
begin_create_or_update(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41649
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
begin_create_or_update_async(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41694
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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
begin_create_or_update_slot(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Site] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43340
def begin_create_or_update_slot(resource_group_name, name, site_envelope, slot, custom_headers:nil)
  response = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43389
def begin_create_or_update_slot_async(resource_group_name, name, site_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, '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::V2020_09_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: {'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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
begin_create_or_update_slot_with_http_info(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43365
def begin_create_or_update_slot_with_http_info(resource_group_name, name, site_envelope, slot, custom_headers:nil)
  begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:custom_headers).value!
end
begin_create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45628
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
begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45667
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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::V2020_09_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
begin_create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45207
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
begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45250
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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::V2020_09_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
begin_create_or_update_source_control_slot_with_http_info(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45229
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
begin_create_or_update_source_control_with_http_info(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45648
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
begin_create_or_update_with_http_info(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41672
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
begin_delete_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Deletes a private endpoint connection

Description for Deletes a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Object] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44391
def begin_delete_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil)
  response = begin_delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
begin_delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Deletes a private endpoint connection

Description for Deletes a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44428
def begin_delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_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, 'private_endpoint_connection_name is nil' if private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'privateEndpointConnectionName' => private_endpoint_connection_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 == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_delete_private_endpoint_connection_with_http_info(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Deletes a private endpoint connection

Description for Deletes a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44410
def begin_delete_private_endpoint_connection_with_http_info(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil)
  begin_delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:custom_headers).value!
end
begin_install_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43099
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
begin_install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43136
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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::V2020_09_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
begin_install_site_extension_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44841
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
begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44882
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_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::V2020_09_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
begin_install_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44862
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
begin_install_site_extension_with_http_info(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43118
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
begin_list_publishing_credentials(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41896
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
begin_list_publishing_credentials_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41931
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
begin_list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43601
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
begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43640
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
begin_list_publishing_credentials_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43621
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
begin_list_publishing_credentials_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41914
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
begin_migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers:nil) click to toggle source

Migrates a local (in-app) MySql database to a remote MySql database.

Description for Migrates a local (in-app) MySql database to a remote MySql database.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42488
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
begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:nil) click to toggle source

Migrates a local (in-app) MySql database to a remote MySql database.

Description for Migrates a local (in-app) MySql database to a remote MySql database.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42529
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
begin_migrate_my_sql_with_http_info(resource_group_name, name, migration_request_envelope, custom_headers:nil) click to toggle source

Migrates a local (in-app) MySql database to a remote MySql database.

Description for Migrates a local (in-app) MySql database to a remote MySql database.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42509
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
begin_migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) click to toggle source

Restores a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42364
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
begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) click to toggle source

Restores a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42405
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
begin_migrate_storage_with_http_info(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) click to toggle source

Restores a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42385
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
begin_restore(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41785
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!
  nil
end
begin_restore_async(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41826
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::V2020_09_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 == 202 || status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_from_backup_blob(resource_group_name, name, request, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] Information on restore request . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42771
def begin_restore_from_backup_blob(resource_group_name, name, request, custom_headers:nil)
  response = begin_restore_from_backup_blob_async(resource_group_name, name, request, custom_headers:custom_headers).value!
  nil
end
begin_restore_from_backup_blob_async(resource_group_name, name, request, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42808
def begin_restore_from_backup_blob_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::V2020_09_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}/restoreFromBackupBlob'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_from_backup_blob_slot(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44492
def begin_restore_from_backup_blob_slot(resource_group_name, name, request, slot, custom_headers:nil)
  response = begin_restore_from_backup_blob_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
  nil
end
begin_restore_from_backup_blob_slot_async(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44533
def begin_restore_from_backup_blob_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::V2020_09_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}/restoreFromBackupBlob'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_from_backup_blob_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44513
def begin_restore_from_backup_blob_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil)
  begin_restore_from_backup_blob_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
end
begin_restore_from_backup_blob_with_http_info(resource_group_name, name, request, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42790
def begin_restore_from_backup_blob_with_http_info(resource_group_name, name, request, custom_headers:nil)
  begin_restore_from_backup_blob_async(resource_group_name, name, request, custom_headers:custom_headers).value!
end
begin_restore_from_deleted_app(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42878
def begin_restore_from_deleted_app(resource_group_name, name, restore_request, custom_headers:nil)
  response = begin_restore_from_deleted_app_async(resource_group_name, name, restore_request, custom_headers:custom_headers).value!
  nil
end
begin_restore_from_deleted_app_async(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42917
def begin_restore_from_deleted_app_async(resource_group_name, name, restore_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, 'restore_request is nil' if restore_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::V2020_09_01::Models::DeletedAppRestoreRequest.mapper()
  request_content = @client.serialize(request_mapper,  restore_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}/restoreFromDeletedApp'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_from_deleted_app_slot(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44606
def begin_restore_from_deleted_app_slot(resource_group_name, name, restore_request, slot, custom_headers:nil)
  response = begin_restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, slot, custom_headers:custom_headers).value!
  nil
end
begin_restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44649
def begin_restore_from_deleted_app_slot_async(resource_group_name, name, restore_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, 'restore_request is nil' if restore_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::V2020_09_01::Models::DeletedAppRestoreRequest.mapper()
  request_content = @client.serialize(request_mapper,  restore_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}/restoreFromDeletedApp'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_from_deleted_app_slot_with_http_info(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44628
def begin_restore_from_deleted_app_slot_with_http_info(resource_group_name, name, restore_request, slot, custom_headers:nil)
  begin_restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, slot, custom_headers:custom_headers).value!
end
begin_restore_from_deleted_app_with_http_info(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42898
def begin_restore_from_deleted_app_with_http_info(resource_group_name, name, restore_request, custom_headers:nil)
  begin_restore_from_deleted_app_async(resource_group_name, name, restore_request, custom_headers:custom_headers).value!
end
begin_restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43483
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!
  nil
end
begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43528
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::V2020_09_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 == 202 || status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43506
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
begin_restore_snapshot(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42988
def begin_restore_snapshot(resource_group_name, name, restore_request, custom_headers:nil)
  response = begin_restore_snapshot_async(resource_group_name, name, restore_request, custom_headers:custom_headers).value!
  nil
end
begin_restore_snapshot_async(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43029
def begin_restore_snapshot_async(resource_group_name, name, restore_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, 'restore_request is nil' if restore_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::V2020_09_01::Models::SnapshotRestoreRequest.mapper()
  request_content = @client.serialize(request_mapper,  restore_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}/restoreSnapshot'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_snapshot_slot(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44723
def begin_restore_snapshot_slot(resource_group_name, name, restore_request, slot, custom_headers:nil)
  response = begin_restore_snapshot_slot_async(resource_group_name, name, restore_request, slot, custom_headers:custom_headers).value!
  nil
end
begin_restore_snapshot_slot_async(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44768
def begin_restore_snapshot_slot_async(resource_group_name, name, restore_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, 'restore_request is nil' if restore_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::V2020_09_01::Models::SnapshotRestoreRequest.mapper()
  request_content = @client.serialize(request_mapper,  restore_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}/restoreSnapshot'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_restore_snapshot_slot_with_http_info(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44746
def begin_restore_snapshot_slot_with_http_info(resource_group_name, name, restore_request, slot, custom_headers:nil)
  begin_restore_snapshot_slot_async(resource_group_name, name, restore_request, slot, custom_headers:custom_headers).value!
end
begin_restore_snapshot_with_http_info(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 43009
def begin_restore_snapshot_with_http_info(resource_group_name, name, restore_request, custom_headers:nil)
  begin_restore_snapshot_async(resource_group_name, name, restore_request, custom_headers:custom_headers).value!
end
begin_restore_with_http_info(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41806
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
begin_start_network_trace(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45771
def begin_start_network_trace(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = begin_start_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
begin_start_network_trace_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45816
def begin_start_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}/startNetworkTrace'

  request_url = @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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
begin_start_network_trace_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45356
def begin_start_network_trace_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = begin_start_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
begin_start_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45403
def begin_start_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}/startNetworkTrace'

  request_url = @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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
begin_start_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) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45380
def begin_start_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)
  begin_start_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
begin_start_network_trace_with_http_info(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45794
def begin_start_network_trace_with_http_info(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  begin_start_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
begin_start_web_site_network_trace_operation(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42613
def begin_start_web_site_network_trace_operation(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = begin_start_web_site_network_trace_operation_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
begin_start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42658
def begin_start_web_site_network_trace_operation_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/startOperation'

  request_url = @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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
begin_start_web_site_network_trace_operation_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44095
def begin_start_web_site_network_trace_operation_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = begin_start_web_site_network_trace_operation_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
begin_start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44142
def begin_start_web_site_network_trace_operation_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/startOperation'

  request_url = @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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
begin_start_web_site_network_trace_operation_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 44119
def begin_start_web_site_network_trace_operation_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  begin_start_web_site_network_trace_operation_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
begin_start_web_site_network_trace_operation_with_http_info(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 42636
def begin_start_web_site_network_trace_operation_with_http_info(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  begin_start_web_site_network_trace_operation_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
begin_swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45090
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
begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45133
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_swap_slot_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45112
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
begin_swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45518
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
begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45557
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
begin_swap_slot_with_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45538
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
copy_production_slot(resource_group_name, name, copy_slot_entity, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17247
def copy_production_slot(resource_group_name, name, copy_slot_entity, custom_headers:nil)
  response = copy_production_slot_async(resource_group_name, name, copy_slot_entity, custom_headers:custom_headers).value!
  nil
end
copy_production_slot_async(resource_group_name, name, copy_slot_entity, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17265
def copy_production_slot_async(resource_group_name, name, copy_slot_entity, custom_headers:nil)
  # Send request
  promise = begin_copy_production_slot_async(resource_group_name, name, copy_slot_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
copy_slot_slot(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil) click to toggle source

Copies a deployment slot to another deployment slot of an app.

Description for Copies a deployment slot to another deployment slot 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 copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34753
def copy_slot_slot(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil)
  response = copy_slot_slot_async(resource_group_name, name, copy_slot_entity, slot, custom_headers:custom_headers).value!
  nil
end
copy_slot_slot_async(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param copy_slot_entity [CsmCopySlotEntity] JSON object that contains the target slot name and site config properties to override the source slot config. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34773
def copy_slot_slot_async(resource_group_name, name, copy_slot_entity, slot, custom_headers:nil)
  # Send request
  promise = begin_copy_slot_slot_async(resource_group_name, name, copy_slot_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
create_deployment(resource_group_name, name, id, deployment, custom_headers:nil) click to toggle source

Create a deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6225
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_deployment_async(resource_group_name, name, id, deployment, custom_headers:nil) click to toggle source

Create a deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6264
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_deployment_slot(resource_group_name, name, id, slot, deployment, custom_headers:nil) click to toggle source

Create a deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22915
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_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers:nil) click to toggle source

Create a deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22958
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_deployment_slot_with_http_info(resource_group_name, name, id, slot, deployment, custom_headers:nil) click to toggle source

Create a deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22937
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_deployment_with_http_info(resource_group_name, name, id, deployment, custom_headers:nil) click to toggle source

Create a deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6245
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(resource_group_name, name, function_name, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7881
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
create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7898
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::V2020_09_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_instance_function_slot(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) click to toggle source

Create function for web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24666
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
create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers:nil) click to toggle source

@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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24684
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::V2020_09_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_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10962
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
create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10979
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::V2020_09_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
create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27894
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
create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27913
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::V2020_09_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
create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7391
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
create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7407
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::V2020_09_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
create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers:nil) click to toggle source

Invoke the MSDeploy web app extension.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24151
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
create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24169
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::V2020_09_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
create_or_update(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 354
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
create_or_update_async(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 372
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::V2020_09_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
create_or_update_configuration(resource_group_name, name, site_config, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4700
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
create_or_update_configuration_async(resource_group_name, name, site_config, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4739
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21292
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
create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21335
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21314
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
create_or_update_configuration_with_http_info(resource_group_name, name, site_config, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4720
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
create_or_update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6922
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
create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6969
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23654
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
create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23705
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
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) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23680
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
create_or_update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6946
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
create_or_update_function_secret(resource_group_name, name, function_name, key_name, key, custom_headers:nil) click to toggle source

Add or update a function secret.

Description for Add or update a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [KeyInfo] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8031
def create_or_update_function_secret(resource_group_name, name, function_name, key_name, key, custom_headers:nil)
  response = create_or_update_function_secret_async(resource_group_name, name, function_name, key_name, key, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_function_secret_async(resource_group_name, name, function_name, key_name, key, custom_headers:nil) click to toggle source

Add or update a function secret.

Description for Add or update a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param key [KeyInfo] The key to create or update @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8072
def create_or_update_function_secret_async(resource_group_name, name, function_name, key_name, key, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\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, 'key_name is nil' if key_name.nil?
  fail ArgumentError, 'key is nil' if key.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::KeyInfo.mapper()
  request_content = @client.serialize(request_mapper,  key)
  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}/keys/{keyName}'

  request_url = @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,'keyName' => key_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 == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_or_update_function_secret_slot(resource_group_name, name, function_name, key_name, slot, key, custom_headers:nil) click to toggle source

Add or update a function secret.

Description for Add or update a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param slot [String] Name of the deployment slot. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [KeyInfo] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24822
def create_or_update_function_secret_slot(resource_group_name, name, function_name, key_name, slot, key, custom_headers:nil)
  response = create_or_update_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, key, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, key, custom_headers:nil) click to toggle source

Add or update a function secret.

Description for Add or update a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param slot [String] Name of the deployment slot. @param key [KeyInfo] The key to create or update @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24865
def create_or_update_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, key, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\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, 'key_name is nil' if key_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'key is nil' if key.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::KeyInfo.mapper()
  request_content = @client.serialize(request_mapper,  key)
  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}/keys/{keyName}'

  request_url = @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,'keyName' => key_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 == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_or_update_function_secret_slot_with_http_info(resource_group_name, name, function_name, key_name, slot, key, custom_headers:nil) click to toggle source

Add or update a function secret.

Description for Add or update a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param slot [String] Name of the deployment slot. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24844
def create_or_update_function_secret_slot_with_http_info(resource_group_name, name, function_name, key_name, slot, key, custom_headers:nil)
  create_or_update_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, key, custom_headers:custom_headers).value!
end
create_or_update_function_secret_with_http_info(resource_group_name, name, function_name, key_name, key, custom_headers:nil) click to toggle source

Add or update a function secret.

Description for Add or update a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8052
def create_or_update_function_secret_with_http_info(resource_group_name, name, function_name, key_name, key, custom_headers:nil)
  create_or_update_function_secret_async(resource_group_name, name, function_name, key_name, key, custom_headers:custom_headers).value!
end
create_or_update_host_name_binding(resource_group_name, name, host_name, host_name_binding, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9248
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
create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9289
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_host_name_binding_slot(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26090
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
create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26135
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_host_name_binding_slot_with_http_info(resource_group_name, name, host_name, host_name_binding, slot, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26113
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
create_or_update_host_name_binding_with_http_info(resource_group_name, name, host_name, host_name_binding, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9269
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
create_or_update_host_secret(resource_group_name, name, key_type, key_name, key, custom_headers:nil) click to toggle source

Add or update a host level secret.

Description for Add or update a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [KeyInfo] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8791
def create_or_update_host_secret(resource_group_name, name, key_type, key_name, key, custom_headers:nil)
  response = create_or_update_host_secret_async(resource_group_name, name, key_type, key_name, key, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_host_secret_async(resource_group_name, name, key_type, key_name, key, custom_headers:nil) click to toggle source

Add or update a host level secret.

Description for Add or update a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param key [KeyInfo] The key to create or update @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8832
def create_or_update_host_secret_async(resource_group_name, name, key_type, key_name, key, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'key_type is nil' if key_type.nil?
  fail ArgumentError, 'key_name is nil' if key_name.nil?
  fail ArgumentError, 'key is nil' if key.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::KeyInfo.mapper()
  request_content = @client.serialize(request_mapper,  key)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'keyType' => key_type,'keyName' => key_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 == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_or_update_host_secret_slot(resource_group_name, name, key_type, key_name, slot, key, custom_headers:nil) click to toggle source

Add or update a host level secret.

Description for Add or update a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param slot [String] Name of the deployment slot. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [KeyInfo] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25610
def create_or_update_host_secret_slot(resource_group_name, name, key_type, key_name, slot, key, custom_headers:nil)
  response = create_or_update_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, key, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, key, custom_headers:nil) click to toggle source

Add or update a host level secret.

Description for Add or update a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param slot [String] Name of the deployment slot. @param key [KeyInfo] The key to create or update @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25653
def create_or_update_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, key, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'key_type is nil' if key_type.nil?
  fail ArgumentError, 'key_name is nil' if key_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'key is nil' if key.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::KeyInfo.mapper()
  request_content = @client.serialize(request_mapper,  key)
  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}/host/default/{keyType}/{keyName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'keyType' => key_type,'keyName' => key_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 == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(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::V2020_09_01::Models::KeyInfo.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_or_update_host_secret_slot_with_http_info(resource_group_name, name, key_type, key_name, slot, key, custom_headers:nil) click to toggle source

Add or update a host level secret.

Description for Add or update a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param slot [String] Name of the deployment slot. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25632
def create_or_update_host_secret_slot_with_http_info(resource_group_name, name, key_type, key_name, slot, key, custom_headers:nil)
  create_or_update_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, key, custom_headers:custom_headers).value!
end
create_or_update_host_secret_with_http_info(resource_group_name, name, key_type, key_name, key, custom_headers:nil) click to toggle source

Add or update a host level secret.

Description for Add or update a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param key [KeyInfo] The key to create or update @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8812
def create_or_update_host_secret_with_http_info(resource_group_name, name, key_type, key_name, key, custom_headers:nil)
  create_or_update_host_secret_async(resource_group_name, name, key_type, key_name, key, custom_headers:custom_headers).value!
end
create_or_update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9589
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
create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9632
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26448
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
create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26493
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26471
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
create_or_update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9611
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
create_or_update_public_certificate(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16165
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
create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16206
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_public_certificate_slot(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33599
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
create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33644
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_public_certificate_slot_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33622
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
create_or_update_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, custom_headers:nil) click to toggle source

Creates a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16186
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
create_or_update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10280
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
create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10325
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27170
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
create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27219
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27195
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
create_or_update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10303
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
create_or_update_slot(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Site] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17520
def create_or_update_slot(resource_group_name, name, site_envelope, slot, custom_headers:nil)
  response = create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

@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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17540
def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:nil)
  # Send request
  promise = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38832
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
create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38849
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::V2020_09_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
create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35339
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
create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35358
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::V2020_09_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
create_or_update_swift_virtual_network_connection(resource_group_name, name, connection_envelope, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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 [SwiftVirtualNetwork] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12648
def create_or_update_swift_virtual_network_connection(resource_group_name, name, connection_envelope, custom_headers:nil)
  response = create_or_update_swift_virtual_network_connection_async(resource_group_name, name, connection_envelope, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_swift_virtual_network_connection_async(resource_group_name, name, connection_envelope, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12699
def create_or_update_swift_virtual_network_connection_async(resource_group_name, 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, '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::V2020_09_01::Models::SwiftVirtualNetwork.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}/networkConfig/virtualNetwork'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SwiftVirtualNetwork.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_or_update_swift_virtual_network_connection_slot(resource_group_name, name, connection_envelope, slot, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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 [SwiftVirtualNetwork] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29566
def create_or_update_swift_virtual_network_connection_slot(resource_group_name, name, connection_envelope, slot, custom_headers:nil)
  response = create_or_update_swift_virtual_network_connection_slot_async(resource_group_name, name, connection_envelope, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_or_update_swift_virtual_network_connection_slot_async(resource_group_name, name, connection_envelope, slot, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29621
def create_or_update_swift_virtual_network_connection_slot_async(resource_group_name, 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, '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::V2020_09_01::Models::SwiftVirtualNetwork.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}/networkConfig/virtualNetwork'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SwiftVirtualNetwork.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_or_update_swift_virtual_network_connection_slot_with_http_info(resource_group_name, name, connection_envelope, slot, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29594
def create_or_update_swift_virtual_network_connection_slot_with_http_info(resource_group_name, name, connection_envelope, slot, custom_headers:nil)
  create_or_update_swift_virtual_network_connection_slot_async(resource_group_name, name, connection_envelope, slot, custom_headers:custom_headers).value!
end
create_or_update_swift_virtual_network_connection_with_http_info(resource_group_name, name, connection_envelope, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12674
def create_or_update_swift_virtual_network_connection_with_http_info(resource_group_name, name, connection_envelope, custom_headers:nil)
  create_or_update_swift_virtual_network_connection_async(resource_group_name, name, connection_envelope, custom_headers:custom_headers).value!
end
create_or_update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40683
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
create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40728
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41166
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
create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41213
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37814
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
create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37867
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37841
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
create_or_update_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41190
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
create_or_update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37302
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
create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37351
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
create_or_update_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37327
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
create_or_update_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40706
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
delete(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) click to toggle source

Deletes a web, mobile, or API app, or one of the deployment slots.

Description for Deletes a web, mobile, or API app, or one of the deployment slots.

@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 false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 406
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
delete_async(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) click to toggle source

Deletes a web, mobile, or API app, or one of the deployment slots.

Description for Deletes a web, mobile, or API app, or one of the deployment slots.

@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 false if you want to keep empty App Service plan. By default, empty App Service plan is 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 449
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_backup(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1209
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
delete_backup_async(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1246
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_backup_configuration(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3199
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
delete_backup_configuration_async(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3234
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19948
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
delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19987
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19968
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
delete_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3217
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
delete_backup_slot(resource_group_name, name, backup_id, slot, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18431
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
delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18472
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_backup_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18452
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
delete_backup_with_http_info(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1228
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_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Delete a continuous web job by its ID for an app, or a deployment slot.

Description for Delete a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5708
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_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Delete a continuous web job by its ID for an app, or a deployment slot.

Description for Delete a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5747
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Delete a continuous web job by its ID for an app, or a deployment slot.

Description for Delete a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22363
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_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Delete a continuous web job by its ID for an app, or a deployment slot.

Description for Delete a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22406
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Delete a continuous web job by its ID for an app, or a deployment slot.

Description for Delete a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22385
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_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Delete a continuous web job by its ID for an app, or a deployment slot.

Description for Delete a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5728
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_deployment(resource_group_name, name, id, custom_headers:nil) click to toggle source

Delete a deployment by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6345
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_deployment_async(resource_group_name, name, id, custom_headers:nil) click to toggle source

Delete a deployment by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6384
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_deployment_slot(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

Delete a deployment by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23042
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_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

Delete a deployment by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23085
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

Delete a deployment by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23064
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_deployment_with_http_info(resource_group_name, name, id, custom_headers:nil) click to toggle source

Delete a deployment by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6365
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
delete_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) click to toggle source

Deletes a domain ownership identifier for a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7050
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
delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) click to toggle source

Deletes a domain ownership identifier for a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7089
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) click to toggle source

Deletes a domain ownership identifier for a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23789
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
delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) click to toggle source

Deletes a domain ownership identifier for a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23832
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) click to toggle source

Deletes a domain ownership identifier for a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23811
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
delete_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) click to toggle source

Deletes a domain ownership identifier for a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7070
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_function(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Delete a function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7929
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_function_async(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Delete a function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7966
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_function_secret(resource_group_name, name, function_name, key_name, custom_headers:nil) click to toggle source

Delete a function secret.

Description for Delete a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8164
def delete_function_secret(resource_group_name, name, function_name, key_name, custom_headers:nil)
  response = delete_function_secret_async(resource_group_name, name, function_name, key_name, custom_headers:custom_headers).value!
  nil
end
delete_function_secret_async(resource_group_name, name, function_name, key_name, custom_headers:nil) click to toggle source

Delete a function secret.

Description for Delete a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8203
def delete_function_secret_async(resource_group_name, name, function_name, key_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, 'key_name is nil' if key_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}/keys/{keyName}'

  request_url = @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,'keyName' => key_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 == 404 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_function_secret_slot(resource_group_name, name, function_name, key_name, slot, custom_headers:nil) click to toggle source

Delete a function secret.

Description for Delete a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24959
def delete_function_secret_slot(resource_group_name, name, function_name, key_name, slot, custom_headers:nil)
  response = delete_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, custom_headers:custom_headers).value!
  nil
end
delete_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, custom_headers:nil) click to toggle source

Delete a function secret.

Description for Delete a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25000
def delete_function_secret_slot_async(resource_group_name, name, function_name, key_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, 'key_name is nil' if key_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}/keys/{keyName}'

  request_url = @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,'keyName' => key_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 == 404 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_function_secret_slot_with_http_info(resource_group_name, name, function_name, key_name, slot, custom_headers:nil) click to toggle source

Delete a function secret.

Description for Delete a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24980
def delete_function_secret_slot_with_http_info(resource_group_name, name, function_name, key_name, slot, custom_headers:nil)
  delete_function_secret_slot_async(resource_group_name, name, function_name, key_name, slot, custom_headers:custom_headers).value!
end
delete_function_secret_with_http_info(resource_group_name, name, function_name, key_name, custom_headers:nil) click to toggle source

Delete a function secret.

Description for Delete a function secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] The name of the function. @param key_name [String] The name of the key. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8184
def delete_function_secret_with_http_info(resource_group_name, name, function_name, key_name, custom_headers:nil)
  delete_function_secret_async(resource_group_name, name, function_name, key_name, custom_headers:custom_headers).value!
end
delete_function_with_http_info(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Delete a function for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7948
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
delete_host_name_binding(resource_group_name, name, host_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9369
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
delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9406
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26218
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
delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26259
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26239
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
delete_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9388
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
delete_host_secret(resource_group_name, name, key_type, key_name, custom_headers:nil) click to toggle source

Delete a host level secret.

Description for Delete a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8924
def delete_host_secret(resource_group_name, name, key_type, key_name, custom_headers:nil)
  response = delete_host_secret_async(resource_group_name, name, key_type, key_name, custom_headers:custom_headers).value!
  nil
end
delete_host_secret_async(resource_group_name, name, key_type, key_name, custom_headers:nil) click to toggle source

Delete a host level secret.

Description for Delete a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8963
def delete_host_secret_async(resource_group_name, name, key_type, key_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, 'key_type is nil' if key_type.nil?
  fail ArgumentError, 'key_name is nil' if key_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}/host/default/{keyType}/{keyName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'keyType' => key_type,'keyName' => key_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 == 404 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_host_secret_slot(resource_group_name, name, key_type, key_name, slot, custom_headers:nil) click to toggle source

Delete a host level secret.

Description for Delete a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25747
def delete_host_secret_slot(resource_group_name, name, key_type, key_name, slot, custom_headers:nil)
  response = delete_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, custom_headers:custom_headers).value!
  nil
end
delete_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, custom_headers:nil) click to toggle source

Delete a host level secret.

Description for Delete a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25788
def delete_host_secret_slot_async(resource_group_name, name, key_type, key_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, 'key_type is nil' if key_type.nil?
  fail ArgumentError, 'key_name is nil' if key_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}/host/default/{keyType}/{keyName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'keyType' => key_type,'keyName' => key_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 == 404 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_host_secret_slot_with_http_info(resource_group_name, name, key_type, key_name, slot, custom_headers:nil) click to toggle source

Delete a host level secret.

Description for Delete a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25768
def delete_host_secret_slot_with_http_info(resource_group_name, name, key_type, key_name, slot, custom_headers:nil)
  delete_host_secret_slot_async(resource_group_name, name, key_type, key_name, slot, custom_headers:custom_headers).value!
end
delete_host_secret_with_http_info(resource_group_name, name, key_type, key_name, custom_headers:nil) click to toggle source

Delete a host level secret.

Description for Delete a host level secret.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param key_type [String] The type of host key. @param key_name [String] The name of the key. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8944
def delete_host_secret_with_http_info(resource_group_name, name, key_type, key_name, custom_headers:nil)
  delete_host_secret_async(resource_group_name, name, key_type, key_name, custom_headers:custom_headers).value!
end
delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9714
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
delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9753
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26577
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
delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26618
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26598
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
delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9734
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_instance_function_slot(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Delete a function for web site, or a deployment slot.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24716
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_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Delete a function for web site, or a deployment slot.

Description for 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24755
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Delete a function for web site, or a deployment slot.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24736
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
delete_instance_process(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11373
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
delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11420
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_instance_process_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28330
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
delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28381
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_instance_process_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28356
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
delete_instance_process_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11397
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_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers:nil) click to toggle source

Delete a premier add-on from an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14674
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_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:nil) click to toggle source

Delete a premier add-on from an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14711
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) click to toggle source

Delete a premier add-on from an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31700
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_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) click to toggle source

Delete a premier add-on from an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31741
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) click to toggle source

Delete a premier add-on from an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31721
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_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers:nil) click to toggle source

Delete a premier add-on from an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14693
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
delete_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Deletes a private endpoint connection

Description for Deletes a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Object] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32341
def delete_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil)
  response = delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32357
def delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil)
  # Send request
  promise = begin_delete_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = {
        client_side_validation: true,
        required: false,
        serialized_name: 'parsed_response',
        type: {
          name: 'Object'
        }
      }
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
delete_process(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15362
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
delete_process_async(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15403
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_process_slot(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32747
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
delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32792
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_process_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32770
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
delete_process_with_http_info(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15383
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
delete_public_certificate(resource_group_name, name, public_certificate_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16286
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
delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16323
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33727
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
delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33768
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33748
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
delete_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers:nil) click to toggle source

Deletes a hostname binding for an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16305
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
delete_relay_service_connection(resource_group_name, name, entity_name, custom_headers:nil) click to toggle source

Deletes a relay service connection by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10405
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
delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:nil) click to toggle source

Deletes a relay service connection by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10442
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers:nil) click to toggle source

Deletes a relay service connection by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27302
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
delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:nil) click to toggle source

Deletes a relay service connection by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27343
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers:nil) click to toggle source

Deletes a relay service connection by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27323
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
delete_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers:nil) click to toggle source

Deletes a relay service connection by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10424
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
delete_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Remove a site extension from a web site, or a deployment slot.

Description for Remove a site extension from a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17144
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
delete_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Remove a site extension from a web site, or a deployment slot.

Description for Remove a site extension from a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17183
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_site_extension_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Remove a site extension from a web site, or a deployment slot.

Description for Remove a site extension from a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34643
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
delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Remove a site extension from a web site, or a deployment slot.

Description for Remove a site extension from a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34686
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Remove a site extension from a web site, or a deployment slot.

Description for Remove a site extension from a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34665
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
delete_site_extension_with_http_info(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Remove a site extension from a web site, or a deployment slot.

Description for Remove a site extension from a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17164
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
delete_slot(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) click to toggle source

Deletes a web, mobile, or API app, or one of the deployment slots.

Description for Deletes a web, mobile, or API app, or one of the deployment slots.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17577
def delete_slot(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm: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, custom_headers:custom_headers).value!
  nil
end
delete_slot_async(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) click to toggle source

Deletes a web, mobile, or API app, or one of the deployment slots.

Description for Deletes a web, mobile, or API app, or one of the deployment slots.

@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 [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17626
def delete_slot_async(resource_group_name, name, slot, 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, '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,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_slot_with_http_info(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) click to toggle source

Deletes a web, mobile, or API app, or one of the deployment slots.

Description for Deletes a web, mobile, or API app, or one of the deployment slots.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17602
def delete_slot_with_http_info(resource_group_name, name, slot, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil)
  delete_slot_async(resource_group_name, name, slot, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, custom_headers:custom_headers).value!
end
delete_source_control(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38879
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
delete_source_control_async(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38914
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_source_control_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35390
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
delete_source_control_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35429
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35410
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
delete_source_control_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38897
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_swift_virtual_network(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes a Swift Virtual Network connection from an app (or deployment slot).

Description for Deletes a Swift Virtual Network connection from an app (or 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12778
def delete_swift_virtual_network(resource_group_name, name, custom_headers:nil)
  response = delete_swift_virtual_network_async(resource_group_name, name, custom_headers:custom_headers).value!
  nil
end
delete_swift_virtual_network_async(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes a Swift Virtual Network connection from an app (or deployment slot).

Description for Deletes a Swift Virtual Network connection from an app (or 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12815
def delete_swift_virtual_network_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}/networkConfig/virtualNetwork'

  request_url = @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 == 404
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_swift_virtual_network_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes a Swift Virtual Network connection from an app (or deployment slot).

Description for Deletes a Swift Virtual Network connection from an app (or 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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29703
def delete_swift_virtual_network_slot(resource_group_name, name, slot, custom_headers:nil)
  response = delete_swift_virtual_network_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  nil
end
delete_swift_virtual_network_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes a Swift Virtual Network connection from an app (or deployment slot).

Description for Deletes a Swift Virtual Network connection from an app (or 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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29744
def delete_swift_virtual_network_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}/networkConfig/virtualNetwork'

  request_url = @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 == 404
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_swift_virtual_network_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes a Swift Virtual Network connection from an app (or deployment slot).

Description for Deletes a Swift Virtual Network connection from an app (or 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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29724
def delete_swift_virtual_network_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  delete_swift_virtual_network_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
delete_swift_virtual_network_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Deletes a Swift Virtual Network connection from an app (or deployment slot).

Description for Deletes a Swift Virtual Network connection from an app (or 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12797
def delete_swift_virtual_network_with_http_info(resource_group_name, name, custom_headers:nil)
  delete_swift_virtual_network_async(resource_group_name, name, custom_headers:custom_headers).value!
end
delete_triggered_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Delete a triggered web job by its ID for an app, or a deployment slot.

Description for Delete a triggered web job by its ID for an app, or a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39882
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_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Delete a triggered web job by its ID for an app, or a deployment slot.

Description for Delete a triggered web job by its ID for an app, or a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39921
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_triggered_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Delete a triggered web job by its ID for an app, or a deployment slot.

Description for Delete a triggered web job by its ID for an app, or a 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 web job 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36452
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_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Delete a triggered web job by its ID for an app, or a deployment slot.

Description for Delete a triggered web job by its ID for an app, or a 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 web job 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36495
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Delete a triggered web job by its ID for an app, or a deployment slot.

Description for Delete a triggered web job by its ID for an app, or a 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 web job 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36474
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_triggered_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Delete a triggered web job by its ID for an app, or a deployment slot.

Description for Delete a triggered web job by its ID for an app, or a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39902
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
delete_vnet_connection(resource_group_name, name, vnet_name, custom_headers:nil) click to toggle source

Deletes a connection from an app (or deployment slot to a named virtual network.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40810
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
delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:nil) click to toggle source

Deletes a connection from an app (or deployment slot to a named virtual network.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40851
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers:nil) click to toggle source

Deletes a connection from an app (or deployment slot to a named virtual network.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37436
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
delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:nil) click to toggle source

Deletes a connection from an app (or deployment slot to a named virtual network.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37481
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers:nil) click to toggle source

Deletes a connection from an app (or deployment slot to a named virtual network.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37459
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
delete_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers:nil) click to toggle source

Deletes a connection from an app (or deployment slot to a named virtual network.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40831
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
delete_with_http_info(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil) click to toggle source

Deletes a web, mobile, or API app, or one of the deployment slots.

Description for Deletes a web, mobile, or API app, or one of the deployment slots.

@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 false if you want to keep empty App Service plan. By default, empty App Service plan is 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 428
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
discover_backup(resource_group_name, name, request, custom_headers:nil) click to toggle source

Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6570
def discover_backup(resource_group_name, name, request, custom_headers:nil)
  response = discover_backup_async(resource_group_name, name, request, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
discover_backup_async(resource_group_name, name, request, custom_headers:nil) click to toggle source

Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6615
def discover_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::V2020_09_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}/discoverbackup'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
discover_backup_slot(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23281
def discover_backup_slot(resource_group_name, name, request, slot, custom_headers:nil)
  response = discover_backup_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
discover_backup_slot_async(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23330
def discover_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::V2020_09_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}/discoverbackup'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
discover_backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23306
def discover_backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil)
  discover_backup_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
end
discover_backup_with_http_info(resource_group_name, name, request, custom_headers:nil) click to toggle source

Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6593
def discover_backup_with_http_info(resource_group_name, name, request, custom_headers:nil)
  discover_backup_async(resource_group_name, name, request, custom_headers:custom_headers).value!
end
generate_new_site_publishing_password(resource_group_name, name, custom_headers:nil) click to toggle source

Generates a new publishing password for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14009
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
generate_new_site_publishing_password_async(resource_group_name, name, custom_headers:nil) click to toggle source

Generates a new publishing password for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14048
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
generate_new_site_publishing_password_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Generates a new publishing password for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30993
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
generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Generates a new publishing password for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31036
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
generate_new_site_publishing_password_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Generates a new publishing password for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31015
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
generate_new_site_publishing_password_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Generates a new publishing password for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14029
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
get(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the details of a web, mobile, or API app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 243
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
get_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the details of a web, mobile, or API app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 278
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_auth_settings(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2513
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
get_auth_settings_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2548
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_auth_settings_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19214
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
get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19253
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_auth_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19234
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
get_auth_settings_v2(resource_group_name, name, custom_headers:nil) click to toggle source

Gets site's Authentication / Authorization settings for apps via the V2 format

Description for Gets site's Authentication / Authorization settings for apps via the V2 format

@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 [SiteAuthSettingsV2] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2747
def get_auth_settings_v2(resource_group_name, name, custom_headers:nil)
  response = get_auth_settings_v2_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_auth_settings_v2_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets site's Authentication / Authorization settings for apps via the V2 format

Description for Gets site's Authentication / Authorization settings for apps via the V2 format

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2786
def get_auth_settings_v2_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/authsettingsV2/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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SiteAuthSettingsV2.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_auth_settings_v2_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets site's Authentication / Authorization settings for apps via the V2 format

Description for Gets site's Authentication / Authorization settings for apps via the V2 format

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2767
def get_auth_settings_v2_with_http_info(resource_group_name, name, custom_headers:nil)
  get_auth_settings_v2_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_auth_settings_v2slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets site's Authentication / Authorization settings for apps via the V2 format

Description for Gets site's Authentication / Authorization settings for apps via the V2 format

@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 [SiteAuthSettingsV2] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19462
def get_auth_settings_v2slot(resource_group_name, name, slot, custom_headers:nil)
  response = get_auth_settings_v2slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_auth_settings_v2slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets site's Authentication / Authorization settings for apps via the V2 format

Description for Gets site's Authentication / Authorization settings for apps via the V2 format

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19505
def get_auth_settings_v2slot_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/authsettingsV2/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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SiteAuthSettingsV2.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_auth_settings_v2slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets site's Authentication / Authorization settings for apps via the V2 format

Description for Gets site's Authentication / Authorization settings for apps via the V2 format

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19484
def get_auth_settings_v2slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  get_auth_settings_v2slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
get_auth_settings_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2531
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
get_backup_configuration(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3295
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
get_backup_configuration_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3330
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20051
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
get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20090
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20071
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
get_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3313
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
get_backup_status(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Gets a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1100
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
get_backup_status_async(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Gets a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1137
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_backup_status_slot(resource_group_name, name, backup_id, slot, custom_headers:nil) click to toggle source

Gets a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18315
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
get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers:nil) click to toggle source

Gets a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18356
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_backup_status_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers:nil) click to toggle source

Gets a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18336
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
get_backup_status_with_http_info(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Gets a backup of an app by its ID.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1119
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
get_basic_publishing_credentials_policies(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site.

Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site.

@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 [CsmPublishingCredentialsPoliciesCollection] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1496
def get_basic_publishing_credentials_policies(resource_group_name, name, custom_headers:nil)
  response = get_basic_publishing_credentials_policies_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_basic_publishing_credentials_policies_async(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site.

Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1535
def get_basic_publishing_credentials_policies_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}/basicPublishingCredentialsPolicies'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmPublishingCredentialsPoliciesCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_basic_publishing_credentials_policies_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site.

Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1516
def get_basic_publishing_credentials_policies_with_http_info(resource_group_name, name, custom_headers:nil)
  get_basic_publishing_credentials_policies_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_configuration(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4588
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
get_configuration_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4627
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_configuration_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21173
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
get_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21216
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21195
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
get_configuration_snapshot(resource_group_name, name, snapshot_id, custom_headers:nil) click to toggle source

Gets a snapshot of the configuration of an app at a previous point in time.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5052
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
get_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:nil) click to toggle source

Gets a snapshot of the configuration of an app at a previous point in time.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5091
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers:nil) click to toggle source

Gets a snapshot of the configuration of an app at a previous point in time.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21665
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
get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:nil) click to toggle source

Gets a snapshot of the configuration of an app at a previous point in time.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21708
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers:nil) click to toggle source

Gets a snapshot of the configuration of an app at a previous point in time.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21687
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
get_configuration_snapshot_with_http_info(resource_group_name, name, snapshot_id, custom_headers:nil) click to toggle source

Gets a snapshot of the configuration of an app at a previous point in time.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5072
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
get_configuration_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4608
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
get_container_logs_zip(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the ZIP archived docker log files for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5375
def get_container_logs_zip(resource_group_name, name, custom_headers:nil)
  response = get_container_logs_zip_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_container_logs_zip_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the ZIP archived docker log files for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5410
def get_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
get_container_logs_zip_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the ZIP archived docker log files for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22009
def get_container_logs_zip_slot(resource_group_name, name, slot, custom_headers:nil)
  response = get_container_logs_zip_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_container_logs_zip_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the ZIP archived docker log files for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22048
def get_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
get_container_logs_zip_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the ZIP archived docker log files for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22029
def get_container_logs_zip_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  get_container_logs_zip_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
get_container_logs_zip_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the ZIP archived docker log files for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5393
def get_container_logs_zip_with_http_info(resource_group_name, name, custom_headers:nil)
  get_container_logs_zip_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Gets a continuous web job by its ID for an app, or a deployment slot.

Description for Gets a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5596
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
get_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Gets a continuous web job by its ID for an app, or a deployment slot.

Description for Gets a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5635
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Gets a continuous web job by its ID for an app, or a deployment slot.

Description for Gets a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22244
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
get_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Gets a continuous web job by its ID for an app, or a deployment slot.

Description for Gets a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22287
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Gets a continuous web job by its ID for an app, or a deployment slot.

Description for Gets a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22266
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
get_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Gets a continuous web job by its ID for an app, or a deployment slot.

Description for Gets a continuous web job by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5616
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_deployment(resource_group_name, name, id, custom_headers:nil) click to toggle source

Get a deployment by its ID for an app, or a deployment slot.

Description for Get a deployment by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6114
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_deployment_async(resource_group_name, name, id, custom_headers:nil) click to toggle source

Get a deployment by its ID for an app, or a deployment slot.

Description for Get a deployment by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6151
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_deployment_slot(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

Get a deployment by its ID for an app, or a deployment slot.

Description for Get a deployment by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22797
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_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

Get a deployment by its ID for an app, or a deployment slot.

Description for Get a deployment by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22838
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

Get a deployment by its ID for an app, or a deployment slot.

Description for Get a deployment by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22818
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_deployment_with_http_info(resource_group_name, name, id, custom_headers:nil) click to toggle source

Get a deployment by its ID for an app, or a deployment slot.

Description for Get a deployment by its ID for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6133
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
get_diagnostic_logs_configuration(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3627
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
get_diagnostic_logs_configuration_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3662
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_diagnostic_logs_configuration_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20404
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
get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20443
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_diagnostic_logs_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20424
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
get_diagnostic_logs_configuration_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3645
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(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) click to toggle source

Get domain ownership identifier for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6805
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_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) click to toggle source

Get domain ownership identifier for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6844
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) click to toggle source

Get domain ownership identifier for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23530
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_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) click to toggle source

Get domain ownership identifier for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23573
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil) click to toggle source

Get domain ownership identifier for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23552
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_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil) click to toggle source

Get domain ownership identifier for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6825
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_ftp_allowed(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether FTP is allowed on the site or not.

Description for Returns whether FTP is allowed on the site or not.

@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 [CsmPublishingCredentialsPoliciesEntity] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1606
def get_ftp_allowed(resource_group_name, name, custom_headers:nil)
  response = get_ftp_allowed_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_ftp_allowed_async(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether FTP is allowed on the site or not.

Description for Returns whether FTP is allowed on the site or not.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1641
def get_ftp_allowed_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}/basicPublishingCredentialsPolicies/ftp'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmPublishingCredentialsPoliciesEntity.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_ftp_allowed_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether FTP is allowed on the site or not.

Description for Returns whether FTP is allowed on the site or not.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1624
def get_ftp_allowed_with_http_info(resource_group_name, name, custom_headers:nil)
  get_ftp_allowed_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_function(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function information by its ID for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7768
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_async(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function information by its ID for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7807
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_with_http_info(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function information by its ID for web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7788
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
get_functions_admin_token(resource_group_name, name, custom_headers:nil) click to toggle source

Fetch a short lived token that can be exchanged for a master key.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7651
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
get_functions_admin_token_async(resource_group_name, name, custom_headers:nil) click to toggle source

Fetch a short lived token that can be exchanged for a master key.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7688
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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
get_functions_admin_token_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Fetch a short lived token that can be exchanged for a master key.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24426
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
get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Fetch a short lived token that can be exchanged for a master key.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24467
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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
get_functions_admin_token_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Fetch a short lived token that can be exchanged for a master key.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24447
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
get_functions_admin_token_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Fetch a short lived token that can be exchanged for a master key.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7670
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_host_name_binding(resource_group_name, name, host_name, custom_headers:nil) click to toggle source

Get the named hostname binding for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9134
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_host_name_binding_async(resource_group_name, name, host_name, custom_headers:nil) click to toggle source

Get the named hostname binding for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9173
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers:nil) click to toggle source

Get the named hostname binding for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25969
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_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:nil) click to toggle source

Get the named hostname binding for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26012
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers:nil) click to toggle source

Get the named hostname binding for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25991
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_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers:nil) click to toggle source

Get the named hostname binding for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9154
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
get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9471
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
get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9512
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26326
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
get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26369
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26348
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
get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9492
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_instance_function_slot(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function information by its ID for web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24549
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_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function information by its ID for web site, or a deployment slot.

Description for 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24590
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function information by its ID for web site, or a deployment slot.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24570
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_instance_info(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 instance_id [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [WebSiteInstanceStatus] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10741
def get_instance_info(resource_group_name, name, instance_id, custom_headers:nil)
  response = get_instance_info_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_instance_info_async(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 instance_id [String] @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10778
def get_instance_info_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}'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebSiteInstanceStatus.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_instance_info_slot(resource_group_name, name, instance_id, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 instance_id [String] @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 [WebSiteInstanceStatus] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27659
def get_instance_info_slot(resource_group_name, name, instance_id, slot, custom_headers:nil)
  response = get_instance_info_slot_async(resource_group_name, name, instance_id, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_instance_info_slot_async(resource_group_name, name, instance_id, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 instance_id [String] @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27700
def get_instance_info_slot_async(resource_group_name, name, instance_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, 'instance_id is nil' if instance_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}/instances/{instanceId}'

  request_url = @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,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebSiteInstanceStatus.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_instance_info_slot_with_http_info(resource_group_name, name, instance_id, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 instance_id [String] @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27680
def get_instance_info_slot_with_http_info(resource_group_name, name, instance_id, slot, custom_headers:nil)
  get_instance_info_slot_async(resource_group_name, name, instance_id, slot, custom_headers:custom_headers).value!
end
get_instance_info_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 instance_id [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10760
def get_instance_info_with_http_info(resource_group_name, name, instance_id, custom_headers:nil)
  get_instance_info_async(resource_group_name, name, instance_id, custom_headers:custom_headers).value!
end
get_instance_ms_deploy_status(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10851
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_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10888
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_ms_deploy_status_slot(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27776
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_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27817
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_ms_deploy_status_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27797
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_instance_ms_deploy_status_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10870
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_instance_msdeploy_log(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11011
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_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11048
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_msdeploy_log_slot(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27947
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_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27988
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27968
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_instance_msdeploy_log_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11030
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_instance_process(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11248
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_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11295
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_dump(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11489
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_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11536
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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_instance_process_dump_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28453
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_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28504
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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_instance_process_dump_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28479
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_instance_process_dump_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11513
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_instance_process_module(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11749
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_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11798
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_module_slot(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28727
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_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28780
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_module_slot_with_http_info(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28754
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_instance_process_module_with_http_info(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11774
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_instance_process_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28198
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_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28249
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28224
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_instance_process_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11272
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
get_migrate_my_sql_status(resource_group_name, name, custom_headers:nil) click to toggle source

Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12424
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
get_migrate_my_sql_status_async(resource_group_name, name, custom_headers:nil) click to toggle source

Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12463
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_migrate_my_sql_status_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29330
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
get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29371
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_migrate_my_sql_status_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29351
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
get_migrate_my_sql_status_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12444
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_msdeploy_log(resource_group_name, name, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7438
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_msdeploy_log_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7473
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_msdeploy_log_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24202
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_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24241
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24222
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_msdeploy_log_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get the MSDeploy Log for the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7456
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_msdeploy_status(resource_group_name, name, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7284
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_msdeploy_status_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7319
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_msdeploy_status_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24037
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_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24076
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_msdeploy_status_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24057
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_msdeploy_status_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7302
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
get_network_trace_operation(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13133
def get_network_trace_operation(resource_group_name, name, operation_id, custom_headers:nil)
  response = get_network_trace_operation_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_trace_operation_async(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13174
def get_network_trace_operation_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTrace/operationresults/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_trace_operation_slot(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30079
def get_network_trace_operation_slot(resource_group_name, name, operation_id, slot, custom_headers:nil)
  response = get_network_trace_operation_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_trace_operation_slot_async(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30124
def get_network_trace_operation_slot_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTrace/operationresults/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_trace_operation_slot_v2(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30691
def get_network_trace_operation_slot_v2(resource_group_name, name, operation_id, slot, custom_headers:nil)
  response = get_network_trace_operation_slot_v2_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_trace_operation_slot_v2_async(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30736
def get_network_trace_operation_slot_v2_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTraces/current/operationresults/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_trace_operation_slot_v2_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30714
def get_network_trace_operation_slot_v2_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil)
  get_network_trace_operation_slot_v2_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
end
get_network_trace_operation_slot_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30102
def get_network_trace_operation_slot_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil)
  get_network_trace_operation_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
end
get_network_trace_operation_v2(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13721
def get_network_trace_operation_v2(resource_group_name, name, operation_id, custom_headers:nil)
  response = get_network_trace_operation_v2_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_trace_operation_v2_async(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13762
def get_network_trace_operation_v2_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTraces/current/operationresults/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(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 = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_trace_operation_v2_with_http_info(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13742
def get_network_trace_operation_v2_with_http_info(resource_group_name, name, operation_id, custom_headers:nil)
  get_network_trace_operation_v2_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
end
get_network_trace_operation_with_http_info(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13154
def get_network_trace_operation_with_http_info(resource_group_name, name, operation_id, custom_headers:nil)
  get_network_trace_operation_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
end
get_network_traces(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13589
def get_network_traces(resource_group_name, name, operation_id, custom_headers:nil)
  response = get_network_traces_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_traces_async(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13630
def get_network_traces_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTrace/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_traces_slot(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30552
def get_network_traces_slot(resource_group_name, name, operation_id, slot, custom_headers:nil)
  response = get_network_traces_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_traces_slot_async(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30597
def get_network_traces_slot_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTrace/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_traces_slot_v2(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30856
def get_network_traces_slot_v2(resource_group_name, name, operation_id, slot, custom_headers:nil)
  response = get_network_traces_slot_v2_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_traces_slot_v2_async(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30901
def get_network_traces_slot_v2_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTraces/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_traces_slot_v2_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30879
def get_network_traces_slot_v2_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil)
  get_network_traces_slot_v2_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
end
get_network_traces_slot_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get an operation 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30575
def get_network_traces_slot_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil)
  get_network_traces_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
end
get_network_traces_v2(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the operation. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13879
def get_network_traces_v2(resource_group_name, name, operation_id, custom_headers:nil)
  response = get_network_traces_v2_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_network_traces_v2_async(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13920
def get_network_traces_v2_async(resource_group_name, name, operation_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, 'operation_id is nil' if operation_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}/networkTraces/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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: 'NetworkTraceElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NetworkTrace'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_network_traces_v2_with_http_info(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13900
def get_network_traces_v2_with_http_info(resource_group_name, name, operation_id, custom_headers:nil)
  get_network_traces_v2_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
end
get_network_traces_with_http_info(resource_group_name, name, operation_id, custom_headers:nil) click to toggle source

Gets a named operation for a network trace capturing (or deployment slot, if specified).

Description for Gets a named operation for a network trace capturing (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param operation_id [String] GUID of the 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13610
def get_network_traces_with_http_info(resource_group_name, name, operation_id, custom_headers:nil)
  get_network_traces_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
end
get_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers:nil) click to toggle source

Gets a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14441
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
get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:nil) click to toggle source

Gets a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14478
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) click to toggle source

Gets a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31453
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
get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) click to toggle source

Gets a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31494
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil) click to toggle source

Gets a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31474
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
get_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers:nil) click to toggle source

Gets a named add-on of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14460
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_private_access(resource_group_name, name, custom_headers:nil) click to toggle source

Gets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 [PrivateAccess] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14899
def get_private_access(resource_group_name, name, custom_headers:nil)
  response = get_private_access_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_private_access_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14938
def get_private_access_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}/privateAccess/virtualNetworks'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateAccess.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_private_access_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PrivateAccess] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31938
def get_private_access_slot(resource_group_name, name, slot, custom_headers:nil)
  response = get_private_access_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_private_access_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31979
def get_private_access_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}/privateAccess/virtualNetworks'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateAccess.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_private_access_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31959
def get_private_access_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  get_private_access_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
get_private_access_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14919
def get_private_access_with_http_info(resource_group_name, name, custom_headers:nil)
  get_private_access_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Gets a private endpoint connection

Description for Gets a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PrivateEndpointConnectionResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32179
def get_private_endpoint_connection(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil)
  response = get_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Gets a private endpoint connection

Description for Gets a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32216
def get_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_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, 'private_endpoint_connection_name is nil' if private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'privateEndpointConnectionName' => private_endpoint_connection_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateEndpointConnectionResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_private_endpoint_connection_with_http_info(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil) click to toggle source

Gets a private endpoint connection

Description for Gets a private endpoint connection

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the site. @param private_endpoint_connection_name [String] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32198
def get_private_endpoint_connection_with_http_info(resource_group_name, name, private_endpoint_connection_name, custom_headers:nil)
  get_private_endpoint_connection_async(resource_group_name, name, private_endpoint_connection_name, custom_headers:custom_headers).value!
end
get_process(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15247
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_async(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15288
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_dump(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15468
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_process_dump_async(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15509
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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_process_dump_slot(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32860
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_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32905
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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_process_dump_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32883
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_process_dump_with_http_info(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15489
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_module(resource_group_name, name, process_id, base_address, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15708
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_module_async(resource_group_name, name, process_id, base_address, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15751
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_module_slot(resource_group_name, name, process_id, base_address, slot, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33114
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_module_slot_async(resource_group_name, name, process_id, base_address, slot, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33161
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_module_slot_with_http_info(resource_group_name, name, process_id, base_address, slot, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33138
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_module_with_http_info(resource_group_name, name, process_id, base_address, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15730
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_slot(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32625
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_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32670
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32648
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_process_with_http_info(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

Get process information by its ID for a specific scaled-out instance in a web site.

Description for Get process information by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15268
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_public_certificate(resource_group_name, name, public_certificate_name, custom_headers:nil) click to toggle source

Get the named public certificate for an app (or deployment slot, if specified).

Description for Get the named public certificate for an app (or deployment slot, if specified).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16049
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_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:nil) click to toggle source

Get the named public certificate for an app (or deployment slot, if specified).

Description for Get the named public certificate for an app (or deployment slot, if specified).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16090
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) click to toggle source

Get the named public certificate for an app (or deployment slot, if specified).

Description for Get the named public certificate for an app (or deployment slot, if specified).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33476
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_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) click to toggle source

Get the named public certificate for an app (or deployment slot, if specified).

Description for Get the named public certificate for an app (or deployment slot, if specified).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33521
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers:nil) click to toggle source

Get the named public certificate for an app (or deployment slot, if specified).

Description for Get the named public certificate for an app (or deployment slot, if specified).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33499
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_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers:nil) click to toggle source

Get the named public certificate for an app (or deployment slot, if specified).

Description for Get the named public certificate for an app (or deployment slot, if specified).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16070
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
get_relay_service_connection(resource_group_name, name, entity_name, custom_headers:nil) click to toggle source

Gets a hybrid connection configuration by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10166
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
get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:nil) click to toggle source

Gets a hybrid connection configuration by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10203
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers:nil) click to toggle source

Gets a hybrid connection configuration by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27049
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
get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:nil) click to toggle source

Gets a hybrid connection configuration by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27090
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers:nil) click to toggle source

Gets a hybrid connection configuration by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27070
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
get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers:nil) click to toggle source

Gets a hybrid connection configuration by its name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10185
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_scm_allowed(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether Scm basic auth is allowed on the site or not.

Description for Returns whether Scm basic auth is allowed on the site or not.

@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 [CsmPublishingCredentialsPoliciesEntity] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1832
def get_scm_allowed(resource_group_name, name, custom_headers:nil)
  response = get_scm_allowed_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_scm_allowed_async(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether Scm basic auth is allowed on the site or not.

Description for Returns whether Scm basic auth is allowed on the site or not.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1867
def get_scm_allowed_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}/basicPublishingCredentialsPolicies/scm'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmPublishingCredentialsPoliciesEntity.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_scm_allowed_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Returns whether Scm basic auth is allowed on the site or not.

Description for Returns whether Scm basic auth is allowed on the site or not.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1850
def get_scm_allowed_with_http_info(resource_group_name, name, custom_headers:nil)
  get_scm_allowed_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_site_extension(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Get site extension information by its ID for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16982
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_async(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Get site extension information by its ID for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17023
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Get site extension information by its ID for a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34470
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_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Get site extension information by its ID for a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34515
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_with_http_info(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Get site extension information by its ID for a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34493
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_with_http_info(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Get site extension information by its ID for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17003
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
get_site_php_error_log_flag(resource_group_name, name, custom_headers:nil) click to toggle source

Gets web app's event logs.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14228
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
get_site_php_error_log_flag_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets web app's event logs.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14263
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_site_php_error_log_flag_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets web app's event logs.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31226
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
get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets web app's event logs.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31265
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_site_php_error_log_flag_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets web app's event logs.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31246
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
get_site_php_error_log_flag_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets web app's event logs.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14246
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
get_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the details of a web, mobile, or API app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17402
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
get_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the details of a web, mobile, or API app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17441
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the details of a web, mobile, or API app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17422
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
get_source_control(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38704
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
get_source_control_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38739
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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::V2020_09_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
get_source_control_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35204
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
get_source_control_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35243
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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::V2020_09_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
get_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35224
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
get_source_control_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38722
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
get_swift_virtual_network_connection(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a Swift Virtual Network connection.

Description for Gets a Swift Virtual Network connection.

@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 [SwiftVirtualNetwork] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12534
def get_swift_virtual_network_connection(resource_group_name, name, custom_headers:nil)
  response = get_swift_virtual_network_connection_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_swift_virtual_network_connection_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a Swift Virtual Network connection.

Description for Gets a Swift Virtual Network connection.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12569
def get_swift_virtual_network_connection_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}/networkConfig/virtualNetwork'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SwiftVirtualNetwork.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_swift_virtual_network_connection_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a Swift Virtual Network connection.

Description for Gets a Swift Virtual Network connection.

@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 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 [SwiftVirtualNetwork] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29445
def get_swift_virtual_network_connection_slot(resource_group_name, name, slot, custom_headers:nil)
  response = get_swift_virtual_network_connection_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_swift_virtual_network_connection_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a Swift Virtual Network connection.

Description for Gets a Swift Virtual Network connection.

@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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29484
def get_swift_virtual_network_connection_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}/networkConfig/virtualNetwork'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SwiftVirtualNetwork.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_swift_virtual_network_connection_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a Swift Virtual Network connection.

Description for Gets a Swift Virtual Network connection.

@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 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29465
def get_swift_virtual_network_connection_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  get_swift_virtual_network_connection_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
get_swift_virtual_network_connection_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a Swift Virtual Network connection.

Description for Gets a Swift Virtual Network connection.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12552
def get_swift_virtual_network_connection_with_http_info(resource_group_name, name, custom_headers:nil)
  get_swift_virtual_network_connection_async(resource_group_name, name, custom_headers:custom_headers).value!
end
get_triggered_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Gets a triggered web job by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39770
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
get_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Gets a triggered web job by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39809
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_triggered_web_job_history(resource_group_name, name, web_job_name, id, custom_headers:nil) click to toggle source

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40100
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
get_triggered_web_job_history_async(resource_group_name, name, web_job_name, id, custom_headers:nil) click to toggle source

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40143
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_triggered_web_job_history_slot(resource_group_name, name, web_job_name, id, slot, custom_headers:nil) click to toggle source

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36684
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
get_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, id, slot, custom_headers:nil) click to toggle source

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36731
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_triggered_web_job_history_slot_with_http_info(resource_group_name, name, web_job_name, id, slot, custom_headers:nil) click to toggle source

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36708
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
get_triggered_web_job_history_with_http_info(resource_group_name, name, web_job_name, id, custom_headers:nil) click to toggle source

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40122
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
get_triggered_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Gets a triggered web job by its ID for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36333
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
get_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Gets a triggered web job by its ID for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36376
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Gets a triggered web job by its ID for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36355
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
get_triggered_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Gets a triggered web job by its ID for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39790
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
get_vnet_connection(resource_group_name, name, vnet_name, custom_headers:nil) click to toggle source

Gets a virtual network the app (or deployment slot) is connected to by name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40567
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
get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:nil) click to toggle source

Gets a virtual network the app (or deployment slot) is connected to by name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40606
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil) click to toggle source

Gets an app's Virtual Network gateway.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41046
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
get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil) click to toggle source

Gets an app's Virtual Network gateway.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41087
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil) click to toggle source

Gets an app's Virtual Network gateway.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37686
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
get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil) click to toggle source

Gets an app's Virtual Network gateway.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37731
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil) click to toggle source

Gets an app's Virtual Network gateway.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37709
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
get_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil) click to toggle source

Gets an app's Virtual Network gateway.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41067
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
get_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers:nil) click to toggle source

Gets a virtual network the app (or deployment slot) is connected to by name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37179
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
get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:nil) click to toggle source

Gets a virtual network the app (or deployment slot) is connected to by name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37222
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
get_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers:nil) click to toggle source

Gets a virtual network the app (or deployment slot) is connected to by name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37201
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
get_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers:nil) click to toggle source

Gets a virtual network the app (or deployment slot) is connected to by name.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40587
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_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Get webjob information for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41535
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_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Get webjob information for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41572
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Get webjob information for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38209
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_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Get webjob information for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38250
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Get webjob information for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38230
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_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Get webjob information for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41554
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
get_web_site_container_logs(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the last lines of docker logs for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5262
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
get_web_site_container_logs_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the last lines of docker logs for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5297
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
get_web_site_container_logs_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the last lines of docker logs for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21889
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
get_web_site_container_logs_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the last lines of docker logs for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21928
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
get_web_site_container_logs_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the last lines of docker logs for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21909
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
get_web_site_container_logs_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the last lines of docker logs for the given site

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5280
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
get_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the details of a web, mobile, or API app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 261
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(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17096
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
install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17112
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::V2020_09_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_slot(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

Install site extension on a web site, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34591
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
install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil) click to toggle source

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34609
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::V2020_09_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
is_cloneable(resource_group_name, name, custom_headers:nil) click to toggle source

Shows whether an app can be cloned to another resource group or subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11999
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
is_cloneable_async(resource_group_name, name, custom_headers:nil) click to toggle source

Shows whether an app can be cloned to another resource group or subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12036
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
is_cloneable_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Shows whether an app can be cloned to another resource group or subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28991
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
is_cloneable_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Shows whether an app can be cloned to another resource group or subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29032
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
is_cloneable_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Shows whether an app can be cloned to another resource group or subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29012
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
is_cloneable_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Shows whether an app can be cloned to another resource group or subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12018
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
list(custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-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
list_application_settings(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2284
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
list_application_settings_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2319
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_application_settings_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18971
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
list_application_settings_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19010
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_application_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18991
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
list_application_settings_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2302
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
list_as_lazy(custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51330
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
list_async(custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_azure_storage_accounts(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Azure storage account configurations of an app.

Description for Gets the Azure storage account 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 [AzureStoragePropertyDictionaryResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2977
def list_azure_storage_accounts(resource_group_name, name, custom_headers:nil)
  response = list_azure_storage_accounts_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_azure_storage_accounts_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Azure storage account configurations of an app.

Description for Gets the Azure storage account 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3012
def list_azure_storage_accounts_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/azurestorageaccounts/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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AzureStoragePropertyDictionaryResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_azure_storage_accounts_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Azure storage account configurations of an app.

Description for Gets the Azure storage account 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 update the Azure storage account configurations for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [AzureStoragePropertyDictionaryResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19710
def list_azure_storage_accounts_slot(resource_group_name, name, slot, custom_headers:nil)
  response = list_azure_storage_accounts_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_azure_storage_accounts_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Azure storage account configurations of an app.

Description for Gets the Azure storage account 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 update the Azure storage account configurations 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19751
def list_azure_storage_accounts_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/azurestorageaccounts/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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AzureStoragePropertyDictionaryResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_azure_storage_accounts_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Azure storage account configurations of an app.

Description for Gets the Azure storage account 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 update the Azure storage account configurations 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19731
def list_azure_storage_accounts_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  list_azure_storage_accounts_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
list_azure_storage_accounts_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Azure storage account configurations of an app.

Description for Gets the Azure storage account 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2995
def list_azure_storage_accounts_with_http_info(resource_group_name, name, custom_headers:nil)
  list_azure_storage_accounts_async(resource_group_name, name, custom_headers:custom_headers).value!
end
list_backup_status_secrets(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1316
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
list_backup_status_secrets_async(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1367
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_backup_status_secrets_slot(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18545
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
list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18600
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_backup_status_secrets_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18573
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
list_backup_status_secrets_with_http_info(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1342
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
list_backups(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 993
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
list_backups_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51383
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
list_backups_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1028
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_backups_next(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46123
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
list_backups_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46156
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_backups_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46140
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
list_backups_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18201
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
list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51918
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
list_backups_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18240
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_backups_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48091
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
list_backups_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48124
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_backups_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48108
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
list_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18221
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
list_backups_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1011
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
list_by_resource_group(resource_group_name, include_slots:nil, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 132
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
list_by_resource_group_as_lazy(resource_group_name, include_slots:nil, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51358
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
list_by_resource_group_async(resource_group_name, include_slots:nil, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 173
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_by_resource_group_next(next_page_link, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46025
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
list_by_resource_group_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46060
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46043
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
list_by_resource_group_with_http_info(resource_group_name, include_slots:nil, custom_headers:nil) click to toggle source

Gets all web, mobile, and API apps in the specified resource group.

Description for Gets all web, mobile, and API apps in the specified resource group.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 153
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
list_configuration_snapshot_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4940
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
list_configuration_snapshot_info_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51435
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
list_configuration_snapshot_info_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4979
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_configuration_snapshot_info_next(next_page_link, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46317
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
list_configuration_snapshot_info_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46354
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_configuration_snapshot_info_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46336
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
list_configuration_snapshot_info_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21546
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
list_configuration_snapshot_info_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51974
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
list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21589
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_configuration_snapshot_info_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48285
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
list_configuration_snapshot_info_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48322
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_configuration_snapshot_info_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48304
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
list_configuration_snapshot_info_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21568
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
list_configuration_snapshot_info_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot.

Description for Gets a 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4960
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_configurations(resource_group_name, name, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2061
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_configurations_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51408
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_configurations_async(resource_group_name, name, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2096
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_configurations_next(next_page_link, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46219
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_configurations_next_async(next_page_link, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46252
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_configurations_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46236
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_configurations_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18734
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_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51945
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_configurations_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18773
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_configurations_slot_next(next_page_link, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48187
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_configurations_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48220
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_configurations_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48204
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_configurations_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18754
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_configurations_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

List the configurations of an app

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2079
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
list_connection_strings(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3521
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
list_connection_strings_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3556
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_connection_strings_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20291
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
list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20330
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_connection_strings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20311
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
list_connection_strings_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3539
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(resource_group_name, name, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5488
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_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51460
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_async(resource_group_name, name, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5523
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_next(next_page_link, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46417
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_next_async(next_page_link, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46450
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46434
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_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22129
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_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52001
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_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22168
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_next(next_page_link, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48385
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_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48418
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48402
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_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22149
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_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

List continuous web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5506
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(resource_group_name, name, id, custom_headers:nil) click to toggle source

List deployment log for specific deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6450
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_async(resource_group_name, name, id, custom_headers:nil) click to toggle source

List deployment log for specific deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6493
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

List deployment log for specific deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23154
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_slot_async(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

List deployment log for specific deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23201
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_with_http_info(resource_group_name, name, id, slot, custom_headers:nil) click to toggle source

List deployment log for specific deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23178
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_with_http_info(resource_group_name, name, id, custom_headers:nil) click to toggle source

List deployment log for specific deployment for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6472
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(resource_group_name, name, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6007
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_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51485
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_async(resource_group_name, name, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6042
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_next(next_page_link, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46513
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_next_async(next_page_link, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46546
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46530
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_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22683
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_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52028
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_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22722
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_next(next_page_link, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48481
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_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48514
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48498
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_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22703
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_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

List deployments for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6025
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
list_domain_ownership_identifiers(resource_group_name, name, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6695
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
list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51511
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
list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6732
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_domain_ownership_identifiers_next(next_page_link, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46610
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
list_domain_ownership_identifiers_next_async(next_page_link, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46645
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_domain_ownership_identifiers_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46628
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
list_domain_ownership_identifiers_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23413
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
list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52056
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
list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23454
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_domain_ownership_identifiers_slot_next(next_page_link, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48578
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
list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48613
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_domain_ownership_identifiers_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48596
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
list_domain_ownership_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23434
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
list_domain_ownership_identifiers_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Lists ownership identifiers for domain associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 6714
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
list_function_keys(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function keys for a function in a web site, or a deployment slot.

Description for Get function keys 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 [StringDictionary] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8268
def list_function_keys(resource_group_name, name, function_name, custom_headers:nil)
  response = list_function_keys_async(resource_group_name, name, function_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_function_keys_async(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function keys for a function in a web site, or a deployment slot.

Description for Get function keys 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8307
def list_function_keys_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}/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,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_function_keys_slot(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function keys for a function in a web site, or a deployment slot.

Description for Get function keys 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25067
def list_function_keys_slot(resource_group_name, name, function_name, slot, custom_headers:nil)
  response = list_function_keys_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_function_keys_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function keys for a function in a web site, or a deployment slot.

Description for Get function keys 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25108
def list_function_keys_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}/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,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_function_keys_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function keys for a function in a web site, or a deployment slot.

Description for Get function keys 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25088
def list_function_keys_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil)
  list_function_keys_slot_async(resource_group_name, name, function_name, slot, custom_headers:custom_headers).value!
end
list_function_keys_with_http_info(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function keys for a function in a web site, or a deployment slot.

Description for Get function keys 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8288
def list_function_keys_with_http_info(resource_group_name, name, function_name, custom_headers:nil)
  list_function_keys_async(resource_group_name, name, function_name, custom_headers:custom_headers).value!
end
list_function_secrets(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function secrets for a function in a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8381
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
list_function_secrets_async(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function secrets for a function in a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8420
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_function_secrets_slot(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function secrets for a function in a web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25184
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
list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function secrets for a function in a web site, or a deployment slot.

Description for 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25225
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_function_secrets_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers:nil) click to toggle source

Get function secrets for a function in a web site, or a deployment slot.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25205
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
list_function_secrets_with_http_info(resource_group_name, name, function_name, custom_headers:nil) click to toggle source

Get function secrets for a function in a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8401
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_functions(resource_group_name, name, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7544
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_functions_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51536
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_functions_async(resource_group_name, name, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7579
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_functions_next(next_page_link, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46708
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_functions_next_async(next_page_link, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46741
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_functions_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46725
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_functions_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7562
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
list_host_keys(resource_group_name, name, custom_headers:nil) click to toggle source

Get host secrets for a function app.

Description for Get host secrets for a function app.

@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 [HostKeys] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8492
def list_host_keys(resource_group_name, name, custom_headers:nil)
  response = list_host_keys_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_host_keys_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get host secrets for a function app.

Description for Get host secrets for a function app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8527
def list_host_keys_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}/host/default/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,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HostKeys.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_host_keys_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get host secrets for a function app.

Description for Get host secrets for a function app.

@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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [HostKeys] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25299
def list_host_keys_slot(resource_group_name, name, slot, custom_headers:nil)
  response = list_host_keys_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_host_keys_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get host secrets for a function app.

Description for Get host secrets for a function app.

@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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25336
def list_host_keys_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}/host/default/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,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HostKeys.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_host_keys_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get host secrets for a function app.

Description for Get host secrets for a function app.

@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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25318
def list_host_keys_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  list_host_keys_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
list_host_keys_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get host secrets for a function app.

Description for Get host secrets for a function app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8510
def list_host_keys_with_http_info(resource_group_name, name, custom_headers:nil)
  list_host_keys_async(resource_group_name, name, custom_headers:custom_headers).value!
end
list_host_name_bindings(resource_group_name, name, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9026
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
list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51561
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
list_host_name_bindings_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9061
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_host_name_bindings_next(next_page_link, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46804
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
list_host_name_bindings_next_async(next_page_link, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46837
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_host_name_bindings_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46821
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
list_host_name_bindings_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25854
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
list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52109
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
list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25893
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_host_name_bindings_slot_next(next_page_link, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48772
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
list_host_name_bindings_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48805
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_host_name_bindings_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48789
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
list_host_name_bindings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25874
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
list_host_name_bindings_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9044
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
list_hybrid_connections(resource_group_name, name, custom_headers:nil) click to toggle source

Retrieves all Service Bus Hybrid Connections used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9945
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
list_hybrid_connections_async(resource_group_name, name, custom_headers:nil) click to toggle source

Retrieves all Service Bus Hybrid Connections used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9982
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_hybrid_connections_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Retrieves all Service Bus Hybrid Connections used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26816
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
list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Retrieves all Service Bus Hybrid Connections used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26855
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_hybrid_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Retrieves all Service Bus Hybrid Connections used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26836
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
list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Retrieves all Service Bus Hybrid Connections used by this Web App.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9964
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_instance_functions_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24314
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_instance_functions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52082
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_instance_functions_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24351
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_functions_slot_next(next_page_link, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48676
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_instance_functions_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48709
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_functions_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48693
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_instance_functions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List the functions for a web site, or a deployment slot.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 24333
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
list_instance_identifiers(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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<WebSiteInstanceStatus>] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10634
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
list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 [WebAppInstanceStatusCollection] which provide lazy access to pages of the response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51586
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
list_instance_identifiers_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10669
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppInstanceStatusCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_instance_identifiers_next(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 [WebAppInstanceStatusCollection] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46900
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
list_instance_identifiers_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46933
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppInstanceStatusCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_instance_identifiers_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46917
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
list_instance_identifiers_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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<WebSiteInstanceStatus>] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27545
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
list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 [WebAppInstanceStatusCollection] which provide lazy access to pages of the response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52136
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
list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27584
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppInstanceStatusCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_instance_identifiers_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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 [WebAppInstanceStatusCollection] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48868
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
list_instance_identifiers_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48901
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppInstanceStatusCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_instance_identifiers_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48885
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
list_instance_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27565
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
list_instance_identifiers_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10652
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_instance_process_modules(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11622
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_instance_process_modules_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51647
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_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11669
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_modules_next(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47100
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_instance_process_modules_next_async(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47137
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_modules_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47119
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_instance_process_modules_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28593
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_instance_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52201
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_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28644
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_modules_slot_next(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49068
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_instance_process_modules_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49105
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_modules_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49087
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_instance_process_modules_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28619
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_instance_process_modules_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11646
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_instance_process_threads(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11878
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_instance_process_threads_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51678
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_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11925
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_threads_next(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47202
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_instance_process_threads_next_async(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47239
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_threads_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47221
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_instance_process_threads_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28863
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_instance_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52234
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_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28914
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_threads_slot_next(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49170
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_instance_process_threads_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49207
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_instance_process_threads_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49189
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_instance_process_threads_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28889
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_instance_process_threads_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11902
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
list_instance_processes(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11125
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
list_instance_processes_as_lazy(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51616
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
list_instance_processes_async(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11170
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_instance_processes_next(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 46998
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
list_instance_processes_next_async(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47035
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_instance_processes_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47017
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
list_instance_processes_slot(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28068
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
list_instance_processes_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52168
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
list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28117
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_instance_processes_slot_next(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48966
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
list_instance_processes_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49003
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_instance_processes_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48985
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
list_instance_processes_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 28093
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
list_instance_processes_with_http_info(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 11148
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
list_metadata(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3973
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
list_metadata_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4008
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_metadata_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20771
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
list_metadata_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20810
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20791
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
list_metadata_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3991
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
list_network_features(resource_group_name, name, view, custom_headers:nil) click to toggle source

Gets all network features used by the app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13017
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
list_network_features_async(resource_group_name, name, view, custom_headers:nil) click to toggle source

Gets all network features used by the app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13058
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_network_features_slot(resource_group_name, name, view, slot, custom_headers:nil) click to toggle source

Gets all network features used by the app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29956
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
list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers:nil) click to toggle source

Gets all network features used by the app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30001
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_network_features_slot_with_http_info(resource_group_name, name, view, slot, custom_headers:nil) click to toggle source

Gets all network features used by the app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29979
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
list_network_features_with_http_info(resource_group_name, name, view, custom_headers:nil) click to toggle source

Gets all network features used by the app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13038
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
list_next(next_page_link, custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45928
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
list_next_async(next_page_link, custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45961
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 45945
def list_next_with_http_info(next_page_link, custom_headers:nil)
  list_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_perf_mon_counters(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14113
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
list_perf_mon_counters_as_lazy(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51732
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
list_perf_mon_counters_async(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14156
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_perf_mon_counters_next(next_page_link, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47398
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
list_perf_mon_counters_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47431
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_perf_mon_counters_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47415
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
list_perf_mon_counters_slot(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31104
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
list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52292
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
list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31151
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_perf_mon_counters_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49366
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
list_perf_mon_counters_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49399
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_perf_mon_counters_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49383
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
list_perf_mon_counters_slot_with_http_info(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31128
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
list_perf_mon_counters_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets perfmon counters for web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14135
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
list_premier_add_ons(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the premier add-ons of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14334
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
list_premier_add_ons_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the premier add-ons of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14369
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_premier_add_ons_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the premier add-ons of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31339
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
list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the premier add-ons of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31378
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_premier_add_ons_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the premier add-ons of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31359
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
list_premier_add_ons_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the premier add-ons of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14352
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_process_modules(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15591
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_process_modules_as_lazy(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51787
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_process_modules_async(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15632
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_modules_next(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47598
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_process_modules_next_async(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47635
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_modules_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47617
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_process_modules_slot(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32990
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_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52351
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_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33035
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_modules_slot_next(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49566
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_process_modules_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49603
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_modules_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49585
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_process_modules_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33013
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_process_modules_with_http_info(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List module information for a process by its ID for a specific scaled-out instance in a web site.

Description for List module information for a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15612
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_process_threads(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15827
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_process_threads_as_lazy(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51815
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_process_threads_async(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15868
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_threads_next(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47700
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_process_threads_next_async(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47737
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_threads_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47719
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_process_threads_slot(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33240
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_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52381
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_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33285
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_threads_slot_next(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49668
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_process_threads_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49705
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_process_threads_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49687
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_process_threads_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33263
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_process_threads_with_http_info(resource_group_name, name, process_id, custom_headers:nil) click to toggle source

List the threads in a process by its ID for a specific scaled-out instance in a web site.

Description for List the threads in a process by its ID for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15848
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
list_processes(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15134
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
list_processes_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51759
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
list_processes_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15173
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_processes_next(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47496
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
list_processes_next_async(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47533
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_processes_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47515
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
list_processes_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32505
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
list_processes_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52321
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
list_processes_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32548
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_processes_slot_next(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49464
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
list_processes_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49501
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_processes_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49483
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
list_processes_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32527
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
list_processes_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15154
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
list_public_certificates(resource_group_name, name, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15940
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
list_public_certificates_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51840
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
list_public_certificates_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15975
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_public_certificates_next(next_page_link, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47800
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
list_public_certificates_next_async(next_page_link, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47833
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_public_certificates_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47817
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
list_public_certificates_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33360
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
list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52408
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
list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33399
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_public_certificates_slot_next(next_page_link, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49768
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
list_public_certificates_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49801
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_public_certificates_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49785
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
list_public_certificates_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33380
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
list_public_certificates_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get public certificates for an app or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15958
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
list_publishing_credentials(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4079
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
list_publishing_credentials_async(resource_group_name, name, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4094
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::V2020_09_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
list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Git/FTP publishing credentials of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20884
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
list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20901
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::V2020_09_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
list_publishing_profile_xml_with_secrets(resource_group_name, name, publishing_profile_options, custom_headers:nil) click to toggle source

Gets the publishing profile for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16389
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
list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers:nil) click to toggle source

Gets the publishing profile for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16432
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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
list_publishing_profile_xml_with_secrets_slot(resource_group_name, name, publishing_profile_options, slot, custom_headers:nil) click to toggle source

Gets the publishing profile for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33837
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
list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers:nil) click to toggle source

Gets the publishing profile for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33884
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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
list_publishing_profile_xml_with_secrets_slot_with_http_info(resource_group_name, name, publishing_profile_options, slot, custom_headers:nil) click to toggle source

Gets the publishing profile for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33861
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
list_publishing_profile_xml_with_secrets_with_http_info(resource_group_name, name, publishing_profile_options, custom_headers:nil) click to toggle source

Gets the publishing profile for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16411
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
list_relay_service_connections(resource_group_name, name, custom_headers:nil) click to toggle source

Gets hybrid connections configured for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10055
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
list_relay_service_connections_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets hybrid connections configured for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10094
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_relay_service_connections_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets hybrid connections configured for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26931
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
list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets hybrid connections configured for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26974
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_relay_service_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets hybrid connections configured for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26953
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
list_relay_service_connections_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets hybrid connections configured for an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10075
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
list_site_backups(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12107
def list_site_backups(resource_group_name, name, custom_headers:nil)
  first_page = list_site_backups_as_lazy(resource_group_name, name, custom_headers:custom_headers)
  first_page.get_all_items
end
list_site_backups_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51703
def list_site_backups_as_lazy(resource_group_name, name, custom_headers:nil)
  response = list_site_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_site_backups_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_site_backups_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12142
def list_site_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}/listbackups'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_backups_next(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47302
def list_site_backups_next(next_page_link, custom_headers:nil)
  response = list_site_backups_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_site_backups_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47335
def list_site_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_backups_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47319
def list_site_backups_next_with_http_info(next_page_link, custom_headers:nil)
  list_site_backups_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_site_backups_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29106
def list_site_backups_slot(resource_group_name, name, slot, custom_headers:nil)
  first_page = list_site_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers)
  first_page.get_all_items
end
list_site_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52261
def list_site_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil)
  response = list_site_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_site_backups_slot_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_site_backups_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29145
def list_site_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}/listbackups'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_backups_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49270
def list_site_backups_slot_next(next_page_link, custom_headers:nil)
  response = list_site_backups_slot_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_site_backups_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49303
def list_site_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_backups_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49287
def list_site_backups_slot_next_with_http_info(next_page_link, custom_headers:nil)
  list_site_backups_slot_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_site_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29126
def list_site_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  list_site_backups_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
list_site_backups_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12125
def list_site_backups_with_http_info(resource_group_name, name, custom_headers:nil)
  list_site_backups_async(resource_group_name, name, custom_headers:custom_headers).value!
end
list_site_extensions(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16871
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
list_site_extensions_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51866
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
list_site_extensions_async(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16908
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_extensions_next(next_page_link, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47897
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
list_site_extensions_next_async(next_page_link, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47932
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_extensions_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47915
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
list_site_extensions_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34352
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
list_site_extensions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52436
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
list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34393
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_extensions_slot_next(next_page_link, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49865
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
list_site_extensions_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49900
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_extensions_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49883
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
list_site_extensions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34373
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
list_site_extensions_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Description for Get list of siteextensions for a web site, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16890
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
list_site_push_settings(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4242
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
list_site_push_settings_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4277
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_push_settings_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21058
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
list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21097
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_site_push_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21078
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
list_site_push_settings_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4260
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
list_slot_configuration_names(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the names of app settings and connection strings that stick to the slot (not swapped).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4350
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
list_slot_configuration_names_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the names of app settings and connection strings that stick to the slot (not swapped).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4389
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slot_configuration_names_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the names of app settings and connection strings that stick to the slot (not swapped).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4370
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
list_slot_differences_from_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38326
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
list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52662
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
list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38367
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slot_differences_from_production_next(next_page_link, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50648
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
list_slot_differences_from_production_next_async(next_page_link, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50683
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slot_differences_from_production_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50666
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
list_slot_differences_from_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38347
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
list_slot_differences_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34807
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
list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52466
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
list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34852
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slot_differences_slot_next(next_page_link, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49964
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
list_slot_differences_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49999
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slot_differences_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 49982
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
list_slot_differences_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Get the difference in configuration settings between two web app slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34830
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
list_slots(resource_group_name, name, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17294
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
list_slots_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51891
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
list_slots_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17329
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slots_next(next_page_link, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 47995
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
list_slots_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48028
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_slots_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 48012
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
list_slots_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets an app's deployment slots.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17312
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
list_snapshots(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38492
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
list_snapshots_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52687
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
list_snapshots_async(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38527
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_from_drsecondary(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38598
def list_snapshots_from_drsecondary(resource_group_name, name, custom_headers:nil)
  first_page = list_snapshots_from_drsecondary_as_lazy(resource_group_name, name, custom_headers:custom_headers)
  first_page.get_all_items
end
list_snapshots_from_drsecondary_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52712
def list_snapshots_from_drsecondary_as_lazy(resource_group_name, name, custom_headers:nil)
  response = list_snapshots_from_drsecondary_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_from_drsecondary_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_snapshots_from_drsecondary_async(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38633
def list_snapshots_from_drsecondary_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}/snapshotsdr'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_from_drsecondary_next(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50842
def list_snapshots_from_drsecondary_next(next_page_link, custom_headers:nil)
  response = list_snapshots_from_drsecondary_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_snapshots_from_drsecondary_next_async(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50875
def list_snapshots_from_drsecondary_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_from_drsecondary_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50859
def list_snapshots_from_drsecondary_next_with_http_info(next_page_link, custom_headers:nil)
  list_snapshots_from_drsecondary_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_snapshots_from_drsecondary_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35093
def list_snapshots_from_drsecondary_slot(resource_group_name, name, slot, custom_headers:nil)
  first_page = list_snapshots_from_drsecondary_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers)
  first_page.get_all_items
end
list_snapshots_from_drsecondary_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52518
def list_snapshots_from_drsecondary_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil)
  response = list_snapshots_from_drsecondary_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_from_drsecondary_slot_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_snapshots_from_drsecondary_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35130
def list_snapshots_from_drsecondary_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}/snapshotsdr'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_from_drsecondary_slot_next(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50158
def list_snapshots_from_drsecondary_slot_next(next_page_link, custom_headers:nil)
  response = list_snapshots_from_drsecondary_slot_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_snapshots_from_drsecondary_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50191
def list_snapshots_from_drsecondary_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_from_drsecondary_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50175
def list_snapshots_from_drsecondary_slot_next_with_http_info(next_page_link, custom_headers:nil)
  list_snapshots_from_drsecondary_slot_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_snapshots_from_drsecondary_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35112
def list_snapshots_from_drsecondary_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  list_snapshots_from_drsecondary_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
list_snapshots_from_drsecondary_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user from DRSecondary endpoint.

Description for Returns all Snapshots to the user from DRSecondary endpoint.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38616
def list_snapshots_from_drsecondary_with_http_info(resource_group_name, name, custom_headers:nil)
  list_snapshots_from_drsecondary_async(resource_group_name, name, custom_headers:custom_headers).value!
end
list_snapshots_next(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50746
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
list_snapshots_next_async(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50779
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50763
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
list_snapshots_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34983
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
list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52492
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
list_snapshots_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35020
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_slot_next(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50062
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
list_snapshots_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50095
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_snapshots_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50079
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
list_snapshots_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35002
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
list_snapshots_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38510
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
list_sync_function_triggers(resource_group_name, name, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12213
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
list_sync_function_triggers_async(resource_group_name, name, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12248
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_sync_function_triggers_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29218
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
list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29255
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_sync_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29237
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
list_sync_function_triggers_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12231
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_sync_status(resource_group_name, name, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8597
def list_sync_status(resource_group_name, name, custom_headers:nil)
  response = list_sync_status_async(resource_group_name, name, custom_headers:custom_headers).value!
  nil
end
list_sync_status_async(resource_group_name, name, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8632
def list_sync_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}/host/default/listsyncstatus'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
list_sync_status_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25408
def list_sync_status_slot(resource_group_name, name, slot, custom_headers:nil)
  response = list_sync_status_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  nil
end
list_sync_status_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25445
def list_sync_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}/host/default/listsyncstatus'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
list_sync_status_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25427
def list_sync_status_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  list_sync_status_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
list_sync_status_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

This is to allow calling via powershell and ARM template.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8615
def list_sync_status_with_http_info(resource_group_name, name, custom_headers:nil)
  list_sync_status_async(resource_group_name, name, custom_headers:custom_headers).value!
end
list_triggered_web_job_history(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39985
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_triggered_web_job_history_as_lazy(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52764
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_triggered_web_job_history_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40024
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_triggered_web_job_history_next(next_page_link, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51035
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_triggered_web_job_history_next_async(next_page_link, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51070
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_triggered_web_job_history_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51053
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_triggered_web_job_history_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36562
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_triggered_web_job_history_slot_as_lazy(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52574
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_triggered_web_job_history_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36605
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_triggered_web_job_history_slot_next(next_page_link, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50351
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_triggered_web_job_history_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50386
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_triggered_web_job_history_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50369
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_triggered_web_job_history_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36584
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_triggered_web_job_history_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

List a triggered web job's history for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40005
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(resource_group_name, name, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39662
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_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52737
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_async(resource_group_name, name, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39697
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_next(next_page_link, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50938
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_next_async(next_page_link, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50971
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50955
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_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36218
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_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52545
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_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36257
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_next(next_page_link, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50254
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_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50287
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50271
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_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36238
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_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

List triggered web jobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39680
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
list_usages(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40321
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
list_usages_as_lazy(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52795
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
list_usages_async(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40368
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_usages_next(next_page_link, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51135
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
list_usages_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51172
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_usages_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51154
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
list_usages_slot(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36919
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
list_usages_slot_as_lazy(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52607
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
list_usages_slot_async(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36970
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_usages_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50451
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
list_usages_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50488
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
list_usages_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50470
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
list_usages_slot_with_http_info(resource_group_name, name, slot, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36945
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
list_usages_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil) click to toggle source

Gets the quota usage information of an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40345
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
list_vnet_connections(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the virtual networks the app (or deployment slot) is connected to.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40441
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
list_vnet_connections_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the virtual networks the app (or deployment slot) is connected to.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40478
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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
list_vnet_connections_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the virtual networks the app (or deployment slot) is connected to.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37046
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
list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the virtual networks the app (or deployment slot) is connected to.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37087
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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
list_vnet_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets the virtual networks the app (or deployment slot) is connected to.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37067
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
list_vnet_connections_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the virtual networks the app (or deployment slot) is connected to.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40460
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_web_jobs(resource_group_name, name, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41428
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_web_jobs_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52820
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_web_jobs_async(resource_group_name, name, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41463
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_web_jobs_next(next_page_link, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51235
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_web_jobs_next_async(next_page_link, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51268
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_web_jobs_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 51252
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_web_jobs_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38095
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_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 52634
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_web_jobs_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38134
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_web_jobs_slot_next(next_page_link, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50551
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_web_jobs_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50584
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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_web_jobs_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 50568
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_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38115
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_web_jobs_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

List webjobs for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41446
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
list_with_http_info(custom_headers:nil) click to toggle source

Get all apps for a subscription.

Description for 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/2020-09-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
migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers:nil) click to toggle source

Migrates a local (in-app) MySql database to a remote MySql database.

Description for Migrates a local (in-app) MySql database to a remote MySql database.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12374
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
migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12391
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::V2020_09_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
migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) click to toggle source

Restores a web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12322
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
migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12340
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::V2020_09_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
put_private_access_vnet(resource_group_name, name, access, custom_headers:nil) click to toggle source

Sets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site.

@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 access [PrivateAccess] The information for the private access @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PrivateAccess] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15012
def put_private_access_vnet(resource_group_name, name, access, custom_headers:nil)
  response = put_private_access_vnet_async(resource_group_name, name, access, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
put_private_access_vnet_async(resource_group_name, name, access, custom_headers:nil) click to toggle source

Sets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site.

@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 access [PrivateAccess] The information for the private access @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15053
def put_private_access_vnet_async(resource_group_name, name, access, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'access is nil' if access.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::PrivateAccess.mapper()
  request_content = @client.serialize(request_mapper,  access)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateAccess.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
put_private_access_vnet_slot(resource_group_name, name, access, slot, custom_headers:nil) click to toggle source

Sets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site.

@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 access [PrivateAccess] The information for the private access @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 [PrivateAccess] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32055
def put_private_access_vnet_slot(resource_group_name, name, access, slot, custom_headers:nil)
  response = put_private_access_vnet_slot_async(resource_group_name, name, access, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
put_private_access_vnet_slot_async(resource_group_name, name, access, slot, custom_headers:nil) click to toggle source

Sets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site.

@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 access [PrivateAccess] The information for the private access @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32098
def put_private_access_vnet_slot_async(resource_group_name, name, access, 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, 'access is nil' if access.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::V2020_09_01::Models::PrivateAccess.mapper()
  request_content = @client.serialize(request_mapper,  access)
  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}/privateAccess/virtualNetworks'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::PrivateAccess.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
put_private_access_vnet_slot_with_http_info(resource_group_name, name, access, slot, custom_headers:nil) click to toggle source

Sets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site.

@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 access [PrivateAccess] The information for the private access @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 32077
def put_private_access_vnet_slot_with_http_info(resource_group_name, name, access, slot, custom_headers:nil)
  put_private_access_vnet_slot_async(resource_group_name, name, access, slot, custom_headers:custom_headers).value!
end
put_private_access_vnet_with_http_info(resource_group_name, name, access, custom_headers:nil) click to toggle source

Sets data around private site access enablement and authorized Virtual Networks that can access the site.

Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site.

@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 access [PrivateAccess] The information for the private access @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 15033
def put_private_access_vnet_with_http_info(resource_group_name, name, access, custom_headers:nil)
  put_private_access_vnet_async(resource_group_name, name, access, custom_headers:custom_headers).value!
end
recover_site_configuration_snapshot(resource_group_name, name, snapshot_id, custom_headers:nil) click to toggle source

Reverts the configuration of an app to a previous snapshot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5163
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
recover_site_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:nil) click to toggle source

Reverts the configuration of an app to a previous snapshot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5200
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
recover_site_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers:nil) click to toggle source

Reverts the configuration of an app to a previous snapshot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21783
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
recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:nil) click to toggle source

Reverts the configuration of an app to a previous snapshot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21824
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
recover_site_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers:nil) click to toggle source

Reverts the configuration of an app to a previous snapshot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21804
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
recover_site_configuration_snapshot_with_http_info(resource_group_name, name, snapshot_id, custom_headers:nil) click to toggle source

Reverts the configuration of an app to a previous snapshot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5182
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
reset_production_slot_config(resource_group_name, name, custom_headers:nil) click to toggle source

Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16519
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
reset_production_slot_config_async(resource_group_name, name, custom_headers:nil) click to toggle source

Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16558
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
reset_production_slot_config_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16539
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
reset_slot_configuration_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33974
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
reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34017
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
reset_slot_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Resets the configuration settings of the current slot if they were previously modified by calling the API with POST.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 33996
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
restart(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil) click to toggle source

Restarts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16624
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
restart_async(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil) click to toggle source

Restarts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16671
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
restart_slot(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil) click to toggle source

Restarts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34086
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
restart_slot_async(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil) click to toggle source

Restarts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34137
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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
restart_slot_with_http_info(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil) click to toggle source

Restarts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34112
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
restart_with_http_info(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil) click to toggle source

Restarts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16648
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
restore(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1448
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!
  nil
end
restore_async(resource_group_name, name, backup_id, request, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1465
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|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
restore_from_backup_blob(resource_group_name, name, request, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] Information on restore request . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16731
def restore_from_backup_blob(resource_group_name, name, request, custom_headers:nil)
  response = restore_from_backup_blob_async(resource_group_name, name, request, custom_headers:custom_headers).value!
  nil
end
restore_from_backup_blob_async(resource_group_name, name, request, custom_headers:nil) click to toggle source

@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] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16747
def restore_from_backup_blob_async(resource_group_name, name, request, custom_headers:nil)
  # Send request
  promise = begin_restore_from_backup_blob_async(resource_group_name, name, request, 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
restore_from_backup_blob_slot(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Restores an app from a backup blob in Azure Storage.

Description for Restores an app from a backup 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] 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34200
def restore_from_backup_blob_slot(resource_group_name, name, request, slot, custom_headers:nil)
  response = restore_from_backup_blob_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
  nil
end
restore_from_backup_blob_slot_async(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

@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] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34218
def restore_from_backup_blob_slot_async(resource_group_name, name, request, slot, custom_headers:nil)
  # Send request
  promise = begin_restore_from_backup_blob_slot_async(resource_group_name, name, request, 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
restore_from_deleted_app(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16776
def restore_from_deleted_app(resource_group_name, name, restore_request, custom_headers:nil)
  response = restore_from_deleted_app_async(resource_group_name, name, restore_request, custom_headers:custom_headers).value!
  nil
end
restore_from_deleted_app_async(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16793
def restore_from_deleted_app_async(resource_group_name, name, restore_request, custom_headers:nil)
  # Send request
  promise = begin_restore_from_deleted_app_async(resource_group_name, name, restore_request, 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
restore_from_deleted_app_slot(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a deleted web app to this web app.

Description for Restores a deleted web app to this 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 restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34249
def restore_from_deleted_app_slot(resource_group_name, name, restore_request, slot, custom_headers:nil)
  response = restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, slot, custom_headers:custom_headers).value!
  nil
end
restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [DeletedAppRestoreRequest] Deleted web app restore information. @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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34268
def restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, slot, custom_headers:nil)
  # Send request
  promise = begin_restore_from_deleted_app_slot_async(resource_group_name, name, restore_request, 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
restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

Restores a specific backup to another app (or deployment slot, if specified).

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18684
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!
  nil
end
restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18703
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|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
restore_snapshot(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16823
def restore_snapshot(resource_group_name, name, restore_request, custom_headers:nil)
  response = restore_snapshot_async(resource_group_name, name, restore_request, custom_headers:custom_headers).value!
  nil
end
restore_snapshot_async(resource_group_name, name, restore_request, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 16841
def restore_snapshot_async(resource_group_name, name, restore_request, custom_headers:nil)
  # Send request
  promise = begin_restore_snapshot_async(resource_group_name, name, restore_request, 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
restore_snapshot_slot(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

Restores a web app from a snapshot.

Description for Restores a web app from a snapshot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34300
def restore_snapshot_slot(resource_group_name, name, restore_request, slot, custom_headers:nil)
  response = restore_snapshot_slot_async(resource_group_name, name, restore_request, slot, custom_headers:custom_headers).value!
  nil
end
restore_snapshot_slot_async(resource_group_name, name, restore_request, slot, custom_headers:nil) click to toggle source

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param restore_request [SnapshotRestoreRequest] Snapshot restore settings. 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34320
def restore_snapshot_slot_async(resource_group_name, name, restore_request, slot, custom_headers:nil)
  # Send request
  promise = begin_restore_snapshot_slot_async(resource_group_name, name, restore_request, 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
run_triggered_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Run a triggered web job for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40216
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_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Run a triggered web job for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40253
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_triggered_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Run a triggered web job for an app, or a deployment slot.

Description for 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 uses the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36807
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_triggered_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Run a triggered web job for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36848
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Run a triggered web job for an app, or a deployment slot.

Description for 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 uses 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36828
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_triggered_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Run a triggered web job for an app, or a deployment slot.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40235
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
start(resource_group_name, name, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39114
def start(resource_group_name, name, custom_headers:nil)
  response = start_async(resource_group_name, name, custom_headers:custom_headers).value!
  nil
end
start_async(resource_group_name, name, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39149
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Start a continuous web job for an app, or a deployment slot.

Description for Start a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5809
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_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Start a continuous web job for an app, or a deployment slot.

Description for Start a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5846
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Start a continuous web job for an app, or a deployment slot.

Description for Start a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22471
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_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Start a continuous web job for an app, or a deployment slot.

Description for Start a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22512
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Start a continuous web job for an app, or a deployment slot.

Description for Start a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22492
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_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Start a continuous web job for an app, or a deployment slot.

Description for Start a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5828
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
start_network_trace(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39215
def start_network_trace(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = start_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_network_trace_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

@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 [Concurrent::Promise] promise which provides async access to http response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39235
def start_network_trace_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  # Send request
  promise = begin_start_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)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = {
        client_side_validation: true,
        required: false,
        serialized_name: 'parsed_response',
        type: {
          name: 'Sequence',
          element: {
              client_side_validation: true,
              required: false,
              serialized_name: 'NetworkTraceElementType',
              type: {
                name: 'Composite',
                class_name: 'NetworkTrace'
              }
          }
        }
      }
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
start_network_trace_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35746
def start_network_trace_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = start_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_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

@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 [Concurrent::Promise] promise which provides async access to http response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35767
def start_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  # Send request
  promise = begin_start_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)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = {
        client_side_validation: true,
        required: false,
        serialized_name: 'parsed_response',
        type: {
          name: 'Sequence',
          element: {
              client_side_validation: true,
              required: false,
              serialized_name: 'NetworkTraceElementType',
              type: {
                name: 'Composite',
                class_name: 'NetworkTrace'
              }
          }
        }
      }
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
start_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35639
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
start_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35678
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35659
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_web_site_network_trace(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site (To be deprecated).

Description for Start capturing network packets for the site (To be deprecated).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13294
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_web_site_network_trace_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site (To be deprecated).

Description for Start capturing network packets for the site (To be deprecated).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13341
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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_web_site_network_trace_operation(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13424
def start_web_site_network_trace_operation(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  response = start_web_site_network_trace_operation_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_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

@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 [Concurrent::Promise] promise which provides async access to http response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13444
def start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  # Send request
  promise = begin_start_web_site_network_trace_operation_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)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = {
        client_side_validation: true,
        required: false,
        serialized_name: 'parsed_response',
        type: {
          name: 'Sequence',
          element: {
              client_side_validation: true,
              required: false,
              serialized_name: 'NetworkTraceElementType',
              type: {
                name: 'Composite',
                class_name: 'NetworkTrace'
              }
          }
        }
      }
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
start_web_site_network_trace_operation_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

Start capturing network packets for the site.

Description for 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 [Array] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30380
def start_web_site_network_trace_operation_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_operation_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_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil) click to toggle source

@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 [Concurrent::Promise] promise which provides async access to http response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30401
def start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
  # Send request
  promise = begin_start_web_site_network_trace_operation_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)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = {
        client_side_validation: true,
        required: false,
        serialized_name: 'parsed_response',
        type: {
          name: 'Sequence',
          element: {
              client_side_validation: true,
              required: false,
              serialized_name: 'NetworkTraceElementType',
              type: {
                name: 'Composite',
                class_name: 'NetworkTrace'
              }
          }
        }
      }
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
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) click to toggle source

Start capturing network packets for the site (To be deprecated).

Description for Start capturing network packets for the site (To be deprecated).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30246
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_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) click to toggle source

Start capturing network packets for the site (To be deprecated).

Description for Start capturing network packets for the site (To be deprecated).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30295
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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_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) click to toggle source

Start capturing network packets for the site (To be deprecated).

Description for Start capturing network packets for the site (To be deprecated).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30271
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_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) click to toggle source

Start capturing network packets for the site (To be deprecated).

Description for Start capturing network packets for the site (To be deprecated).

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13318
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
start_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39132
def start_with_http_info(resource_group_name, name, custom_headers:nil)
  start_async(resource_group_name, name, custom_headers:custom_headers).value!
end
stop(resource_group_name, name, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39281
def stop(resource_group_name, name, custom_headers:nil)
  response = stop_async(resource_group_name, name, custom_headers:custom_headers).value!
  nil
end
stop_async(resource_group_name, name, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39316
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Stop a continuous web job for an app, or a deployment slot.

Description for Stop a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5908
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_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Stop a continuous web job for an app, or a deployment slot.

Description for Stop a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5945
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Stop a continuous web job for an app, or a deployment slot.

Description for Stop a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22577
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_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Stop a continuous web job for an app, or a deployment slot.

Description for Stop a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22618
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers:nil) click to toggle source

Stop a continuous web job for an app, or a deployment slot.

Description for Stop a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 22598
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_continuous_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers:nil) click to toggle source

Stop a continuous web job for an app, or a deployment slot.

Description for Stop a continuous web job for an app, or a deployment slot.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 5927
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
stop_network_trace(resource_group_name, name, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39376
def stop_network_trace(resource_group_name, name, custom_headers:nil)
  response = stop_network_trace_async(resource_group_name, name, custom_headers:custom_headers).value!
  nil
end
stop_network_trace_async(resource_group_name, name, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39411
def stop_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}/stopNetworkTrace'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_network_trace_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35916
def stop_network_trace_slot(resource_group_name, name, slot, custom_headers:nil)
  response = stop_network_trace_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  nil
end
stop_network_trace_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35953
def stop_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}/stopNetworkTrace'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35935
def stop_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  stop_network_trace_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
stop_network_trace_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39394
def stop_network_trace_with_http_info(resource_group_name, name, custom_headers:nil)
  stop_network_trace_async(resource_group_name, name, custom_headers:custom_headers).value!
end
stop_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35815
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
stop_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35854
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35835
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_web_site_network_trace(resource_group_name, name, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13490
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!
  nil
end
stop_web_site_network_trace_async(resource_group_name, name, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13525
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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30448
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!
  nil
end
stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30485
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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 30467
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_web_site_network_trace_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Stop ongoing capturing network packets for the site.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 13508
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
stop_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39299
def stop_with_http_info(resource_group_name, name, custom_headers:nil)
  stop_async(resource_group_name, name, custom_headers:custom_headers).value!
end
swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34934
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
swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 34953
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
swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

Swaps two deployment slots of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38446
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
swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil) click to toggle source

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38463
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
sync_function_triggers(resource_group_name, name, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39566
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
sync_function_triggers_async(resource_group_name, name, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39601
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_function_triggers_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36117
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
sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36154
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36136
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
sync_function_triggers_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39584
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_functions(resource_group_name, name, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8692
def sync_functions(resource_group_name, name, custom_headers:nil)
  response = sync_functions_async(resource_group_name, name, custom_headers:custom_headers).value!
  nil
end
sync_functions_async(resource_group_name, name, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8727
def sync_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}/host/default/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 == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_functions_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25507
def sync_functions_slot(resource_group_name, name, slot, custom_headers:nil)
  response = sync_functions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  nil
end
sync_functions_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25544
def sync_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}/host/default/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 == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_functions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 25526
def sync_functions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  sync_functions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
sync_functions_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the management database

Description for Syncs function trigger metadata to the management database

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 8710
def sync_functions_with_http_info(resource_group_name, name, custom_headers:nil)
  sync_functions_async(resource_group_name, name, custom_headers:custom_headers).value!
end
sync_repository(resource_group_name, name, custom_headers:nil) click to toggle source

Sync web app repository.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39471
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_repository_async(resource_group_name, name, custom_headers:nil) click to toggle source

Sync web app repository.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39506
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_repository_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Sync web app repository.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36016
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_repository_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Sync web app repository.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36055
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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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_repository_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Sync web app repository.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 36036
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_repository_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Sync web app repository.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39489
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
update(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 515
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
update_application_settings(resource_group_name, name, app_settings, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2168
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
update_application_settings_async(resource_group_name, name, app_settings, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2205
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_application_settings_slot(resource_group_name, name, app_settings, slot, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18848
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
update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18889
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_application_settings_slot_with_http_info(resource_group_name, name, app_settings, slot, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 18869
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
update_application_settings_with_http_info(resource_group_name, name, app_settings, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2187
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
update_async(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 560
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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
update_auth_settings(resource_group_name, name, site_auth_settings, custom_headers:nil) click to toggle source

Updates the Authentication / Authorization settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2393
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
update_auth_settings_async(resource_group_name, name, site_auth_settings, custom_headers:nil) click to toggle source

Updates the Authentication / Authorization settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2434
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_auth_settings_slot(resource_group_name, name, site_auth_settings, slot, custom_headers:nil) click to toggle source

Updates the Authentication / Authorization settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19087
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
update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers:nil) click to toggle source

Updates the Authentication / Authorization settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19132
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_auth_settings_slot_with_http_info(resource_group_name, name, site_auth_settings, slot, custom_headers:nil) click to toggle source

Updates the Authentication / Authorization settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19110
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
update_auth_settings_v2(resource_group_name, name, site_auth_settings_v2, custom_headers:nil) click to toggle source

Updates site's Authentication / Authorization settings for apps via the V2 format

Description for Updates site's Authentication / Authorization settings for apps via the V2 format

@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_v2 [SiteAuthSettingsV2] 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 [SiteAuthSettingsV2] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2623
def update_auth_settings_v2(resource_group_name, name, site_auth_settings_v2, custom_headers:nil)
  response = update_auth_settings_v2_async(resource_group_name, name, site_auth_settings_v2, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_auth_settings_v2_async(resource_group_name, name, site_auth_settings_v2, custom_headers:nil) click to toggle source

Updates site's Authentication / Authorization settings for apps via the V2 format

Description for Updates site's Authentication / Authorization settings for apps via the V2 format

@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_v2 [SiteAuthSettingsV2] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2666
def update_auth_settings_v2_async(resource_group_name, name, site_auth_settings_v2, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\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_v2 is nil' if site_auth_settings_v2.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::SiteAuthSettingsV2.mapper()
  request_content = @client.serialize(request_mapper,  site_auth_settings_v2)
  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/authsettingsV2'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SiteAuthSettingsV2.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_auth_settings_v2_with_http_info(resource_group_name, name, site_auth_settings_v2, custom_headers:nil) click to toggle source

Updates site's Authentication / Authorization settings for apps via the V2 format

Description for Updates site's Authentication / Authorization settings for apps via the V2 format

@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_v2 [SiteAuthSettingsV2] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2645
def update_auth_settings_v2_with_http_info(resource_group_name, name, site_auth_settings_v2, custom_headers:nil)
  update_auth_settings_v2_async(resource_group_name, name, site_auth_settings_v2, custom_headers:custom_headers).value!
end
update_auth_settings_v2slot(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:nil) click to toggle source

Updates site's Authentication / Authorization settings for apps via the V2 format

Description for Updates site's Authentication / Authorization settings for apps via the V2 format

@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_v2 [SiteAuthSettingsV2] 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 [SiteAuthSettingsV2] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19331
def update_auth_settings_v2slot(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:nil)
  response = update_auth_settings_v2slot_async(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_auth_settings_v2slot_async(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:nil) click to toggle source

Updates site's Authentication / Authorization settings for apps via the V2 format

Description for Updates site's Authentication / Authorization settings for apps via the V2 format

@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_v2 [SiteAuthSettingsV2] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19378
def update_auth_settings_v2slot_async(resource_group_name, name, site_auth_settings_v2, 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_v2 is nil' if site_auth_settings_v2.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::V2020_09_01::Models::SiteAuthSettingsV2.mapper()
  request_content = @client.serialize(request_mapper,  site_auth_settings_v2)
  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/authsettingsV2'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SiteAuthSettingsV2.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_auth_settings_v2slot_with_http_info(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:nil) click to toggle source

Updates site's Authentication / Authorization settings for apps via the V2 format

Description for Updates site's Authentication / Authorization settings for apps via the V2 format

@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_v2 [SiteAuthSettingsV2] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19355
def update_auth_settings_v2slot_with_http_info(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:nil)
  update_auth_settings_v2slot_async(resource_group_name, name, site_auth_settings_v2, slot, custom_headers:custom_headers).value!
end
update_auth_settings_with_http_info(resource_group_name, name, site_auth_settings, custom_headers:nil) click to toggle source

Updates the Authentication / Authorization settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2414
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
update_azure_storage_accounts(resource_group_name, name, azure_storage_accounts, custom_headers:nil) click to toggle source

Updates the Azure storage account configurations of an app.

Description for Updates the Azure storage account 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 azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure storage accounts of the app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [AzureStoragePropertyDictionaryResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2859
def update_azure_storage_accounts(resource_group_name, name, azure_storage_accounts, custom_headers:nil)
  response = update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:nil) click to toggle source

Updates the Azure storage account configurations of an app.

Description for Updates the Azure storage account 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 azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure storage accounts 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2898
def update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'azure_storage_accounts is nil' if azure_storage_accounts.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-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::V2020_09_01::Models::AzureStoragePropertyDictionaryResource.mapper()
  request_content = @client.serialize(request_mapper,  azure_storage_accounts)
  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/azurestorageaccounts'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AzureStoragePropertyDictionaryResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_azure_storage_accounts_slot(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil) click to toggle source

Updates the Azure storage account configurations of an app.

Description for Updates the Azure storage account 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 azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure storage accounts of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [AzureStoragePropertyDictionaryResource] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19582
def update_azure_storage_accounts_slot(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil)
  response = update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil) click to toggle source

Updates the Azure storage account configurations of an app.

Description for Updates the Azure storage account 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 azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure storage accounts of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19627
def update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, 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, 'azure_storage_accounts is nil' if azure_storage_accounts.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::V2020_09_01::Models::AzureStoragePropertyDictionaryResource.mapper()
  request_content = @client.serialize(request_mapper,  azure_storage_accounts)
  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/azurestorageaccounts'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AzureStoragePropertyDictionaryResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_azure_storage_accounts_slot_with_http_info(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil) click to toggle source

Updates the Azure storage account configurations of an app.

Description for Updates the Azure storage account 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 azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure storage accounts of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19605
def update_azure_storage_accounts_slot_with_http_info(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil)
  update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, slot, custom_headers:custom_headers).value!
end
update_azure_storage_accounts_with_http_info(resource_group_name, name, azure_storage_accounts, custom_headers:nil) click to toggle source

Updates the Azure storage account configurations of an app.

Description for Updates the Azure storage account 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 azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure storage accounts 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 2879
def update_azure_storage_accounts_with_http_info(resource_group_name, name, azure_storage_accounts, custom_headers:nil)
  update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:custom_headers).value!
end
update_backup_configuration(resource_group_name, name, request, custom_headers:nil) click to toggle source

Updates the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3084
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
update_backup_configuration_async(resource_group_name, name, request, custom_headers:nil) click to toggle source

Updates the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3121
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Updates the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19826
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
update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Updates the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19867
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil) click to toggle source

Updates the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 19847
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
update_backup_configuration_with_http_info(resource_group_name, name, request, custom_headers:nil) click to toggle source

Updates the backup configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3103
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
update_configuration(resource_group_name, name, site_config, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4820
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
update_configuration_async(resource_group_name, name, site_config, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4859
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21419
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
update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21462
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 21441
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
update_configuration_with_http_info(resource_group_name, name, site_config, custom_headers:nil) click to toggle source

Updates the configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4840
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
update_connection_strings(resource_group_name, name, connection_strings, custom_headers:nil) click to toggle source

Replaces the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3403
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
update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:nil) click to toggle source

Replaces the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3442
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers:nil) click to toggle source

Replaces the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20166
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
update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:nil) click to toggle source

Replaces the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20209
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers:nil) click to toggle source

Replaces the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20188
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
update_connection_strings_with_http_info(resource_group_name, name, connection_strings, custom_headers:nil) click to toggle source

Replaces the connection strings of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3423
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
update_diagnostic_logs_config(resource_group_name, name, site_logs_config, custom_headers:nil) click to toggle source

Updates the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3735
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
update_diagnostic_logs_config_async(resource_group_name, name, site_logs_config, custom_headers:nil) click to toggle source

Updates the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3774
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_diagnostic_logs_config_slot(resource_group_name, name, site_logs_config, slot, custom_headers:nil) click to toggle source

Updates the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20519
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
update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers:nil) click to toggle source

Updates the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20562
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_diagnostic_logs_config_slot_with_http_info(resource_group_name, name, site_logs_config, slot, custom_headers:nil) click to toggle source

Updates the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20541
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
update_diagnostic_logs_config_with_http_info(resource_group_name, name, site_logs_config, custom_headers:nil) click to toggle source

Updates the logging configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3755
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
update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7157
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
update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7204
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23903
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
update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23954
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 23929
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
update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers:nil) click to toggle source

Creates a domain ownership identifier for web app, or updates an existing ownership identifier.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 7181
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
update_ftp_allowed(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil) click to toggle source

Updates whether FTP is allowed on the site or not.

Description for Updates whether FTP is allowed on the site or not.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param csm_publishing_access_policies_entity

CsmPublishingCredentialsPoliciesEntity

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [CsmPublishingCredentialsPoliciesEntity] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1714
def update_ftp_allowed(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil)
  response = update_ftp_allowed_async(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_ftp_allowed_async(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil) click to toggle source

Updates whether FTP is allowed on the site or not.

Description for Updates whether FTP is allowed on the site or not.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param csm_publishing_access_policies_entity

CsmPublishingCredentialsPoliciesEntity

@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1753
def update_ftp_allowed_async(resource_group_name, name, csm_publishing_access_policies_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, 'csm_publishing_access_policies_entity is nil' if csm_publishing_access_policies_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::V2020_09_01::Models::CsmPublishingCredentialsPoliciesEntity.mapper()
  request_content = @client.serialize(request_mapper,  csm_publishing_access_policies_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}/basicPublishingCredentialsPolicies/ftp'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmPublishingCredentialsPoliciesEntity.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_ftp_allowed_with_http_info(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil) click to toggle source

Updates whether FTP is allowed on the site or not.

Description for Updates whether FTP is allowed on the site or not.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param csm_publishing_access_policies_entity

CsmPublishingCredentialsPoliciesEntity

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1734
def update_ftp_allowed_with_http_info(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil)
  update_ftp_allowed_async(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:custom_headers).value!
end
update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9820
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
update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9863
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26687
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
update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26732
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 26710
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
update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new Hybrid Connection using a Service Bus relay.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 9842
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
update_metadata(resource_group_name, name, metadata, custom_headers:nil) click to toggle source

Replaces the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3855
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
update_metadata_async(resource_group_name, name, metadata, custom_headers:nil) click to toggle source

Replaces the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3894
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_metadata_slot(resource_group_name, name, metadata, slot, custom_headers:nil) click to toggle source

Replaces the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20646
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
update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers:nil) click to toggle source

Replaces the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20689
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_metadata_slot_with_http_info(resource_group_name, name, metadata, slot, custom_headers:nil) click to toggle source

Replaces the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20668
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
update_metadata_with_http_info(resource_group_name, name, metadata, custom_headers:nil) click to toggle source

Replaces the metadata of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 3875
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
update_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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 [PremierAddOnPatchResource] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14776
def update_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil)
  response = update_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
update_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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 [PremierAddOnPatchResource] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14817
def update_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::V2020_09_01::Models::PremierAddOnPatchResource.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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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 [PremierAddOnPatchResource] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31809
def update_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil)
  response = update_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
update_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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 [PremierAddOnPatchResource] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31854
def update_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::V2020_09_01::Models::PremierAddOnPatchResource.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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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 [PremierAddOnPatchResource] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 31832
def update_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:nil)
  update_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers:custom_headers).value!
end
update_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil) click to toggle source

Updates a named add-on of an app.

Description for 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 [PremierAddOnPatchResource] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 14797
def update_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:nil)
  update_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers:custom_headers).value!
end
update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10509
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
update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10554
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27413
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
update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27462
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 27438
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
update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers:nil) click to toggle source

Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 10532
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
update_scm_allowed(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil) click to toggle source

Updates whether user publishing credentials are allowed on the site or not.

Description for Updates whether user publishing credentials are allowed on the site or not.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param csm_publishing_access_policies_entity

CsmPublishingCredentialsPoliciesEntity

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [CsmPublishingCredentialsPoliciesEntity] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1941
def update_scm_allowed(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil)
  response = update_scm_allowed_async(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_scm_allowed_async(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil) click to toggle source

Updates whether user publishing credentials are allowed on the site or not.

Description for Updates whether user publishing credentials are allowed on the site or not.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param csm_publishing_access_policies_entity

CsmPublishingCredentialsPoliciesEntity

@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1982
def update_scm_allowed_async(resource_group_name, name, csm_publishing_access_policies_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, 'csm_publishing_access_policies_entity is nil' if csm_publishing_access_policies_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::V2020_09_01::Models::CsmPublishingCredentialsPoliciesEntity.mapper()
  request_content = @client.serialize(request_mapper,  csm_publishing_access_policies_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}/basicPublishingCredentialsPolicies/scm'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmPublishingCredentialsPoliciesEntity.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_scm_allowed_with_http_info(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil) click to toggle source

Updates whether user publishing credentials are allowed on the site or not.

Description for Updates whether user publishing credentials are allowed on the site or not.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param csm_publishing_access_policies_entity

CsmPublishingCredentialsPoliciesEntity

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 1962
def update_scm_allowed_with_http_info(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:nil)
  update_scm_allowed_async(resource_group_name, name, csm_publishing_access_policies_entity, custom_headers:custom_headers).value!
end
update_site_push_settings(resource_group_name, name, push_settings, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4126
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
update_site_push_settings_async(resource_group_name, name, push_settings, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4163
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_site_push_settings_slot(resource_group_name, name, push_settings, slot, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20935
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
update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20976
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_site_push_settings_slot_with_http_info(resource_group_name, name, push_settings, slot, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 20956
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
update_site_push_settings_with_http_info(resource_group_name, name, push_settings, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4145
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
update_slot(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Site] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17695
def update_slot(resource_group_name, name, site_envelope, slot, custom_headers:nil)
  response = update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17744
def update_slot_async(resource_group_name, name, site_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, '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::V2020_09_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: {'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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
update_slot_configuration_names(resource_group_name, name, slot_config_names, custom_headers:nil) click to toggle source

Updates the names of application settings and connection string that remain with the slot during swap operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4464
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
update_slot_configuration_names_async(resource_group_name, name, slot_config_names, custom_headers:nil) click to toggle source

Updates the names of application settings and connection string that remain with the slot during swap operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4507
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_slot_configuration_names_with_http_info(resource_group_name, name, slot_config_names, custom_headers:nil) click to toggle source

Updates the names of application settings and connection string that remain with the slot during swap operation.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 4486
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
update_slot_with_http_info(resource_group_name, name, site_envelope, slot, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 17720
def update_slot_with_http_info(resource_group_name, name, site_envelope, slot, custom_headers:nil)
  update_slot_async(resource_group_name, name, site_envelope, slot, custom_headers:custom_headers).value!
end
update_source_control(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38977
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
update_source_control_async(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 39016
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::V2020_09_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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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::V2020_09_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
update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35495
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
update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35538
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::V2020_09_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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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::V2020_09_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::V2020_09_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
update_source_control_slot_with_http_info(resource_group_name, name, site_source_control, slot, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 35517
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
update_source_control_with_http_info(resource_group_name, name, site_source_control, custom_headers:nil) click to toggle source

Updates the source control configuration of an app.

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38997
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
update_swift_virtual_network_connection(resource_group_name, name, connection_envelope, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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 [SwiftVirtualNetwork] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12884
def update_swift_virtual_network_connection(resource_group_name, name, connection_envelope, custom_headers:nil)
  response = update_swift_virtual_network_connection_async(resource_group_name, name, connection_envelope, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_swift_virtual_network_connection_async(resource_group_name, name, connection_envelope, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12935
def update_swift_virtual_network_connection_async(resource_group_name, 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, '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::V2020_09_01::Models::SwiftVirtualNetwork.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}/networkConfig/virtualNetwork'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SwiftVirtualNetwork.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_swift_virtual_network_connection_slot(resource_group_name, name, connection_envelope, slot, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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 [SwiftVirtualNetwork] operation results.

# File lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29816
def update_swift_virtual_network_connection_slot(resource_group_name, name, connection_envelope, slot, custom_headers:nil)
  response = update_swift_virtual_network_connection_slot_async(resource_group_name, name, connection_envelope, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_swift_virtual_network_connection_slot_async(resource_group_name, name, connection_envelope, slot, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29871
def update_swift_virtual_network_connection_slot_async(resource_group_name, 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, '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::V2020_09_01::Models::SwiftVirtualNetwork.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}/networkConfig/virtualNetwork'

  request_url = @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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SwiftVirtualNetwork.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_swift_virtual_network_connection_slot_with_http_info(resource_group_name, name, connection_envelope, slot, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 29844
def update_swift_virtual_network_connection_slot_with_http_info(resource_group_name, name, connection_envelope, slot, custom_headers:nil)
  update_swift_virtual_network_connection_slot_async(resource_group_name, name, connection_envelope, slot, custom_headers:custom_headers).value!
end
update_swift_virtual_network_connection_with_http_info(resource_group_name, name, connection_envelope, custom_headers:nil) click to toggle source

Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

Description for Integrates this Web App with a Virtual Network. This requires that 1) “swiftSupported” is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in use by another App Service Plan other than the one this App is in.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param connection_envelope [SwiftVirtualNetwork] 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 12910
def update_swift_virtual_network_connection_with_http_info(resource_group_name, name, connection_envelope, custom_headers:nil)
  update_swift_virtual_network_connection_async(resource_group_name, name, connection_envelope, custom_headers:custom_headers).value!
end
update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40918
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
update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40963
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41300
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
update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41347
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37958
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
update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 38011
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37985
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
update_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 41324
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
update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37551
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
update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37600
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::V2020_09_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2020_09_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
update_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 37576
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
update_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers:nil) click to toggle source

Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

Description for 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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 40941
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
update_with_http_info(resource_group_name, name, site_envelope, custom_headers:nil) click to toggle source

Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app.

@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/2020-09-01/generated/azure_mgmt_web/web_apps.rb, line 538
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